1
0
Fork
You've already forked merch
0
forked from chaos-nah/merch
No description
  • Jinja 36.4%
  • CSS 32.7%
  • SCSS 14.6%
  • Python 9%
  • JavaScript 7%
  • Other 0.2%
2026年06月03日 23:08:03 +02:00
.forgejo/workflows CICD: Post staging URL automatically 2026年04月03日 13:06:00 +02:00
data add "hack and der ruhr 2026" 2026年06月03日 21:11:13 +02:00
datasheets add "hack and der ruhr 2026" 2026年06月03日 21:11:13 +02:00
images add "hack and der ruhr 2026" 2026年06月03日 21:11:13 +02:00
locales use new target system 2025年12月08日 20:23:40 +01:00
script add filter data & update model data with actual fits 2026年03月01日 17:27:23 +01:00
style fix highlight colors 2026年03月31日 22:04:45 +02:00
templates add filter data & update model data with actual fits 2026年03月01日 17:27:23 +01:00
.gitignore WIP static site generation; major restructuring 2025年07月07日 13:39:09 +02:00
.mailmap Add .mailmap and map old forgejo mail 2026年05月01日 09:55:37 +02:00
.prettierrc.json Allow linewidth of 120 for scss files 2025年12月07日 13:17:33 +01:00
.python-version Change python version for compatibility reasons 2025年11月02日 14:38:39 +01:00
babel.cfg add translation logic 2025年10月15日 16:11:38 +02:00
build.sh replace pipenv by uv 2025年11月02日 01:42:31 +01:00
Caddyfile.dev Fix Caddyfiles for new deployment 2025年12月13日 21:21:56 +01:00
Caddyfile.example.proxy Fix Caddyfiles for new deployment 2025年12月13日 21:21:56 +01:00
generate.py add filter data & update model data with actual fits 2026年03月01日 17:27:23 +01:00
pyproject.toml reformat with new black version 2026年02月25日 11:37:16 +01:00
README.md Allow linewidth of 120 for scss files 2025年12月07日 13:17:33 +01:00
shell.nix Fix uv on NixOS 2025年11月02日 12:51:15 +01:00
uv.lock reformat with new black version 2026年02月25日 11:37:16 +01:00

How to add a new event

  1. add new models to data/models.json
    • add the datasheets to datasheets/
  2. add all products to a new event-file data/events/<eventname>.json
    • add product photos to images/
  3. (optional) add a custom theme to style/<eventname>.css
    • for further information see style/example_event.css

Build project

Generate static files

uv sync
./build.sh

Manage translations in locales/

To search for new translation strings in the templates run

uv run pybabel extract -F babel.cfg -o locales/messages.pot .
uv run pybabel update -i locales/messages.pot -d locales

To compile the translation files run

uv run pybabel compile -d locales

Adaptive privacy policy with caddy

The privacy policy page can adapt to the domain it is hosted on, when you enable caddy templating for it. You have to set the variable privacy_mode to one of the following values:

  • main (no proxy, main instance)
  • cname (no proxy, only DNS CNAME delegation)
  • proxy (proxy, traffic comes from another server)

See Caddyfile.example.proxy for an example on how to use this for a proxied domain:

vars privacy_mode "proxy"@privacy path /de/privacy/* /en/privacy/*
handle @privacy {
 root * /srv
 templates
 file_server
}

Tooling

For development and generating useful diffs, a consistent code style is important. That is why we use the following formatters for the specified languages:

  • HTML, CSS, SCSS, JavaScript, JSON: prettier
    • JSON & SCSS with a line length of 120 chars
    • All other files: default settings
  • Jinja2 Templates: djLint
    • uv run djlint ./templates/ --extension=html.j2 --reformat
  • Python: black
    • Default settings
    • We decided to keep the default 88 chars per line instead of PEP8's 79

To compile SCSS into CSS we use dart-sass in its default settings (that is, expanded style) based on the prettier-formatted SCSS file.