Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit b62c161

Browse files
committed
fix issues
1 parent 1a04492 commit b62c161

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

packages/docs/badge.pug

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
mixin badge(name, text)
2-
svg(xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='80' height='20' role='img' aria-label='#{name}: #{text}')
2+
svg(xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='80' height='20' role='img' aria-label=name + ': ' + text)
33
title #{name}: #{text}
4-
clippath#r
5-
rect(width='80' height='20' fill='#fff')
6-
g(clip-path='url(#r)')
4+
g
75
rect(width='35' height='20' fill='#555')
86
rect(x='35' width='45' height='20' fill='black' class="background")
9-
rect(width='80' height='20' fill='url(#s)')
107
g(fill='#fff' text-anchor='middle' font-family='Verdana,Geneva,DejaVu Sans,sans-serif' text-rendering='geometricPrecision' font-size='110')
118
text(aria-hidden='true' x='185' y='150' fill='#010101' fill-opacity='.3' transform='scale(.1)' textlength='250') #{name}
129
text(x='185' y='140' transform='scale(.1)' fill='#fff' textlength='250') #{name}

packages/docs/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ mode.subscribe((v) => {
2121
(el) =>
2222
(el.querySelector('.label').innerHTML =
2323
v === 'dark'
24-
? '<img class="emoji" src="moon.png"> Dark'
25-
: '<img class="emoji" src="sun.png"> Light'),
24+
? '<img class="emoji" src="moon.png" alt=""> Dark'
25+
: '<img class="emoji" src="sun.png" alt=""> Light'),
2626
)
2727
changeFavicon(v === 'dark' ? 'moon.png' : 'sun.png')
2828
})

packages/docs/index.pug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ html
1919
- var outline = ['focus:outline-none focus:shadow-outline focus:border-yellow-300']
2020
div.container.px-3.mb-3
2121
div.header.flex.items-center.mb-3.justify-between.flex-col(class="md:flex-row md:my-6")
22-
h1.mb-3.text-3xl(class="md:mb-0 md:text-4xl") <img class="emoji" src="moon.png"><img class="emoji" src="sun.png"> Perfect Dark Mode
22+
h1.mb-3.text-3xl(class="md:mb-0 md:text-4xl") <img class="emoji" src="moon.png" alt=""><img class="emoji" src="sun.png" alt=""> Perfect Dark Mode
2323
button.rounded-sm.toggle.flex.flex-col.items-center(style="visibility: hidden;" class=outline)
24-
span.label <img class="emoji" src="sun.png"> color mode
24+
span.label <img class="emoji" src="sun.png" alt=""> color mode
2525
span.text-xs (Click Me)
2626

2727
div.flex.space-x-2.justify-center(class="md:justify-start")
@@ -53,7 +53,7 @@ html
5353
// their system color mode.
5454
p You can set the color mode, this will be saved.
5555
button.rounded-sm.toggle(style="visibility: hidden;" class=outline)
56-
span.label <img class="emoji" src="sun.png"> color mode
56+
span.label <img class="emoji" src="sun.png" alt=""> color mode
5757
p You can reset the color mode and fallback to system color mode.
5858
button.rounded-sm.reset(class=outline) Reset
5959
p For debugging and understanding here is the saved color mode and the OS color mode.

packages/docs/simpleBadge.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mixin simpleBadge(text)
2-
svg(xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='80' height='20' role='img' aria-label='#{name}: #{text}')
2+
svg(xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='80' height='20' role='img' aria-label=text)
33
title #{text}
4-
g(clip-path='url(#r)')
4+
g
55
rect(width='80' height='20' fill='black' class="background")
66
g(fill='#fff' text-anchor='middle' font-family='Verdana,Geneva,DejaVu Sans,sans-serif' text-rendering='geometricPrecision' font-size='110')
77
text(aria-hidden='true' x='400' y='150' fill='#010101' fill-opacity='.3' transform='scale(.1)' textlength='350' class="text-shadow") #{text}

0 commit comments

Comments
 (0)