Files
workout/routes/changelog.py
Peter Stockings 2465cad005 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.
2025-03-30 21:30:25 +11:00

15 lines
588 B
Python

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)