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

Make the new year's theme fire a huge rocket at midnight #546

Open
JakobTopholt opened this issue Dec 31, 2024 · 5 comments
Open

Make the new year's theme fire a huge rocket at midnight #546

JakobTopholt opened this issue Dec 31, 2024 · 5 comments

Comments

@JakobTopholt
Copy link
Contributor

JakobTopholt commented Dec 31, 2024

I think it would be a nice touch to make the new year's theme fire a big rocket at midnight. I might even make it myself 😳

@naeimehnajafi
Copy link

Hi, I’d like to work on this issue! Could you please assign it to me?

@JakobTopholt
Copy link
Contributor Author

@naeimehnajafi Go for it.

@naeimehnajafi
Copy link

naeimehnajafi commented Jan 2, 2025

Hi, I’ve completed the following tasks for this issue:

  • Added the New Year’s theme configuration to themes.json.
  • Created newyear.html, newyear.css, and newyear.js under the appropriate directory.
  • Verified file paths and updated the JSON configuration.

However, I’m encountering an issue during the GitHub Pages build. The build fails with the following error:
Liquid syntax error (line 69): Unknown tag 'themes_static' in themes.md

Steps I Took:

  1. Updated themes.json with the correct paths for the new theme files.
  2. Created the required files in the themes/ directory.
  3. Set up GitHub Pages for testing.

Request for Help:

Could you please advise if there’s a specific way to handle the themes_static tag?

@JakobTopholt
Copy link
Contributor Author

@atjn I think ur the man for this question.

@Daniel21b
Copy link

Daniel21b commented Jan 6, 2025

The documentation it's used in HTML templates to reference static files within themes.
The correct syntax is:

img src="{% themes_static 'mytheme/image.svg' %}">

Since there's no direct CSS solution, you should use inline styles in HTML:

div style="background-image:url({% themes_static 'mytheme/image.svg' %})">

For JavaScript files, instead of using the template tag, you should use the global variable,
const src = themes_static_url + "mytheme/image.svg";

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

3 participants