mirror of
https://github.com/tmdinosaurcenter/kiosk-guestbook.git
synced 2026-06-04 00:17:44 -06:00
fix: correct marquee scroll speed and add code TODOs
- Fixed scrolling marquee to use a fixed px/s speed via JS instead of a fixed duration, preventing it from speeding up as entries are added - Added inline TODO comments throughout codebase to track known issues (rate limiting, CSRF, unbounded queries, deprecated Flask decorator, PII logging, schema versioning, Docker non-root user, etc.) - Added todo-to-issue GitHub Action to auto-create Issues from TODOs on push to main - Added .claude/ to .gitignore
This commit is contained in:
@@ -23,12 +23,12 @@
|
||||
.scrolling-content {
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
animation: scroll-left 20s linear infinite;
|
||||
animation: scroll-left linear infinite;
|
||||
}
|
||||
|
||||
@keyframes scroll-left {
|
||||
0% {
|
||||
transform: translateX(100%);
|
||||
transform: translateX(100vw);
|
||||
}
|
||||
|
||||
100% {
|
||||
@@ -107,6 +107,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Set scrolling speed to a fixed pixels-per-second rate -->
|
||||
<script>
|
||||
(function () {
|
||||
const pixelsPerSecond = 80;
|
||||
const content = document.querySelector(".scrolling-content");
|
||||
|
||||
function updateScrollSpeed() {
|
||||
const totalDistance = window.innerWidth + content.offsetWidth;
|
||||
content.style.animationDuration = (totalDistance / pixelsPerSecond) + "s";
|
||||
}
|
||||
|
||||
updateScrollSpeed();
|
||||
window.addEventListener("resize", updateScrollSpeed);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- JavaScript to reveal the comment field -->
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
Reference in New Issue
Block a user