From 841918d67d0ffaa6a1efdc8421a7b3234e0d1fd2 Mon Sep 17 00:00:00 2001 From: Tiago Correia Date: Fri, 12 Jun 2026 10:52:11 +0100 Subject: [PATCH] feat(branding): add logo/favicon, rename to Librarian, widen layout Wire docs/icon.svg into the app as both favicon and inline logo: served under static/ via a committed symlink in dev and a real copy baked in at Docker build time. Add a reusable _brand.html partial (logo + wordmark) and include it across all pages. Rename the brand from "TKC Library" to "Librarian" in titles, headings, and the wordmark. The physical-location reference in the about page ("TKC Library at Kirby Street") is left as-is. Widen the page container from 720px to 1080px so the book grid has more room. Co-Authored-By: Claude Opus 4.8 (1M context) --- Dockerfile | 9 ++ app/about/templates/about/about.html | 4 +- app/admin/templates/admin/borrowers.html | 4 +- app/admin/templates/admin/dashboard.html | 4 +- app/admin/templates/admin/users.html | 4 +- .../templates/borrower/borrow_history.html | 2 +- .../templates/borrower/dashboard.html | 2 +- app/library/templates/library/add_book.html | 4 +- app/library/templates/library/dashboard.html | 4 +- app/library/templates/library/index.html | 7 +- app/static/brand/logo.svg | 1 + app/templates/_brand.html | 7 ++ app/templates/base.html | 19 +++- docs/icon.svg | 90 +++++++++++++++++++ 14 files changed, 140 insertions(+), 21 deletions(-) create mode 120000 app/static/brand/logo.svg create mode 100644 app/templates/_brand.html create mode 100644 docs/icon.svg diff --git a/Dockerfile b/Dockerfile index 4f32991..e629f9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,15 @@ RUN pip install --no-cache-dir --no-index --find-links=/wheels /wheels/* \ COPY --chown=app:app . . RUN chmod +x entrypoint.sh +# Materialise the brand asset as a real file. In dev, app/static/brand/logo.svg +# is a symlink to docs/icon.svg (live editing); here we replace it with a copy +# so the runtime image is self-contained and doesn't depend on symlink +# resolution or docs/ surviving in the image. Idempotent: -f removes the +# symlink (or stale copy) first. +RUN rm -f app/static/brand/logo.svg \ + && cp docs/icon.svg app/static/brand/logo.svg \ + && chown app:app app/static/brand/logo.svg + USER app ENV FLASK_APP=wsgi.py \ diff --git a/app/about/templates/about/about.html b/app/about/templates/about/about.html index 6cb2c9e..61cb12b 100644 --- a/app/about/templates/about/about.html +++ b/app/about/templates/about/about.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}About — TKC Library{% endblock %} +{% block title %}About — Librarian{% endblock %} {% block extra_styles %}