Skip to content

Commit

Permalink
Fix #3785
Browse files Browse the repository at this point in the history
  • Loading branch information
jgthms committed Apr 17, 2024
1 parent a38cd56 commit fb1dc09
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
21 changes: 14 additions & 7 deletions docs/_sass/home/amis.scss
Expand Up @@ -5,27 +5,35 @@
background-color: cv.getVar("scheme-main");
display: grid;
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
row-gap: 0.5rem;
gap: 0;
position: relative;
margin: 0 -1rem;
justify-content: center;
}

.bd-ami {
background-color: var(--color);
display: inline-flex;
align-items: center;
border-radius: 0.25rem;
justify-content: center;
padding: 0.75rem;
height: 5rem;
position: relative;
vertical-align: top;
mix-blend-mode: luminosity;
transition-duration: cv.getVar("duration");
transition-property: background-color, mix-blend-mode;
transition-property: background-color, transform;
transform-origin: center;

&:hover {
background-color: var(--color);
mix-blend-mode: normal;
border-radius: 0.5rem;
transform: scale(1.2);
z-index: 1;
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

&:active {
transform: scale(1.15);
box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.5);
}
}

Expand All @@ -39,7 +47,6 @@
.bd-ami-footer {
border-radius: 0.25rem;
height: 4rem;
mix-blend-mode: normal;
}

.bd-ami-footer img {
Expand Down
20 changes: 13 additions & 7 deletions docs/assets/css/website.css
Expand Up @@ -34429,27 +34429,34 @@ has-background-moon.is-hoverable:active {
background-color: var(--bulma-scheme-main);
display: grid;
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
row-gap: 0.5rem;
gap: 0;
position: relative;
margin: 0 -1rem;
justify-content: center;
}

.bd-ami {
background-color: var(--color);
display: inline-flex;
align-items: center;
border-radius: 0.25rem;
justify-content: center;
padding: 0.75rem;
height: 5rem;
position: relative;
vertical-align: top;
mix-blend-mode: luminosity;
transition-duration: var(--bulma-duration);
transition-property: background-color, mix-blend-mode;
transition-property: background-color, transform;
transform-origin: center;
}
.bd-ami:hover {
background-color: var(--color);
mix-blend-mode: normal;
border-radius: 0.5rem;
transform: scale(1.2);
z-index: 1;
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}
.bd-ami:active {
transform: scale(1.15);
box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.5);
}

.bd-ami img {
Expand All @@ -34462,7 +34469,6 @@ has-background-moon.is-hoverable:active {
.bd-ami-footer {
border-radius: 0.25rem;
height: 4rem;
mix-blend-mode: normal;
}

.bd-ami-footer img {
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/css/website.min.css

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions docs/assets/javascript/home.js
Expand Up @@ -52,7 +52,7 @@ document.addEventListener("DOMContentLoaded", () => {
circle: "b",
},
skeletons: {
startAngle: 0,
startAngle: -300,
circle: "b",
},
dark: {
Expand Down Expand Up @@ -112,12 +112,20 @@ document.addEventListener("DOMContentLoaded", () => {
};

const $dots = document.querySelectorAll(".js-dot");
const reducedMotion =
window.matchMedia(`(prefers-reduced-motion: reduce)`) === true ||
window.matchMedia(`(prefers-reduced-motion: reduce)`).matches === true;

$dots.forEach(($dot) => {
const id = $dot.dataset.id;
setInterval(() => {

if (reducedMotion) {
animate($dot, id);
}, 10);
} else {
setInterval(() => {
animate($dot, id);
}, 10);
}
});

// Grid
Expand Down

0 comments on commit fb1dc09

Please sign in to comment.