mirror of
https://github.com/wah-su/wah-su.github.io.git
synced 2025-05-24 21:59:35 +05:00
feat: add theme switcher
This commit is contained in:
parent
78efd2500a
commit
40a31ce007
14 changed files with 349 additions and 176 deletions
21
index.html
21
index.html
|
@ -8,10 +8,10 @@
|
|||
<link href="/public/output.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="shadow-lg pt-4 pb-6 sticky top-0 left-0 bg-slate-50">
|
||||
<body class="light" id="body">
|
||||
<header class="shadow-lg pt-4 pb-6 sticky top-0 left-0 bg-slate-50 dark:bg-slate-800">
|
||||
<div class="flex flex-row gap-2 items-center container max-w-[1440px] justify-between px-4">
|
||||
<div><img src="/public/images/logo-light.svg" alt="wah.su" /></div>
|
||||
<div><img src="/public/images/logo-light.svg" alt="wah.su" id="logo" /></div>
|
||||
<div>
|
||||
<a href="https://status.wah.su" class="flex flex-row items-center gap-2" target="_blank">
|
||||
<div class="bg-green-500 w-4 h-4 rounded-full hidden" id="status-up-icon"></div>
|
||||
|
@ -22,8 +22,16 @@
|
|||
<p class="hidden" id="status-down-text">All Systems Down.</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex flex-row items-center justify-center">
|
||||
<button type="button"
|
||||
<div class="flex flex-row items-center justify-center gap-6">
|
||||
<label class="inline-flex items-center cursor-pointer">
|
||||
<span class="ms-3 text-sm font-medium text-gray-900 dark:text-gray-300 mr-4">light</span>
|
||||
<input type="checkbox" class="sr-only peer" id="theme-toggle">
|
||||
<div
|
||||
class="relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600">
|
||||
</div>
|
||||
<span class="ms-3 text-sm font-medium text-gray-900 dark:text-gray-300">dark</span>
|
||||
</label>
|
||||
<a href="https://auth.wah.su"
|
||||
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
Sign in
|
||||
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -31,7 +39,7 @@
|
|||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M1 5h12m0 0L9 1m4 4L9 9" />
|
||||
</svg>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -55,6 +63,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/public/js/theme.js"></script>
|
||||
<script src="/public/js/flowbite.min.js"></script>
|
||||
<script src="/public/js/cards.js"></script>
|
||||
<script src="/public/js/status.js"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue