diff --git a/.vscode/settings.json b/.vscode/settings.json index 01bfcc4..419765a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,14 +9,13 @@ "source.organizeImports.ruff": "explicit" } }, - "[html][django-html]": { - "editor.defaultFormatter": "monosans.djlint", + "[html]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": "explicit" } }, - "emmet.includeLanguages": { - "django-html": "html" + "files.associations": { + "*.dhtml": "html" } } diff --git a/jsconfig.json b/jsconfig.json index 8a8b426..f67ec8e 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -6,5 +6,8 @@ "allowJs": true, "noEmit": true }, - "include": ["server/static/js/utils.js", "*.dhtml"] + "include": [ + "server/static/js/surreal.js", + "server/static/js/css-scope-inline.js" + ] } diff --git a/server/static/js/utils.js b/server/static/js/utils.js deleted file mode 100644 index 128fd0a..0000000 --- a/server/static/js/utils.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * VoterBowl utility functions accessible globally via $vb. - * - * @namespace $vb - */ -globalThis.$vb = { - /** - * Invoke the callback exactly once, when the DOM is ready. - * - * @param {Function} callback - * @returns {void} - */ - onReady: (callback) => { - if (document.readyState !== 'loading') { - callback(); - } else { - const listener = () => { - document.removeEventListener('DOMContentLoaded', listener); - callback(); - } - document.addEventListener('DOMContentLoaded', listener); - } - } -}; diff --git a/server/vb/templates/base.dhtml b/server/vb/templates/base.dhtml index 77bd59c..b764a34 100644 --- a/server/vb/templates/base.dhtml +++ b/server/vb/templates/base.dhtml @@ -18,10 +18,9 @@ - - - - + + + {% django_htmx_script %}
@@ -30,7 +29,7 @@ VoterBowl, coming soon.{{ contest.name }} ends in
-- The Voter Bowl is a series of contests where college students win prizes + The Voter Bowl is a series of contests where college students win prizes by making sure they’re ready to vote.
- The Voter Bowl is a non-profit project of - VoteAmerica, a + The Voter Bowl is a non-profit project of + VoteAmerica, a leader in voter registration and participation.
- When you check your voter registration status by clicking the “Check My - Voter Status” while a contest is running, you are automatically entered to + When you check your voter registration status by clicking the “Check My + Voter Status” while a contest is running, you are automatically entered to win. If you win, we will notify you via your school email address.
@@ -58,24 +70,23 @@
- In the 2020 election, 33% of college students didn’t vote. We believe a + In the 2020 election, 33% of college students didn’t vote. We believe a healthy democracy depends on young people participating.
- VoteAmerica is - funding the Voter Bowl through the generous support of donors who are - passionate about building a thriving democracy. + VoteAmerica is + funding the Voter Bowl through the generous support of donors who are + passionate about building a thriving democracy.
-- - Donate to VoteAmerica to support projects like this. +
+ Donate to VoteAmerica to support projects like this.
Contact us and we'd be happy to answer it. diff --git a/server/vb/templates/school.dhtml b/server/vb/templates/school.dhtml index d8ce226..3bcefd9 100644 --- a/server/vb/templates/school.dhtml +++ b/server/vb/templates/school.dhtml @@ -7,44 +7,44 @@ {% block body %}