Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move calendar inline Javascript from HTML partials to JS files #783

Open
carrythebanner opened this issue Jul 16, 2024 · 0 comments
Open

Comments

@carrythebanner
Copy link
Collaborator

Our main calendar Javascript is in the theme's /assets/js/cal folder. However, there is also some JS inline in HTML partials, in the theme's /layouts/partials/cal directory:

  • events.html
  • fullcal.html
  • up-next.html
  • pp-2020-cal.html
  • scripts.html
  • and maybe others?

We should get that JS code out of those HTML partials and into JS files, which would make it clearer where all of the JS actually lives (and also makes it easier to minify them).

Note that Hugo variables probably can't be accessed within plain JS files. But we might want to refactor uses of that anyway, as it muddies the line between the Hugo site and our calendar client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant