Skip to content

Commit 88fe0ea

Browse files
committed
add icons for toggle (from fontawesome)
1 parent a74754a commit 88fe0ea

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

public/img/moon.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/sun.svg

Lines changed: 1 addition & 0 deletions
Loading

public/style/theme.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,26 @@ html[data-theme="light"] {
4646
-webkit-backdrop-filter: blur(18px);
4747
}
4848

49-
.sun,
50-
.moon {
49+
.theme-toggle #sun,
50+
.theme-toggle #moon {
5151
position: absolute;
5252
opacity: 0;
5353
}
5454

55-
html[data-theme="light"] .moon {
55+
html[data-theme="light"] .theme-toggle #moon {
5656
opacity: 1;
5757
transform: scale(1);
5858
}
5959

60-
html[data-theme="light"] .sun {
60+
html[data-theme="light"] .theme-toggle #sun {
6161
transform: scale(0.8);
6262
}
6363

64-
html[data-theme="dark"] .sun {
64+
html[data-theme="dark"] .theme-toggle #sun {
6565
opacity: 1;
6666
transform: scale(1);
6767
}
6868

69-
html[data-theme="dark"] .moon {
69+
html[data-theme="dark"] .theme-toggle #moon {
7070
transform: scale(0.8);
7171
}

views/home.ejs

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

3737
<button class="theme-toggle" type="button">
38-
<span class="sun" aria-hidden="true">☀️</span>
39-
<span class="moon" aria-hidden="true">🌙</span>
38+
<img src="/img/moon.svg" id="moon" aria-hidden="true" />
39+
<img src="/img/sun.svg" id="sun" aria-hidden="true" />
4040
</button>
4141

4242
<div class="user">

0 commit comments

Comments
 (0)