Compare commits
No commits in common. "e94805c8978d58ac64be316e22bec094c1d6f1ff" and "9850279e61de8470bf95b15ba0447afecc86a60b" have entirely different histories.
e94805c897
...
9850279e61
2
css/fontawesome/all.min.css
vendored
2
css/fontawesome/all.min.css
vendored
File diff suppressed because one or more lines are too long
27
css/main.css
27
css/main.css
|
@ -1,8 +1,3 @@
|
||||||
:root {
|
|
||||||
--btn-dark: #1C1C1C;
|
|
||||||
--btn-light: #E3E3E3;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
font-family: 'Lato';
|
||||||
src: url('fonts/Lato-Regular.ttf');
|
src: url('fonts/Lato-Regular.ttf');
|
||||||
|
@ -60,32 +55,24 @@ main {
|
||||||
|
|
||||||
border-radius: 100vw;
|
border-radius: 100vw;
|
||||||
}
|
}
|
||||||
.btn.cbtn > i {
|
.btn.cbtn::after {
|
||||||
display: grid;
|
content: "";
|
||||||
|
|
||||||
padding: inherit;
|
|
||||||
}
|
|
||||||
.btn.cbtn > i.fa-cog::after {
|
|
||||||
display: grid;
|
|
||||||
place-content: center;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 1000;
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
padding: 0rem;
|
padding: 0rem;
|
||||||
|
|
||||||
background: #fff;
|
|
||||||
filter: invert(1);
|
|
||||||
|
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
|
||||||
border-radius: 100vw;
|
border-radius: 100vw;
|
||||||
|
|
||||||
|
backdrop-filter: invert(1);
|
||||||
transition: padding .2s;
|
transition: padding .2s;
|
||||||
}
|
}
|
||||||
/* When deployed on a platform, choose one or the other, not both */
|
/* When deployed on a platform, choose one or the other, not both */
|
||||||
.btn.cbtn:focus > i::after, /* TV */
|
.btn.cbtn:focus::after, /* TV */
|
||||||
.btn.cbtn:hover > i::after /* PC */ {
|
.btn.cbtn:hover::after /* PC */ {
|
||||||
padding: inherit;
|
padding: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ addEventListener("load", () => {
|
||||||
const onAnimationFinished = (e) => {
|
const onAnimationFinished = (e) => {
|
||||||
e.target.remove();
|
e.target.remove();
|
||||||
};
|
};
|
||||||
const onClick = (e, btn) => {
|
const onClick = (e) => {
|
||||||
const clickElement = document.createElement("div");
|
const clickElement = document.createElement("div");
|
||||||
clickElement.className = "click";
|
clickElement.className = "click";
|
||||||
clickElement.addEventListener("animationend", onAnimationFinished);
|
clickElement.addEventListener("animationend", onAnimationFinished);
|
||||||
btn.appendChild(clickElement);
|
e.target.appendChild(clickElement);
|
||||||
};
|
};
|
||||||
for (const btn of document.getElementsByClassName("btn")) {
|
for (const btn of document.getElementsByClassName("btn")) {
|
||||||
btn.addEventListener("focusin", () => {
|
btn.addEventListener("focusin", () => {
|
||||||
|
@ -15,6 +15,6 @@ addEventListener("load", () => {
|
||||||
btn.addEventListener("focusout", () => {
|
btn.addEventListener("focusout", () => {
|
||||||
console.log("OUT");
|
console.log("OUT");
|
||||||
});
|
});
|
||||||
btn.addEventListener("click", (e) => onClick(e, btn) );
|
btn.addEventListener("click", onClick);
|
||||||
};
|
};
|
||||||
});
|
});
|
|
@ -11,10 +11,10 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="grid center">
|
<main class="grid center">
|
||||||
<button class="btn cbtn"><i class="fas fa-cog after"></i></button>
|
<button class="btn cbtn"><i class="fas fa-cog"></i></button>
|
||||||
<button class="btn cbtn"><i class="fas fa-cog after"></i></button>
|
<button class="btn cbtn"><i class="fas fa-cog"></i></button>
|
||||||
<button class="btn cbtn"><i class="fas fa-cog after"></i></button>
|
<button class="btn cbtn"><i class="fas fa-cog"></i></button>
|
||||||
<button class="btn cbtn"><i class="fas fa-cog after"></i></button>
|
<button class="btn cbtn"><i class="fas fa-cog"></i></button>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user