pixel-icon-web/index.html

77 lines
3.4 KiB
HTML
Raw Normal View History

2023-11-08 00:46:14 +08:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2023-11-08 04:08:33 +08:00
<meta property="og:image" content="./cover.png" />
<link rel="shortcut icon" href="./favicon.png" type="image/png" />
2023-11-08 00:46:14 +08:00
<title>Pixel Icons</title>
</head>
<body>
2023-11-08 04:08:33 +08:00
<div id="wrapper">
<header>
<!-- <h1>Pixel Icons</h1> -->
<svg id="site-title" fill="currentColor" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 490 60" style="enable-background:new 0 0 490 60;" xml:space="preserve">
<polygon points="40,30 10,30 10,10 40,10 40,0 0,0 0,60 10,60 10,40 50,40 50,10 40,10 "/>
<rect x="60" width="10" height="10"/>
<rect x="60" y="20" width="10" height="40"/>
<rect x="90" y="40" width="10" height="10"/>
<rect x="90" y="20" width="10" height="10"/>
<rect x="100" y="30" width="10" height="10"/>
<rect x="110" y="40" width="10" height="10"/>
<rect x="120" y="50" width="10" height="10"/>
<rect x="110" y="20" width="10" height="10"/>
<rect x="120" y="10" width="10" height="10"/>
<rect x="80" y="10" width="10" height="10"/>
<rect x="80" y="50" width="10" height="10"/>
<rect x="150" y="50" width="30" height="10"/>
<rect x="150" y="10" width="30" height="10"/>
<polygon points="180,30 150,30 150,20 140,20 140,50 150,50 150,40 190,40 190,20 180,20 "/>
<rect x="200" width="10" height="50"/>
<rect x="210" y="50" width="10" height="10"/>
<rect x="270" width="10" height="60"/>
<rect x="290" y="20" width="10" height="30"/>
<rect x="300" y="10" width="30" height="10"/>
<rect x="300" y="50" width="30" height="10"/>
<rect x="340" y="20" width="10" height="30"/>
<rect x="380" y="20" width="10" height="30"/>
<rect x="350" y="10" width="30" height="10"/>
<rect x="350" y="50" width="30" height="10"/>
<rect x="400" y="20" width="10" height="40"/>
<rect x="430" y="20" width="10" height="40"/>
<rect x="410" y="10" width="20" height="10"/>
<rect x="460" y="30" width="20" height="10"/>
<rect x="450" y="20" width="10" height="10"/>
<rect x="480" y="40" width="10" height="10"/>
<rect x="460" y="10" width="30" height="10"/>
<rect x="450" y="50" width="30" height="10"/>
</svg>
<a class="pill ms-auto" href="https://github.com/shuqikhor/PixelIcon" target="_blank">GitHub</a>
<button class="pill" id="btn-theme">
<img class="theme-icon" src="./icons/sun.svg" alt="Light">
<img class="theme-icon" src="./icons/moon.svg" alt="Dark">
</button>
</header>
<div id="root"></div>
</div>
2023-11-08 00:46:14 +08:00
<script type="module" src="/src/main.jsx"></script>
2023-11-08 04:08:33 +08:00
<script>
(function () {
let light = true;
if(window.matchMedia("(prefers-color-scheme: dark)").matches) {
//OS theme setting detected as dark
light = false;
}
document.documentElement.dataset.theme = light ? 'light' : 'dark';
document.querySelector('#btn-theme').addEventListener('click', e => {
light = !light;
document.documentElement.dataset.theme = light ? 'light' : 'dark';
});
})()
</script>
2023-11-08 00:46:14 +08:00
</body>
</html>