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:
15
routes/changelog.py
Normal file
15
routes/changelog.py
Normal 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)
|
||||
Reference in New Issue
Block a user