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.
- {# djlint:off #} - - {# djlint:on #} - -

{{ contest.name }} ends in

-
+ const self = me(); + onloadAdd(() => countdown(self)); +     : @@ -102,4 +127,4 @@    
-
+ \ No newline at end of file diff --git a/server/vb/templates/components/logo_specimen.dhtml b/server/vb/templates/components/logo_specimen.dhtml index 55e5509..f41e154 100644 --- a/server/vb/templates/components/logo_specimen.dhtml +++ b/server/vb/templates/components/logo_specimen.dhtml @@ -1,25 +1,25 @@ {% with width=width|default:"32px" height=height|default:"32px" %}
diff --git a/server/vb/templates/includes/faq.dhtml b/server/vb/templates/includes/faq.dhtml index 786cdb3..65dd190 100644 --- a/server/vb/templates/includes/faq.dhtml +++ b/server/vb/templates/includes/faq.dhtml @@ -1,54 +1,66 @@

F.A.Q.

What is the Voter Bowl?

- 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.

How do I claim my prize?

- 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 @@

What is the goal of the Voter Bowl?

- 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.

Who is paying for the Voter Bowl?

- 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.

-
+

I have another question.

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 %}