Skip to content

Commit 2c3a63b

Browse files
committed
add icons
1 parent a053df9 commit 2c3a63b

3 files changed

Lines changed: 42 additions & 2 deletions

File tree

public/style/theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ html[data-theme="light"] {
3333
.theme-toggle {
3434
position: absolute;
3535

36+
display: flex;
37+
justify-content: center;
38+
align-items: center;
39+
3640
top: 15px;
3741
left: 15px;
3842

public/style/user.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
.user {
22
position: absolute;
33

4+
display: flex;
5+
justify-content: center;
6+
align-items: center;
7+
48
top: 15px;
59
right: 15px;
610

views/home.ejs

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,40 @@
3535
</div>
3636

3737
<button class="theme-toggle" type="button">
38-
<img src="/img/moon.svg" id="moon" aria-hidden="true" />
39-
<img src="/img/sun.svg" id="sun" aria-hidden="true" />
38+
<svg
39+
id="sun"
40+
xmlns="http://www.w3.org/2000/svg"
41+
width="24"
42+
height="24"
43+
fill="none"
44+
stroke="currentColor"
45+
stroke-linecap="round"
46+
stroke-linejoin="round"
47+
stroke-width="1.8"
48+
data-attribution="cc0-icons"
49+
viewBox="0 0 24 24"
50+
>
51+
<path
52+
d="m4.91 19.052 1.773-1.763M17.317 6.71l1.773-1.762m-.038 14.142-1.763-1.773M6.71 6.683 4.949 4.91M12 22v-2.5m0-15V2m10 10h-2.5m-15 0H2m10 4.5a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"
53+
/>
54+
</svg>
55+
<svg
56+
id="moon"
57+
xmlns="http://www.w3.org/2000/svg"
58+
width="24"
59+
height="24"
60+
fill="none"
61+
stroke="currentColor"
62+
stroke-linecap="round"
63+
stroke-linejoin="round"
64+
stroke-width="1.8"
65+
data-attribution="cc0-icons"
66+
viewBox="0 0 24 24"
67+
>
68+
<path
69+
d="M2.65 13.717c.94 5.44 6.082 9.081 11.482 8.133 3.385-.595 6.07-2.853 7.368-5.795a8.206 8.206 0 0 1-3.863 1.796c-4.5.79-8.784-2.244-9.568-6.777-.668-3.859 1.415-7.56 4.825-9.063a9.888 9.888 0 0 0-2.172.14c-5.4.948-9.014 6.127-8.073 11.566Z"
70+
/>
71+
</svg>
4072
</button>
4173

4274
<div class="user">

0 commit comments

Comments
 (0)