Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@
}
}

@-moz-keyframes spin {
100% {
-moz-transform: rotate(360deg);
}
}

@-webkit-keyframes spin {
100% {
-webkit-transform: rotate(360deg);
}
}

@keyframes spin {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}

@keyframes root-gradient {
0% {
opacity: 0;
Expand Down Expand Up @@ -279,6 +298,12 @@ main p:nth-child(4) {
animation-delay: calc(var(--logo-tiles-in-delay) * 3);
}

.spin {
-webkit-animation: spin 0.5s linear;
-moz-animation: spin 0.5s linear;
animation: spin 0.5s linear;
}

/* Main */

main h1 {
Expand All @@ -294,15 +319,19 @@ main h1 {
main p {
animation: var(--move-in-animation);
}

main p:nth-of-type(1) {
animation-delay: calc(var(--move-in-base-delay) * 5);
}

main p:nth-of-type(2) {
animation-delay: calc(var(--move-in-base-delay) * 6);
}

main p:nth-of-type(3) {
animation-delay: calc(var(--move-in-base-delay) * 7);
}

main p:nth-of-type(4) {
animation-delay: calc(var(--move-in-base-delay) * 8);
}
Expand Down
24 changes: 24 additions & 0 deletions docs/theme/theme.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
var $body = document.body;
var activeTheme = "dark";
var mstiles = [
"logo-tile--red",
"logo-tile--green",
"logo-tile--blue",
"logo-tile--yellow"
];
var next = 0;

document.querySelector(".theme").onclick = function(e) {
$body.classList.remove("js-theme-" + activeTheme);
activeTheme = activeTheme === "dark" ? "light" : "dark";
$body.classList.add("js-theme-" + activeTheme);
};

function clearClass(x) {
setTimeout(function() {
x.remove("spin");
}, 1200);
}

document.onclick = function(e) {
var el = document.getElementsByClassName(mstiles[next]);
var elClasses = el[0].classList;
elClasses.add("spin");
clearClass(elClasses);
next++;
if (next >= 4) {
next = 0;
}
};