Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .djlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"profile": "jinja",
"indent": 4,
"max_line_length": 160,
"max_attribute_length": 500,
"preserve_blank_lines": true
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public/
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ It is a static website, built with Zola and hosted at Cloudflare pages.
- Static Site Generator: Zola v0.20.2 https://www.getzola.org/documentation/getting-started/installation
- CSS Framework: tailwindcss v4.1.10 https://tailwindcss.com/docs/installation/tailwind-cli (can be installed via brew)
- Optional: Just command runner https://github.com/casey/just
- For formatting templates: djlint https://www.djlint.com (`brew install djlint`)

## Building the Site

- If css was changed: rebuild with tailwind by running `just css`
- Preview website locally with `zola serve`

## Formatting Templates

Tera templates are formatted with [djlint](https://www.djlint.com), a Python tool purpose-built for Jinja-style templates (Tera shares Jinja syntax). Settings live in `.djlintrc`.

```bash
brew install djlint # one-time
just format # rewrite templates/**/*.html in place
just format-check # verify without writing (use in CI / pre-commit)
```

## Scripts

- `./scripts/geocode.sh` — Resolves coordinates for ecosystem entities that have an `address` but no `lat`/`lon`. Uses OpenStreetMap Nominatim. Pass `-f` to re-geocode all entries. Requires `curl` and `jq`.
Expand Down
16 changes: 16 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
# List all available recipes
default:
@just --list

# Rebuild Tailwind CSS on every change to the input CSS or templates
watch:
@tailwindcss -i static/css/_style.css -o static/css/style.css --watch

# Build the Tailwind stylesheet once
css:
@tailwindcss -i static/css/_style.css -o static/css/style.css

# Build CSS then run the Zola dev server (live reload on http://127.0.0.1:1111)
serve: css
@zola serve

# Build the static site into `public/` (production build)
build:
@zola build

# Excludes analog.com (rate-limits bots); tolerates 100/103/403/429; deletes `public/` after.
# Build the site and run the lychee link checker against the generated `public/`
lychee:
@just build
@lychee --root-dir public public --exclude ".+\.analog.com" --accept 100..=103,200..=299,403,429
@rm -r public

# djlint --reformat exits 1 on every rewrite, so swallow that here only.
# Format Tera templates with djlint (config in .djlintrc; `brew install djlint`)
format:
@djlint templates --reformat || [ $$? -eq 1 ]

# Check template formatting without writing — used in CI / pre-commit
format-check:
@djlint templates --check
46 changes: 0 additions & 46 deletions static/mec2025.ics

This file was deleted.

9 changes: 5 additions & 4 deletions templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block page_title %}Munich Embedded{% endblock %}</title>
<title>
{% block page_title %}Munich Embedded{% endblock %}
</title>

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
Expand Down Expand Up @@ -48,10 +50,9 @@
</head>

<body class="min-h-screen flex flex-col text-black">
{{ macros::navigation(page_url=current_path, page_title=page.title | default(value=section.title), lang=lang) }}
{{ macros::navigation(page_url=current_path, page_title=page.title | default(value=section.title) , lang=lang) }}

{% block content %}
{% endblock %}
{% block content %}{% endblock %}

{{ macros::footer(page_url=current_path, lang=lang) }}
</body>
Expand Down
286 changes: 135 additions & 151 deletions templates/_macros.html

Large diffs are not rendered by default.

26 changes: 12 additions & 14 deletions templates/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@
<h2 class="text-2xl md:text-3xl font-bold text-center mb-12">{{ section.title }}</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 max-w-5xl mx-auto">
{% for page in section.pages %}
<a href="{{ page.permalink }}" class="block group">
<div class="bg-white rounded-xl shadow-lg overflow-hidden border border-gray-100 hover:border-orange-500 transform hover:-translate-y-1 transition-all duration-300">
{% if page.extra.thumbnail %}
{% set thumb = resize_image(path=page.extra.thumbnail, width=600, height=340, op="fill", quality=80) %}
<div class="overflow-hidden">
<img src="{{ thumb.url }}" alt="{{ page.title }}" class="w-full h-48 object-cover group-hover:scale-105 transition-transform duration-300">
</div>
{% endif %}
<div class="p-6">
<h3 class="text-xl font-bold group-hover:text-orange-600 transition-colors duration-300 mt-2">{{ page.title }}</h3>
{% if page.extra.subtitle %}
<p class="text-gray-500 mt-1">{{ page.extra.subtitle }}</p>
<a href="{{ page.permalink }}" class="block group">
<div class="bg-white rounded-xl shadow-lg overflow-hidden border border-gray-100 hover:border-orange-500 transform hover:-translate-y-1 transition-all duration-300">
{% if page.extra.thumbnail %}
{% set thumb = resize_image(path=page.extra.thumbnail, width=600, height=340, op="fill", quality=80) %}
<div class="overflow-hidden">
<img src="{{ thumb.url }}" alt="{{ page.title }}" class="w-full h-48 object-cover group-hover:scale-105 transition-transform duration-300">
</div>
{% endif %}
<div class="p-6">
<h3 class="text-xl font-bold group-hover:text-orange-600 transition-colors duration-300 mt-2">{{ page.title }}</h3>
{% if page.extra.subtitle %}<p class="text-gray-500 mt-1">{{ page.extra.subtitle }}</p>{% endif %}
</div>
</div>
</div>
</a>
</a>
{% endfor %}
</div>
</div>
Expand Down
Loading
Loading