Make home aside webrings list collapsable.

This commit is contained in:
天クマ 2026-07-10 13:35:10 -03:00
commit c6ef4ff68c
5 changed files with 64 additions and 26 deletions

View file

@ -89,6 +89,7 @@ module.exports = {
nextSite: "next site", nextSite: "next site",
random: "random", random: "random",
showMore: "Show more", showMore: "Show more",
showLess: "Show less",
previous: "previous", previous: "previous",
next: "next", next: "next",
about: "about", about: "about",
@ -179,6 +180,7 @@ module.exports = {
nextSite: "próximo site", nextSite: "próximo site",
random: "aleatório", random: "aleatório",
showMore: "Ver mais", showMore: "Ver mais",
showLess: "Ver menos",
previous: "anterior", previous: "anterior",
next: "próximo", next: "próximo",
about: "sobre", about: "sobre",

View file

@ -3,29 +3,6 @@
<div id="headerTitle"> <div id="headerTitle">
<h1>{{ title or "Adrian Victor" }}</h1> <h1>{{ title or "Adrian Victor" }}</h1>
<p id="headerSubtitle"><i>{{ subtitle or "Fanasy is not a crime, find your castle in the sky." }}</i></p> <p id="headerSubtitle"><i>{{ subtitle or "Fanasy is not a crime, find your castle in the sky." }}</i></p>
<script>
const headeri18n =
{
by: "{{ i18n[langKey].by | safe }}",
options: "{{ i18n[langKey].options | safe }}",
hideBackground: "{{ i18n[langKey].hideBackground | safe }}",
back: "{{ i18n[langKey].back | safe }}",
permissionIssue: "{{ i18n[langKey].permissionIssue | safe }}",
permissionIssueNotificationContent: "{{ i18n[langKey].permissionIssueNotificationContent | safe }}",
notificationDefaultHint: "{{ i18n[langKey].notificationDefaultHint | safe }}",
disableSoundEffects: "{{ i18n[langKey].disableSoundEffects | safe }}",
windsArtAlt: "{{ i18n[langKey].windsArtAlt | safe }}",
velkommenArtAlt: "{{ i18n[langKey].velkommenArtAlt | safe }}",
pgArtAlt: "{{ i18n[langKey].pgArtAlt | safe }}",
gearsAlt: "{{ i18n[langKey].gearsAlt | safe }}",
soundOffAlt: "{{ i18n[langKey].soundOffAlt | safe }}",
soundOnAlt: "{{ i18n[langKey].soundOnAlt | safe }}",
volumeSliderAlt: "{{ i18n[langKey].volumeSliderAlt | safe }}",
backgroundCheckAlt: "{{ i18n[langKey].backgroundCheckAlt | safe }}",
sfxCheckboxAlt: "{{ i18n[langKey].sfxCheckboxAlt | safe }}",
songSelectAlt: "{{ i18n[langKey].songSelectAlt | safe }}",
}
</script>
</div> </div>
<div id="linksHelper"> <div id="linksHelper">
<div id="music"></div> <div id="music"></div>

View file

@ -16,15 +16,53 @@ headerLink: home
<div id="homeSquares"></div> <div id="homeSquares"></div>
<script src="{{ '/static/scripts/home.js' | url }}" defer></script> <script src="{{ '/static/scripts/home.js' | url }}" defer></script>
<script>
const headeri18n =
{
by: "{{ i18n[langKey].by | safe }}",
options: "{{ i18n[langKey].options | safe }}",
hideBackground: "{{ i18n[langKey].hideBackground | safe }}",
back: "{{ i18n[langKey].back | safe }}",
permissionIssue: "{{ i18n[langKey].permissionIssue | safe }}",
permissionIssueNotificationContent: "{{ i18n[langKey].permissionIssueNotificationContent | safe }}",
notificationDefaultHint: "{{ i18n[langKey].notificationDefaultHint | safe }}",
disableSoundEffects: "{{ i18n[langKey].disableSoundEffects | safe }}",
windsArtAlt: "{{ i18n[langKey].windsArtAlt | safe }}",
velkommenArtAlt: "{{ i18n[langKey].velkommenArtAlt | safe }}",
pgArtAlt: "{{ i18n[langKey].pgArtAlt | safe }}",
gearsAlt: "{{ i18n[langKey].gearsAlt | safe }}",
soundOffAlt: "{{ i18n[langKey].soundOffAlt | safe }}",
soundOnAlt: "{{ i18n[langKey].soundOnAlt | safe }}",
volumeSliderAlt: "{{ i18n[langKey].volumeSliderAlt | safe }}",
backgroundCheckAlt: "{{ i18n[langKey].backgroundCheckAlt | safe }}",
sfxCheckboxAlt: "{{ i18n[langKey].sfxCheckboxAlt | safe }}",
songSelectAlt: "{{ i18n[langKey].songSelectAlt | safe }}",
showMore: "{{ i18n[langKey].showMore | safe }}",
showLess: "{{ i18n[langKey].showLess | safe }}",
}
</script>
<main id="boxChain"> <main id="boxChain">
<noscript> <noscript>
<style> <style>
.hs { .hs {
display: unset !important; display: unset !important;
} }
#homeSquares { #homeSquares {
display: none; display: none;
} }
#homeWebrings.less {
overflow: unset;
max-height: unset;
-webkit-mask: none;
mask: none;
}
#homeWebringsShowMore {
display: none;
}
</style> </style>
</noscript> </noscript>
@ -189,7 +227,7 @@ headerLink: home
<p class="end-text"><a href="{{ ('/' ~ langKey ~ '/blog/') | url }}">{{ i18n[langKey].showMore }}</a></p> <p class="end-text"><a href="{{ ('/' ~ langKey ~ '/blog/') | url }}">{{ i18n[langKey].showMore }}</a></p>
</div> </div>
<div id="homeWebrings"> <div id="homeGuestbook">
<div> <div>
<h1 class="nomargin negativeMargin">Guestbook</h1> <h1 class="nomargin negativeMargin">Guestbook</h1>
<hr style="margin-bottom: .4em;"> <hr style="margin-bottom: .4em;">
@ -213,7 +251,7 @@ headerLink: home
<p style="text-align: center;"><a href="{{ ('/' ~ langKey ~ '/misc/hotlinking') | url }}">{{ i18n[langKey].addMe }}?</a></p> <p style="text-align: center;"><a href="{{ ('/' ~ langKey ~ '/misc/hotlinking') | url }}">{{ i18n[langKey].addMe }}?</a></p>
</div> </div>
<div id="homeWebrings"> <div id="homeWebrings" class="less">
<div> <div>
<h1 class="nomargin negativeMargin">Webrings</h1> <h1 class="nomargin negativeMargin">Webrings</h1>
<hr style="margin-bottom: .4em;"> <hr style="margin-bottom: .4em;">
@ -265,6 +303,8 @@ headerLink: home
{% include 'widgets/droidring.html' %} {% include 'widgets/droidring.html' %}
</div> </div>
<a id="homeWebringsShowMore">{{ i18n[langKey].showMore }}...</a>
{% include 'widgets/internetometer-aside.html' %} {% include 'widgets/internetometer-aside.html' %}
<footer class="end-text"> <footer class="end-text">

View file

@ -925,6 +925,17 @@ header div:first-child {
height: fit-content; height: fit-content;
} }
#homeWebrings.less {
max-height: 30em;
overflow: hidden;
--mask: linear-gradient(to bottom,
rgba(0,0,0, 1) 0, rgba(0,0,0, 1) 85%,
rgba(0,0,0, 0) 95%, rgba(0,0,0, 0) 0
) 100% 50% / 100% 100% repeat-x;
-webkit-mask: var(--mask);
mask: var(--mask);
}
#homeBlog p { #homeBlog p {
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;

View file

@ -49,3 +49,11 @@ function updateSquare() {
selectedSquareDiv = div.id; selectedSquareDiv = div.id;
div.classList.toggle("selected"); div.classList.toggle("selected");
} }
const homeWebrings = document.getElementById("homeWebrings");
const homeWebringsShowMore = document.getElementById("homeWebringsShowMore");
homeWebringsShowMore.addEventListener("click", () => {
homeWebrings.classList.toggle("less");
homeWebringsShowMore.textContent = homeWebrings.classList.contains("less") ? headeri18n.showMore : headeri18n.showLess;
});