Skip to content

Commit

Permalink
chore: improve about page on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfux committed Oct 29, 2024
1 parent a1ffbbc commit 5708757
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 11 additions & 11 deletions assets/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ hr.about {
text-align: center;
}

i.tool-icon::before {
font-size: 300%;
opacity: 1;
}

i.tool-icon:not(.colored)::before {
color: #696969;
opacity: 0.5 !important;
}

a.tool {
display: inline-block;
padding: 0.5rem;
border-bottom: unset !important;
transition: transform 0.2s;
}

a.tool:hover {
a.tool.hovered {
transform: scale(1.5);
transition: transform 0.2s;
}

a.tool.disabled {
cursor: default;
}

i.tool-icon::before {
font-size: 300%;
opacity: 1;
}

i.tool-icon:not(.colored)::before {
color: #696969;
opacity: 0.5 !important;
}
4 changes: 3 additions & 1 deletion assets/js/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,17 @@ document.querySelectorAll('.tool-icon').forEach((ti) => {
event,
() => {
ti.classList.add('colored');
ti.parentElement.classList.add('hovered');
},
{ passive: true }
)
);
['mouseleave', 'touchend'].forEach((event) =>
['mouseleave', 'touchend', 'touchcancel'].forEach((event) =>
ti.addEventListener(
event,
() => {
ti.classList.remove('colored');
ti.parentElement.classList.remove('hovered');
},
{ passive: true }
)
Expand Down

0 comments on commit 5708757

Please sign in to comment.