feat: Add static changelog page

Adds a new static page accessible at /changelog to display site updates and changes manually.

- Creates a new Flask Blueprint in `routes/changelog.py` to handle the route logic.
- Registers the `changelog_bp` blueprint in `app.py`.
- Creates the corresponding template `templates/changelog/changelog.html` extending the base layout.
- Adds a link to the Changelog page in the main sidebar navigation in `templates/base.html`, using an archive icon for consistency.
- Applies basic card styling to the changelog page content for improved visual structure.
This commit is contained in:
Peter Stockings
2025-03-30 21:30:25 +11:00
parent 39e91f2655
commit 2465cad005
4 changed files with 66 additions and 2 deletions

15
routes/changelog.py Normal file
View File

@@ -0,0 +1,15 @@
from flask import Blueprint, render_template, current_app
from flask_htmx import htmx
from jinja2_fragments import render_block
changelog_bp = Blueprint('changelog', __name__)
@changelog_bp.route('/')
def show_changelog():
"""Renders the changelog page."""
template_name = 'changelog/changelog.html' # Path relative to templates/
if htmx:
# If request is from HTMX, render only the content block
return render_block(current_app.jinja_env, template_name, 'content')
# Otherwise, render the full page
return render_template(template_name)