1- <nav class =" flex justify-between mx-auto h-20 px-6 w-full bg-gray1 dark:bg-gray7 z-50 relative" >
2- <a
3- class =" grid place-items-center w-14"
4- href =" /"
5- >
1+ <nav
2+ transition:persist
3+ class =" flex justify-between mx-auto h-20 px-6 w-full bg-gray1 dark:bg-gray7 z-50 relative"
4+ >
5+ <div class =" flex justify-center items-center" >
6+ <button id =" sidebarBtn" class =" lg:hidden" >
7+ <svg
8+ class =" fill-gray6 dark:fill-gray2 w-8 mx-2"
9+ xmlns =" http://www.w3.org/2000/svg"
10+ viewBox =" 0 0 24 24"
11+ fill =" currentColor"
12+ >
13+ <path
14+ fill-rule =" evenodd"
15+ clip-rule =" evenodd"
16+ d =" M4 5C3.44772 5 3 5.44772 3 6C3 6.55228 3.44772 7 4 7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H4ZM7 12C7 11.4477 7.44772 11 8 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H8C7.44772 13 7 12.5523 7 12ZM13 18C13 17.4477 13.4477 17 14 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H14C13.4477 19 13 18.5523 13 18Z"
17+ ></path >
18+ </svg >
19+ </button >
20+ <a class =" grid place-items-center w-14" href =" /" >
621 <img id =" logo" src =" /logo.svg" alt =" sveltefire logo" />
722 </a >
8-
9- <ul class =" flex justify-center items-center list-none" >
23+ </div >
24+
25+ <ul class =" flex justify-center items-center list-none" >
26+ <li class =" mx-2 md:mx-4 hidden md:block" >
27+ <a
28+ href =" /guide/start"
29+ class =" font-code font-bold text-gray5 dark:text-gray2" >start</a
30+ >
31+ </li >
1032
11- <li class =" mx-2 md:mx-4" >
12- <a href =" /guide/start" class =" font-code font-bold text-gray5 dark:text-gray2" >start</a >
13- </li >
33+ <li class =" mx-4" >
34+ <button
35+ class =" p-2 mr-2 hidden md:flex justify-between items-center bg-gray3 bg-opacity-10 hover:bg-opacity-20 border border-gray4 hover:border-orange-500 transition-all"
36+ >
37+ <span class =" text-gray4 dark:text-gray2 w-4 mx-2" >
38+ <svg
39+ aria-hidden =" true"
40+ focusable =" false"
41+ data-prefix =" fad"
42+ data-icon =" search"
43+ role =" img"
44+ xmlns =" http://www.w3.org/2000/svg"
45+ viewBox =" 0 0 512 512"
46+ class =" svg-inline--fa fk-search fk-w-16 fk-9x"
47+ >
48+ <g class =" fk-group"
49+ ><path
50+ fill =" currentColor"
51+ d =" M208 80a128 128 0 1 1-90.51 37.49A127.15 127.15 0 0 1 208 80m0-80C93.12 0 0 93.12 0 208s93.12 208 208 208 208-93.12 208-208S322.88 0 208 0z"
52+ class =" fk-secondary" ></path ><path
53+ fill =" currentColor"
54+ d =" M504.9 476.7L476.6 505a23.9 23.9 0 0 1-33.9 0L343 405.3a24 24 0 0 1-7-17V372l36-36h16.3a24 24 0 0 1 17 7l99.7 99.7a24.11 24.11 0 0 1-.1 34z"
55+ class =" fk-primary"
56+ >
57+ </path ></g
58+ ></svg
59+ >
60+ </span >
61+ <span class =" mr-12 font-code" >search</span >
62+ <span class =" mx-2 text-xs border border-gray4 rounded-md p-1 px-2"
63+ >/</span
64+ >
65+ </button >
66+ <button class =" flex md:hidden" >
67+ <span class =" text-gray2 w-6 mx-2" ></span >
68+ </button >
69+ </li >
1470
15- <li class =" mx-4" >
16- <button class =" p-2 mr-2 hidden md:flex justify-between items-center bg-gray3 bg-opacity-10 hover:bg-opacity-20 border border-gray4 hover:border-orange-500
17- transition-all" >
18- <span class =" text-gray4 dark:text-gray2 w-4 mx-2" >
19- <svg aria-hidden =" true" focusable =" false" data-prefix =" fad" data-icon =" search" role =" img" xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 512 512" class =" svg-inline--fa fk-search fk-w-16 fk-9x" >
20- <g class =" fk-group" ><path fill =" currentColor" d =" M208 80a128 128 0 1 1-90.51 37.49A127.15 127.15 0 0 1 208 80m0-80C93.12 0 0 93.12 0 208s93.12 208 208 208 208-93.12 208-208S322.88 0 208 0z" class =" fk-secondary" ></path ><path fill =" currentColor" d =" M504.9 476.7L476.6 505a23.9 23.9 0 0 1-33.9 0L343 405.3a24 24 0 0 1-7-17V372l36-36h16.3a24 24 0 0 1 17 7l99.7 99.7a24.11 24.11 0 0 1-.1 34z" class =" fk-primary" >
21- </path ></g ></svg >
22- </span >
23- <span class =" mr-12 font-code" >search</span >
24- <span class =" mx-2 text-xs border border-gray4 rounded-md p-1 px-2" >/</span >
25- </button >
26- <button class =" flex md:hidden" >
27- <span class =" text-gray2 w-6 mx-2" ></span >
28- </button >
29- </li >
30-
71+ <li
72+ id =" dark"
73+ class =" w-5 cursor-pointer fill-gray3 dark:fill-orange-500 mr-2"
74+ >
75+ <svg
76+ xmlns =" http://www.w3.org/2000/svg"
77+ xml:space =" preserve"
78+ style =" enable-background:new 0 0 312.812 312.812"
79+ viewBox =" 0 0 312.812 312.812"
80+ ><path
81+ d =" M305.2 178.159c-3.2-.8-6.4 0-9.2 2-10.4 8.8-22.4 16-35.6 20.8-12.4 4.8-26 7.2-40.4 7.2-32.4 0-62-13.2-83.2-34.4-21.2-21.2-34.4-50.8-34.4-83.2 0-13.6 2.4-26.8 6.4-38.8 4.4-12.8 10.8-24.4 19.2-34.4 3.6-4.4 2.8-10.8-1.6-14.4-2.8-2-6-2.8-9.2-2-34 9.2-63.6 29.6-84.8 56.8-20.4 26.8-32.4 60-32.4 96 0 43.6 17.6 83.2 46.4 112s68 46.4 112 46.4c36.8 0 70.8-12.8 98-34 27.6-21.6 47.6-52.4 56-87.6 1.6-5.6-1.6-11.2-7.2-12.4z"
82+ ></path ></svg >
83+ </li >
84+ <li id =" light" class =" w-5 cursor-pointer fill-orange-500 dark:fill-gray3" >
85+ <svg xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 512 512"
86+ ><path
87+ d="M100.307 168.213a180.083 180.083 0 0 1 67.905-67.905L90.7 71.547A14.9 14.9 0 0 0 71.547 90.7zM77.22 256c0-16.617 2.287-32.71 6.549-47.986L8.687 242.457a14.9 14.9 0 0 0 0 27.086l75.083 34.443A178.326 178.326 0 0 1 77.22 256zM256 77.22a178.32 178.32 0 0 1 47.986 6.549L269.543 8.687a14.9 14.9 0 0 0-27.086 0L208.014 83.77A178.28 178.28 0 0 1 256 77.22zM411.693 168.213l28.76-77.513A14.9 14.9 0 0 0 421.3 71.547l-77.513 28.76a180.102 180.102 0 0 1 67.906 67.906zM256 434.78a178.32 178.32 0 0 1-47.986-6.549l34.443 75.083a14.9 14.9 0 0 0 27.086-.001l34.444-75.083A178.333 178.333 0 0 1 256 434.78zM100.307 343.787 71.547 421.3A14.9 14.9 0 0 0 90.7 440.453l77.513-28.76a180.102 180.102 0 0 1-67.906-67.906zM503.313 242.457l-75.083-34.444c4.262 15.277 6.549 31.369 6.549 47.986s-2.287 32.71-6.549 47.986l75.083-34.443a14.9 14.9 0 0 0 0-27.085zM411.693 343.787a180.083 180.083 0 0 1-67.905 67.905l77.513 28.76a14.897 14.897 0 0 0 15.719-3.434 14.9 14.9 0 0 0 3.434-15.719zM256 404.98c-82.148 0-148.98-66.832-148.98-148.98S173.852 107.02 256 107.02 404.98 173.852 404.98 256 338.148 404.98 256 404.98z"
88+ ></path ></svg >
89+ </li >
90+ </ul >
91+ </nav >
3192
32- <li id =" dark" class =" w-5 cursor-pointer fill-gray3 dark:fill-orange-500 mr-2" ><svg xmlns =" http://www.w3.org/2000/svg" xml:space =" preserve" style =" enable-background:new 0 0 312.812 312.812" viewBox =" 0 0 312.812 312.812" ><path d =" M305.2 178.159c-3.2-.8-6.4 0-9.2 2-10.4 8.8-22.4 16-35.6 20.8-12.4 4.8-26 7.2-40.4 7.2-32.4 0-62-13.2-83.2-34.4-21.2-21.2-34.4-50.8-34.4-83.2 0-13.6 2.4-26.8 6.4-38.8 4.4-12.8 10.8-24.4 19.2-34.4 3.6-4.4 2.8-10.8-1.6-14.4-2.8-2-6-2.8-9.2-2-34 9.2-63.6 29.6-84.8 56.8-20.4 26.8-32.4 60-32.4 96 0 43.6 17.6 83.2 46.4 112s68 46.4 112 46.4c36.8 0 70.8-12.8 98-34 27.6-21.6 47.6-52.4 56-87.6 1.6-5.6-1.6-11.2-7.2-12.4z" /></svg ></li >
33- <li id="light" class="w-5 cursor-pointer fill-orange-500 dark:fill-gray3"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M100.307 168.213a180.083 180.083 0 0 1 67.905-67.905L90.7 71.547A14.9 14.9 0 0 0 71.547 90.7zM77.22 256c0-16.617 2.287-32.71 6.549-47.986L8.687 242.457a14.9 14.9 0 0 0 0 27.086l75.083 34.443A178.326 178.326 0 0 1 77.22 256zM256 77.22a178.32 178.32 0 0 1 47.986 6.549L269.543 8.687a14.9 14.9 0 0 0-27.086 0L208.014 83.77A178.28 178.28 0 0 1 256 77.22zM411.693 168.213l28.76-77.513A14.9 14.9 0 0 0 421.3 71.547l-77.513 28.76a180.102 180.102 0 0 1 67.906 67.906zM256 434.78a178.32 178.32 0 0 1-47.986-6.549l34.443 75.083a14.9 14.9 0 0 0 27.086-.001l34.444-75.083A178.333 178.333 0 0 1 256 434.78zM100.307 343.787 71.547 421.3A14.9 14.9 0 0 0 90.7 440.453l77.513-28.76a180.102 180.102 0 0 1-67.906-67.906zM503.313 242.457l-75.083-34.444c4.262 15.277 6.549 31.369 6.549 47.986s-2.287 32.71-6.549 47.986l75.083-34.443a14.9 14.9 0 0 0 0-27.085zM411.693 343.787a180.083 180.083 0 0 1-67.905 67.905l77.513 28.76a14.897 14.897 0 0 0 15.719-3.434 14.9 14.9 0 0 0 3.434-15.719zM256 404.98c-82.148 0-148.98-66.832-148.98-148.98S173.852 107.02 256 107.02 404.98 173.852 404.98 256 338.148 404.98 256 404.98z"/></svg></li>
34-
35- </ul >
36- </nav >
37-
3893<script >
39- function light() {
40- // Whenever the user explicitly chooses light mode
41- localStorage.theme = ' light'
42- document.documentElement.classList.add(' light')
43- document.documentElement.classList.remove(' dark')
44- }
45- function dark() {
46- // Whenever the user explicitly chooses dark mode
47- localStorage.theme = ' dark'
48- document.documentElement.classList.add(' dark')
49- document.documentElement.classList.remove(' light')
50- }
51- document.getElementById("light")!.addEventListener("click", light);
52- document.getElementById("dark")!.addEventListener("click", dark);
94+ function light() {
95+ // Whenever the user explicitly chooses light mode
96+ localStorage.theme = " light";
97+ document.documentElement.classList.add(" light");
98+ document.documentElement.classList.remove(" dark");
99+ }
100+ function dark() {
101+ // Whenever the user explicitly chooses dark mode
102+ localStorage.theme = " dark";
103+ document.documentElement.classList.add(" dark");
104+ document.documentElement.classList.remove(" light");
105+ }
106+ document.getElementById("light")!.addEventListener("click", light);
107+ document.getElementById("dark")!.addEventListener("click", dark);
53108
109+ const sidebarBtn = document.getElementById("sidebarBtn");
110+ sidebarBtn.onclick = function () {
111+ const sidebar = document.getElementById("sidebar");
112+ sidebar.classList.toggle("hidden");
113+ };
54114</script >
55115
56-
57-
58- <style >
59-
60- </style >
116+ <style ></style >
0 commit comments