Skip to content

Commit 5708757

Browse files
committed
chore: improve about page on mobile
1 parent a1ffbbc commit 5708757

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

assets/css/about.css

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ hr.about {
66
text-align: center;
77
}
88

9-
i.tool-icon::before {
10-
font-size: 300%;
11-
opacity: 1;
12-
}
13-
14-
i.tool-icon:not(.colored)::before {
15-
color: #696969;
16-
opacity: 0.5 !important;
17-
}
18-
199
a.tool {
2010
display: inline-block;
2111
padding: 0.5rem;
2212
border-bottom: unset !important;
2313
transition: transform 0.2s;
2414
}
2515

26-
a.tool:hover {
16+
a.tool.hovered {
2717
transform: scale(1.5);
2818
transition: transform 0.2s;
2919
}
3020

3121
a.tool.disabled {
3222
cursor: default;
3323
}
24+
25+
i.tool-icon::before {
26+
font-size: 300%;
27+
opacity: 1;
28+
}
29+
30+
i.tool-icon:not(.colored)::before {
31+
color: #696969;
32+
opacity: 0.5 !important;
33+
}

assets/js/about.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,17 @@ document.querySelectorAll('.tool-icon').forEach((ti) => {
121121
event,
122122
() => {
123123
ti.classList.add('colored');
124+
ti.parentElement.classList.add('hovered');
124125
},
125126
{ passive: true }
126127
)
127128
);
128-
['mouseleave', 'touchend'].forEach((event) =>
129+
['mouseleave', 'touchend', 'touchcancel'].forEach((event) =>
129130
ti.addEventListener(
130131
event,
131132
() => {
132133
ti.classList.remove('colored');
134+
ti.parentElement.classList.remove('hovered');
133135
},
134136
{ passive: true }
135137
)

0 commit comments

Comments
 (0)