docs: update typography to support dark mode (#7342)

This commit is contained in:
iamkun
2022-04-23 22:22:39 +08:00
committed by GitHub
parent 9de79794a3
commit d26fa73420
20 changed files with 27 additions and 8 deletions

View File

@@ -1,11 +1,21 @@
<script lang="ts" setup>
import { isDark } from '~/composables/dark'
</script>
<template>
<div class="demo-term-box">
<img src="/images/term-pingfang.png" alt="" />
<img src="/images/term-hiragino.png" alt="" />
<img src="/images/term-microsoft.png" alt="" />
<img src="/images/term-sf.png" alt="" />
<img src="/images/term-helvetica.png" alt="" />
<img src="/images/term-arial.png" alt="" />
<div v-if="!isDark" class="demo-term-box">
<img src="/images/typography/term-pingfang.png" alt="" />
<img src="/images/typography/term-hiragino.png" alt="" />
<img src="/images/typography/term-microsoft.png" alt="" />
<img src="/images/typography/term-helvetica.png" alt="" />
<img src="/images/typography/term-arial.png" alt="" />
</div>
<div v-else class="demo-term-box">
<img src="/images/typography/term-pingfang-dark.png" alt="" />
<img src="/images/typography/term-hiragino-dark.png" alt="" />
<img src="/images/typography/term-microsoft-dark.png" alt="" />
<img src="/images/typography/term-helvetica-dark.png" alt="" />
<img src="/images/typography/term-arial-dark.png" alt="" />
</div>
</template>

View File

@@ -1,6 +1,15 @@
<script lang="ts" setup>
import { isDark } from '~/composables/dark'
</script>
<template>
<div>
<img class="lineH-left" src="/images/typography.png" />
<img
v-if="isDark"
class="lineH-left"
src="/images/typography/line-height-dark.png"
/>
<img v-else class="lineH-left" src="/images/typography/line-height.png" />
<ul class="lineH-right">
<li>line-height:1 <span>No line height</span></li>
<li>line-height:1.3 <span>Compact</span></li>

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB