Compare commits

..
Author SHA1 Message Date
Typosaurus 1917e367e7 ticket #61 attempt 1 2026-07-19 20:06:13 +00:00
4 changed files with 15 additions and 14 deletions
+2
View File
@@ -222,6 +222,8 @@
display: flex;
flex-direction: column;
gap: 1rem;
max-height: calc(100vh - var(--nav-height) - 2rem);
overflow-y: auto;
}
.daily-topic-card {
+2
View File
@@ -8,6 +8,8 @@
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
padding: 1rem;
max-height: calc(100vh - var(--nav-height) - 2rem);
overflow-y: auto;
}
.sidebar-card .sidebar-heading {
+10 -13
View File
@@ -5,21 +5,18 @@ import { OptimisticAction } from "./OptimisticAction.js";
export class VoteManager extends OptimisticAction {
constructor() {
super();
document.addEventListener("click", (event) => this.onClick(event));
this.initVoteButtons();
}
onClick(event) {
const button = event.target.closest('form[action^="/votes/"] button[type="submit"]');
if (!button) {
return;
}
const form = button.closest("form");
if (!form) {
return;
}
event.preventDefault();
event.stopPropagation();
this.cast(form, button);
initVoteButtons() {
document.querySelectorAll('form[action^="/votes/"] button[type="submit"]').forEach((button) => {
const form = button.closest("form");
button.addEventListener("click", (event) => {
event.preventDefault();
event.stopPropagation();
this.cast(form, button);
});
});
}
cast(form, button) {
+1 -1
View File
@@ -29,7 +29,7 @@ def is_self(user, uid) -> bool:
def guest_disabled(user) -> Markup:
if user:
return Markup("")
return Markup(' disabled aria-disabled="true" title="Log in to vote"')
return Markup(' disabled aria-disabled="true"')
def static_url(path) -> str: