Commit Graph

3 Commits

Author SHA1 Message Date
de92f73f58 fix(i18n): register _() Jinja2 global and current_locale in error handlers
All checks were successful
ci/woodpecker/pr/pipeline Pipeline was successful
Error handlers had a separate Jinja2Templates instance without the _
global function, causing UndefinedError when rendering base.html
(which now calls {{ _(key, current_locale) }}).

- Register _() from translator module as Jinja2 global on error_handlers templates
- Add current_locale to get_template_context() from request.state.locale
2026-05-10 16:48:56 +03:00
41b6698c55 fix: add nl2br filter and fix TemplateResponse arguments
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/type Pipeline failed
- Add nl2br Jinja2 filter to convert newlines to <br> tags
- Fix TemplateResponse argument order (request first) in error handlers
- Fix type annotations for mypy
- All 97 tests passing
2026-05-02 16:48:44 +03:00
b1878e470f feat(ui): add error handling, flash messages and SEO optimization
- Add custom error pages (404, 403, 500) with user-friendly messages
- Add flash message system with signed cookies for security
- Add toast notifications with auto-dismiss and manual close
- Add comprehensive SEO meta tags (description, keywords, OG, Twitter)
- Add canonical URLs for SEO
- Update routes to use slug-based URLs (/posts/{slug} instead of /posts/{id})
- Add Open Graph and Twitter Card meta tags for social sharing
- Add favicon SVG
- Update all templates with proper meta tags and URLs
- Add error handlers registration in main.py
- Add flash middleware for request handling
- Install itsdangerous dependency
2026-05-02 16:23:57 +03:00