[754] add favicon links using apos.asset.url in extraHead block - #201
Conversation
📝 WalkthroughWalkthroughThe layout template was reformatted for improved readability and maintainability. A new Changes
Sequence Diagram(s)sequenceDiagram
participant Browser
participant LayoutTemplate
Browser->>LayoutTemplate: Request page
LayoutTemplate->>LayoutTemplate: Render <head> section
LayoutTemplate->>LayoutTemplate: Insert favicon via extraHead block
LayoutTemplate->>LayoutTemplate: Render title block
LayoutTemplate->>LayoutTemplate: Render beforeMain, main, afterMain blocks
LayoutTemplate-->>Browser: Return rendered HTML
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
website/views/layout.html (2)
15-17: Consider providing a complete favicon set for wider device/browser supportThe single
favicon.icois fine for legacy desktop browsers, but most modern platforms (iOS / Android / Windows tiles / high-dpi desktops) look for PNG or SVG files of specific sizes and link-relations (apple-touch-icon,iconwithsizes="32x32"etc.).
Refactoring this block into a small favicon bundle will improve UX and remove extra 404s from devices that automatically probe those files.{% block extraHead %} - <link rel="icon" href="{{ apos.asset.url('/modules/asset/favicon/favicon.ico') }}" type="image/x-icon"> + <link rel="icon" type="image/x-icon" href="{{ apos.asset.url('/modules/asset/favicon/favicon.ico') }}"> + <link rel="icon" type="image/png" sizes="32x32" href="{{ apos.asset.url('/modules/asset/favicon/favicon-32x32.png') }}"> + <link rel="icon" type="image/png" sizes="16x16" href="{{ apos.asset.url('/modules/asset/favicon/favicon-16x16.png') }}"> + <link rel="apple-touch-icon" sizes="180x180" href="{{ apos.asset.url('/modules/asset/favicon/apple-touch-icon.png') }}"> {% endblock %}No functional breakage if you keep the current line; this is purely an enhancement.
27-34: Silence HTMLHint false positives by isolating the conditional attributeHTMLHint flags
attr-no-duplicationbecause the{% if not data.user %}injects an attribute mid-tag.
You can avoid the warning (and gain a cleaner diff) by moving the conditional out:-<main - class="bp-main" - role="main" - id="main" - {% if not data.user %} - data-barba="container" - {% endif %} -> +{% set barbaAttr = '' if data.user else 'data-barba="container"' %} +<main class="bp-main" role="main" id="main" {{ barbaAttr|safe }}>Same output, cleaner markup, and static analyzers stay quiet.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
website/modules/asset/public/favicon/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (1)
website/views/layout.html(1 hunks)
🧰 Additional context used
🪛 HTMLHint (1.5.0)
website/views/layout.html
[error] 1-1: Doctype must be declared before any non-comment content.
(doctype-first)
[error] 33-33: Duplicate of attribute name [ {% ] was found.
(attr-no-duplication)
[error] 33-33: Duplicate of attribute name [ %} ] was found.
(attr-no-duplication)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: e2e-tests
- GitHub Check: unit-tests
- GitHub Check: lint
- GitHub Check: security-scan
- GitHub Check: Analyze (javascript-typescript)
|



Changes:
Added favicon.ico to modules/asset/public/favicon/
Updated website/views/layout.html to include favicon tags inside the extraHead block
Used apos.asset.url() to generate correct asset URLs for the favicon