{% set header_menus = menu_service.findByLocation('header') %} {% set footer_nav_menus = menu_service.findByLocation('footer_nav') %} {% set footer_legal_menus = menu_service.findByLocation('footer_legal') %} {% set menus = header_menus %} {% set widget_articles = widget_service.findLastArticle %} {% set widget_article = widget_articles['0'] | default(null) %} {% set categories = widget_service.findCategories %} {% set site = seo_service.currentSite %} {% set _preview_theme = app.request.query.get('_preview_theme') %} {% set _is_preview = _preview_theme and is_granted('ROLE_ADMIN') and theme_service.getTheme(_preview_theme) is not null %} {% set _theme = _is_preview ? _preview_theme : site.template|default('default') %} {% set _theme_config = theme_service.getConfig(_theme) %} {% set _theme_vars = theme_service.getThemeVars(_theme) %} {% set _appearance = _is_preview ? theme_service.resolveAppearanceForTheme(_theme) : theme_service.resolveAppearance() %} {# ====== SEO ====== #} {% block seo %} {{ seo.title|default(site.defaultSeoTitle|default(site.name|default('Blog&Web'))) }} {% if seo.description|default(site.defaultSeoDescription|default('')) is not empty %} {% endif %} {% if seo.keywords|default('') is not empty %} {% endif %} {% if seo.noIndex|default(false) %} {% endif %} {% if seo.canonicalUrl|default('') is not empty %} {% endif %} {# Open Graph #} {% if seo.image|default('') is not empty %} {% else %} {% endif %} {# Twitter Cards #} {% if seo.image|default('') is not empty %} {% else %} {% endif %} {# Google Search Console #} {% if site.googleSearchConsole|default('') is not empty %} {% endif %} {% endblock %} {# ====== JSON-LD Schema.org ====== #} {% block jsonld %}{% endblock %} {# ====== Favicon ====== #} {% if site is not null and site.favicon is not null %} {% else %} {% endif %} {# ====== CSS Custom Properties ====== #} {# ====== Google Fonts (dynamic from resolved fonts) ====== #} {% block stylesheets %} {{ encore_entry_link_tags('app') }} {% endblock %} {# ====== Theme CSS (conditionally loaded) ====== #} {% if _theme != 'default' and theme_service.hasTemplate(_theme, 'theme.css') %} {% endif %} {% block javascripts %} {{ encore_entry_script_tags('app') }} {% endblock %} {# Google Analytics is loaded by cookie consent controller #} {% if _is_preview %} {% endif %} {# ====== PREVIEW BANNER (hidden when inside iframe — overlay has its own bar) ====== #} {% if _is_preview %} {% endif %} {# ====== HEADER (theme-aware) ====== #} {% include [ 'themes/' ~ _theme ~ '/_header.html.twig', 'themes/default/_header.html.twig' ] %} {% for label, messages in app.flashes %} {% for message in messages %}
{% endfor %} {% endfor %} {% block body %}{% endblock %} {# ====== FOOTER (theme-aware) ====== #} {% include [ 'themes/' ~ _theme ~ '/_footer.html.twig', 'themes/default/_footer.html.twig' ] %} {# ====== PREVIEW: rewrite all internal links to keep ?_preview_theme ====== #} {% if _is_preview %} {% endif %} {# ====== COOKIE CONSENT ====== #} {% include '_partials/_cookie_consent.html.twig' %}