fix: correct WORKERS var, export path, and seamless marquee loop

- entrypoint.sh: use GUNICORN_WORKERS to match example.env (#17)
- guestbook_export.py: read DATABASE_PATH from env instead of
  hardcoded relative path (#18)
- Scrolling marquee: duplicate guest list for seamless loop,
  animate translateX(0) to translateX(-50%), increase font to
  1.25rem, fix JS speed calc to use half content width (#20)
This commit is contained in:
2026-03-09 20:52:00 -06:00
parent 2dc276f098
commit 46dca45e04
3 changed files with 16 additions and 10 deletions
+13 -5
View File
@@ -23,16 +23,17 @@
.scrolling-content {
display: inline-block;
padding: 10px;
font-size: 1.25rem;
animation: scroll-left linear infinite;
}
@keyframes scroll-left {
0% {
transform: translateX(100vw);
transform: translateX(0);
}
100% {
transform: translateX(-100%);
transform: translateX(-50%);
}
}
</style>
@@ -97,10 +98,16 @@
</div>
<!-- Scrolling Guest Entries at the Bottom -->
<!-- Content is duplicated so the loop is seamless: animate 0 → -50% -->
<div class="scrolling-wrapper">
<div class="scrolling-content">
{% for guest in guests %}
<span class="me-4">
<span class="me-5">
<strong>{{ guest[0] }}</strong> from {{ guest[1] }}
</span>
{% endfor %}
{% for guest in guests %}
<span class="me-5">
<strong>{{ guest[0] }}</strong> from {{ guest[1] }}
</span>
{% endfor %}
@@ -114,8 +121,9 @@
const content = document.querySelector(".scrolling-content");
function updateScrollSpeed() {
const totalDistance = window.innerWidth + content.offsetWidth;
content.style.animationDuration = (totalDistance / pixelsPerSecond) + "s";
// Travel distance is half the total width (one copy of the list)
const oneCopyWidth = content.offsetWidth / 2;
content.style.animationDuration = (oneCopyWidth / pixelsPerSecond) + "s";
}
updateScrollSpeed();