Layout updates

This commit is contained in:
Shuqi 2023-11-13 03:45:50 +08:00
parent a07ff777da
commit c12b3bd6dc
2 changed files with 99 additions and 74 deletions

View File

@ -1,76 +1,92 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:image" content="./cover.png" /> <meta property="og:title" content="Pixel Icons" />
<link rel="shortcut icon" href="./favicon.png" type="image/png" /> <meta property="og:url" content="https://sqkhor.com/pixel-icons/" />
<title>Pixel Icons</title> <meta property="og:image" content="https://sqkhor.com/pixel-icons/cover.png" />
</head> <meta property="og:description" content="This is a set of over 100 SVG icons made with a 9x9 pixel grid. Feel free to use them as you please." />
<body> <title>Pixel Icons</title>
<div id="wrapper"> <meta name="description" content="This is a set of over 100 SVG icons made with a 9x9 pixel grid. Feel free to use them as you please." />
<header> <link rel="shortcut icon" href="./favicon.png" type="image/png" />
<!-- <h1>Pixel Icons</h1> --> <!-- Google tag (gtag.js) -->
<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" <script async src="https://www.googletagmanager.com/gtag/js?id=G-S5K34EE24W"></script>
viewBox="0 0 490 60" style="enable-background:new 0 0 490 60;" xml:space="preserve"> <script>
<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 "/> window.dataLayer = window.dataLayer || [];
<rect x="60" width="10" height="10"/> function gtag(){dataLayer.push(arguments);}
<rect x="60" y="20" width="10" height="40"/> gtag('js', new Date());
<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>
<script type="module" src="/src/main.jsx"></script>
<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'; gtag('config', 'G-S5K34EE24W');
</script>
</head>
<body>
<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>
<div class="buttons">
<a class="pill" href="./download.php?icon=all" target="_blank">Download All</a>
<a class="pill" 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>
</div>
</header>
<div id="root"></div>
</div>
<script type="module" src="/src/main.jsx"></script>
<script>
(function () {
let light = true;
if(window.matchMedia("(prefers-color-scheme: dark)").matches) {
//OS theme setting detected as dark
light = false;
}
document.querySelector('#btn-theme').addEventListener('click', e => { document.documentElement.dataset.theme = light ? 'light' : 'dark';
light = !light;
document.documentElement.dataset.theme = light ? 'light' : 'dark'; document.querySelector('#btn-theme').addEventListener('click', e => {
}); light = !light;
})() document.documentElement.dataset.theme = light ? 'light' : 'dark';
</script> });
</body> })()
</script>
</body>
</html> </html>

View File

@ -49,21 +49,30 @@ input {
margin: 0 auto; margin: 0 auto;
padding: 2rem; padding: 2rem;
font-size: 9pt; font-size: 9pt;
box-sizing: border-box;
} }
header { header {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
gap: 1rem; gap: 18px;
/* line-height: 3.2rem; */ flex-wrap: wrap;
margin: 36px 0 54px;
}
header .buttons {
display: flex;
gap: 18px;
justify-content: flex-start;
align-items: center;
} }
#site-title { #site-title {
height: 30px; height: 30px;
width: auto; width: auto;
fill: currentColor; fill: currentColor;
margin: 36px 0; margin-right: auto;
} }
h1 { h1 {