sexyfy
This commit is contained in:
parent
e0181fb930
commit
d08c3cc0a1
4 changed files with 43 additions and 33 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
{{ define "navigation" }}
|
{{ define "navigation" }}
|
||||||
{{ partial "body/navigation.html" . }}
|
{{ partial "body/navigation.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
@ -11,6 +13,47 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main>
|
<main>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
/* Apply grayscale to the root HTML element (affects children) */
|
||||||
|
html {
|
||||||
|
filter: grayscale(100%);
|
||||||
|
transition: filter 5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Color mode (when scrolling) */
|
||||||
|
html.color-mode {
|
||||||
|
filter: grayscale(0%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix for child elements inheriting filters incorrectly */
|
||||||
|
html * {
|
||||||
|
filter: none !important; /* Prevents double-filtering */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Only run on mobile
|
||||||
|
if (window.matchMedia("(max-width: 768px)").matches) {
|
||||||
|
let scrollTimeout;
|
||||||
|
const html = document.documentElement;
|
||||||
|
|
||||||
|
window.addEventListener('scroll', () => {
|
||||||
|
// Add color mode
|
||||||
|
html.classList.add('color-mode');
|
||||||
|
|
||||||
|
// Reset timeout on scroll
|
||||||
|
clearTimeout(scrollTimeout);
|
||||||
|
|
||||||
|
// Revert to grayscale after 1 second of no scrolling
|
||||||
|
scrollTimeout = setTimeout(() => {
|
||||||
|
html.classList.remove('color-mode');
|
||||||
|
}, 1000);
|
||||||
|
}, { passive: true }); // Optimized for performance
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
{{ partial "body/now.html" . }}
|
{{ partial "body/now.html" . }}
|
||||||
|
|
||||||
{{ partial "body/discog.html" . }}
|
{{ partial "body/discog.html" . }}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,6 @@
|
||||||
<style>
|
<style>
|
||||||
#gancio {
|
#gancio {
|
||||||
|
|
||||||
* {
|
|
||||||
filter: grayscale(100%);
|
|
||||||
transition: filter 17s linear;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
*:hover {
|
|
||||||
filter: grayscale(0%) !important;
|
|
||||||
transition: filter .1s linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,6 @@
|
||||||
<style>
|
<style>
|
||||||
#gang {
|
#gang {
|
||||||
|
|
||||||
* {
|
|
||||||
filter: grayscale(100%);
|
|
||||||
transition: filter 17s linear;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
*:hover {
|
|
||||||
filter: grayscale(0%) !important;
|
|
||||||
transition: filter .1s linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,6 @@
|
||||||
|
|
||||||
#peertube {
|
#peertube {
|
||||||
|
|
||||||
* {
|
|
||||||
filter: grayscale(100%);
|
|
||||||
transition: filter 17s linear;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
*:hover {
|
|
||||||
filter: grayscale(0%) !important;
|
|
||||||
transition: filter .1s linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue