Localize shared marketing templates by locale

This commit is contained in:
MandelBot
2026-03-24 21:47:03 +00:00
parent ca06ab88ba
commit 643aca26d0
7 changed files with 177 additions and 6 deletions

View File

@@ -0,0 +1,40 @@
{% extends "carbasa/headers/header.html" %}
{% load i18n oxyan category_tags ocyan_main ocyanjson wagtailsettings_tags %}
{% block nav %}
{% ocyanjson "theme" "menu_depth" 1 as menu_depth %}
<div class="collapse navbar-collapse menu-bar page-menu-bar" id="navbarSupportedContent">
<div class="brand-wrapper">
{% include 'partials/brand.html' with big=True %}
</div>
<ul class="navbar-nav">
{% if request.LANGUAGE_CODE == 'nl' %}
<li class="megamenu nav-item">
<span class="overlay"></span>
<a class="toggler nav-link" tabindex="0" aria-label="{% trans 'Open Megamenu' %}">
{% trans "Our Collection" %} <i class="fa fa-chevron-down small ms-1"></i>
</a>
<div class="outer">
<nav id="header_breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a data-path="root" tabindex="-1">{% trans "Our collection" %}</a></li>
</ol>
</nav>
<ul class="inner">
<li class="category-main">
<a class="nav-link main-assortment" data-name="{{ menu_item.name|safe }}" href="{% url 'catalogue:index' %}" tabindex="-1">
{% trans "View" %} <b class="ms-1">{% trans "Our Collections" %}</b>
</a>
</li>
{% category_tree depth=menu_depth as category_tree_items %}
{% include "webshop/mega_dropdown.html" with menu_items=category_tree_items %}
</ul>
</div>
</li>
{% endif %}
{% rootpage_as_category as page_tree_root %}
{% category_tree 2 page_tree_root as page_tree_items %}
{% include "partials/dropdown.html" with menu_items=page_tree_items limit=2 %}
</ul>
</div>
{% endblock %}

View File

@@ -1,5 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% load wagtailcore_tags oxyan static string_filters %} {% load wagtailcore_tags oxyan static string_filters i18n %}
{% block extrahead %} {% block extrahead %}
{{ block.super }} {{ block.super }}
@@ -15,11 +15,24 @@
{% include "engine/partials/tech_theme_overrides.html" %} {% include "engine/partials/tech_theme_overrides.html" %}
{% include "engine/partials/travel_theme_overrides.html" %} {% include "engine/partials/travel_theme_overrides.html" %}
{% include "engine/partials/saas_theme_overrides.html" %} {% include "engine/partials/saas_theme_overrides.html" %}
<style>
:root { --mb-site-header-height: 88px; }
header.mega_header {
z-index: 1200;
}
.te-modern-saas .te-block--saas-testimonials .saas-testimonials__header {
top: calc(var(--mb-site-header-height) + 8px);
z-index: 20;
}
@media (max-width: 991.98px) {
:root { --mb-site-header-height: 72px; }
}
</style>
{% endblock %} {% endblock %}
{% block layout %} {% block layout %}
<a class="btn btn-secondary hidelink" id="main_content_link" href="#skip_header" tabindex="2"> <a class="btn btn-secondary hidelink" id="main_content_link" href="#skip_header" tabindex="2">
Ga naar inhoud {% if request.LANGUAGE_CODE == 'ru' %}Перейти к содержанию{% elif request.LANGUAGE_CODE == 'de' %}Zum Inhalt springen{% elif request.LANGUAGE_CODE == 'fr' %}Aller au contenu{% elif request.LANGUAGE_CODE == 'es' %}Ir al contenido{% elif request.LANGUAGE_CODE == 'it' %}Vai al contenuto{% elif request.LANGUAGE_CODE == 'pt' %}Ir para o conteúdo{% elif request.LANGUAGE_CODE == 'nl' %}Ga naar inhoud{% else %}Skip to content{% endif %}
</a> </a>
{% include_header header_template|default:"engine/partials/header.html" %} {% include_header header_template|default:"engine/partials/header.html" %}
<div id="main_content" tabindex="-1"> <div id="main_content" tabindex="-1">

View File

@@ -1,5 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% load wagtailcore_tags oxyan static string_filters %} {% load wagtailcore_tags oxyan static string_filters i18n %}
{% block extrahead %} {% block extrahead %}
{{ block.super }} {{ block.super }}
@@ -15,11 +15,24 @@
{% include "engine/partials/tech_theme_overrides.html" %} {% include "engine/partials/tech_theme_overrides.html" %}
{% include "engine/partials/travel_theme_overrides.html" %} {% include "engine/partials/travel_theme_overrides.html" %}
{% include "engine/partials/saas_theme_overrides.html" %} {% include "engine/partials/saas_theme_overrides.html" %}
<style>
:root { --mb-site-header-height: 88px; }
header.mega_header {
z-index: 1200;
}
.te-modern-saas .te-block--saas-testimonials .saas-testimonials__header {
top: calc(var(--mb-site-header-height) + 8px);
z-index: 20;
}
@media (max-width: 991.98px) {
:root { --mb-site-header-height: 72px; }
}
</style>
{% endblock %} {% endblock %}
{% block layout %} {% block layout %}
<a class="btn btn-secondary hidelink" id="main_content_link" href="#skip_header" tabindex="2"> <a class="btn btn-secondary hidelink" id="main_content_link" href="#skip_header" tabindex="2">
Ga naar inhoud {% if request.LANGUAGE_CODE == 'ru' %}Перейти к содержанию{% elif request.LANGUAGE_CODE == 'de' %}Zum Inhalt springen{% elif request.LANGUAGE_CODE == 'fr' %}Aller au contenu{% elif request.LANGUAGE_CODE == 'es' %}Ir al contenido{% elif request.LANGUAGE_CODE == 'it' %}Vai al contenuto{% elif request.LANGUAGE_CODE == 'pt' %}Ir para o conteúdo{% elif request.LANGUAGE_CODE == 'nl' %}Ga naar inhoud{% else %}Skip to content{% endif %}
</a> </a>
{% include_header header_template|default:"engine/partials/header.html" %} {% include_header header_template|default:"engine/partials/header.html" %}
<div id="main_content" tabindex="-1"> <div id="main_content" tabindex="-1">

View File

@@ -1,5 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% load wagtailcore_tags oxyan static string_filters %} {% load wagtailcore_tags oxyan static string_filters i18n %}
{% block extrahead %} {% block extrahead %}
{{ block.super }} {{ block.super }}
@@ -15,11 +15,24 @@
{% include "engine/partials/tech_theme_overrides.html" %} {% include "engine/partials/tech_theme_overrides.html" %}
{% include "engine/partials/travel_theme_overrides.html" %} {% include "engine/partials/travel_theme_overrides.html" %}
{% include "engine/partials/saas_theme_overrides.html" %} {% include "engine/partials/saas_theme_overrides.html" %}
<style>
:root { --mb-site-header-height: 88px; }
header.mega_header {
z-index: 1200;
}
.te-modern-saas .te-block--saas-testimonials .saas-testimonials__header {
top: calc(var(--mb-site-header-height) + 8px);
z-index: 20;
}
@media (max-width: 991.98px) {
:root { --mb-site-header-height: 72px; }
}
</style>
{% endblock %} {% endblock %}
{% block layout %} {% block layout %}
<a class="btn btn-secondary hidelink" id="main_content_link" href="#skip_header" tabindex="2"> <a class="btn btn-secondary hidelink" id="main_content_link" href="#skip_header" tabindex="2">
Ga naar inhoud {% if request.LANGUAGE_CODE == 'ru' %}Перейти к содержанию{% elif request.LANGUAGE_CODE == 'de' %}Zum Inhalt springen{% elif request.LANGUAGE_CODE == 'fr' %}Aller au contenu{% elif request.LANGUAGE_CODE == 'es' %}Ir al contenido{% elif request.LANGUAGE_CODE == 'it' %}Vai al contenuto{% elif request.LANGUAGE_CODE == 'pt' %}Ir para o conteúdo{% elif request.LANGUAGE_CODE == 'nl' %}Ga naar inhoud{% else %}Skip to content{% endif %}
</a> </a>
{% include_header header_template|default:"engine/partials/header.html" %} {% include_header header_template|default:"engine/partials/header.html" %}
<div id="main_content" tabindex="-1"> <div id="main_content" tabindex="-1">

View File

@@ -0,0 +1,38 @@
{% load wagtailimages_tags %}
<section class="saas-features saas-features--grid saas-features--{{ self.background_style }}"
data-width="{{ self.layout_width }}">
<div class="saas-features__container">
<header class="saas-features__header">
<h2 class="saas-features__title">{{ self.section_title }}</h2>
{% if self.section_subtitle %}
<div class="saas-features__subtitle">{{ self.section_subtitle }}</div>
{% endif %}
</header>
<div class="saas-features__grid saas-features__grid--cols-{{ self.columns }}">
{% for feature in self.features %}
<article class="saas-features__card{% if feature.highlight == 'featured' %} saas-features__card--featured{% endif %}">
{% if feature.highlight == 'new' %}
<span class="saas-features__badge">{% if request.LANGUAGE_CODE == 'ru' %}Ново{% elif request.LANGUAGE_CODE == 'de' %}Neu{% elif request.LANGUAGE_CODE == 'fr' %}Nouveau{% elif request.LANGUAGE_CODE == 'es' %}Nuevo{% elif request.LANGUAGE_CODE == 'it' %}Nuovo{% elif request.LANGUAGE_CODE == 'pt' %}Novo{% else %}New{% endif %}</span>
{% endif %}
<div class="saas-features__icon-wrapper">
{% if feature.icon_image %}
{% image feature.icon_image width-64 class="saas-features__icon-img" %}
{% elif feature.icon %}
<i class="saas-features__icon bi bi-{{ feature.icon }}"></i>
{% else %}
<div class="saas-features__icon-placeholder"></div>
{% endif %}
</div>
<h3 class="saas-features__card-title">{{ feature.title }}</h3>
{% if feature.description %}<div class="saas-features__card-desc">{{ feature.description }}</div>{% endif %}
{% if feature.link_text and feature.link_url %}
<a href="{{ feature.link_url }}" class="saas-features__card-link">
{{ feature.link_text }}
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8H13M13 8L9 4M13 8L9 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
</a>
{% endif %}
</article>
{% endfor %}
</div>
</div>
</section>

View File

@@ -0,0 +1,30 @@
{% load wagtailimages_tags %}
<section class="saas-integrations saas-integrations--logo-grid saas-integrations--{{ self.background_style }}" data-width="{{ self.layout_width }}">
<div class="saas-integrations__container">
<header class="saas-integrations__header">
<h2 class="saas-integrations__title">{{ self.section_title }}</h2>
{% if self.section_subtitle %}<div class="saas-integrations__subtitle">{{ self.section_subtitle }}</div>{% endif %}
{% if self.integration_count %}
<span class="saas-integrations__count">{{ self.integration_count }} {% if request.LANGUAGE_CODE == 'ru' %}интеграции{% elif request.LANGUAGE_CODE == 'de' %}Integrationen{% elif request.LANGUAGE_CODE == 'fr' %}intégrations{% elif request.LANGUAGE_CODE == 'es' %}integraciones{% elif request.LANGUAGE_CODE == 'it' %}integrazioni{% elif request.LANGUAGE_CODE == 'pt' %}integrações{% elif request.LANGUAGE_CODE == 'nl' %}integraties{% else %}integrations{% endif %}</span>
{% endif %}
</header>
<div class="saas-integrations__grid">
{% for integration in self.integrations %}
<div class="saas-integrations__item{% if integration.is_featured != 'none' %} saas-integrations__item--{{ integration.is_featured }}{% endif %}">
{% if integration.is_featured == 'new' %}
<span class="saas-integrations__badge">{% if request.LANGUAGE_CODE == 'ru' %}Ново{% elif request.LANGUAGE_CODE == 'de' %}Neu{% elif request.LANGUAGE_CODE == 'fr' %}Nouveau{% elif request.LANGUAGE_CODE == 'es' %}Nuevo{% elif request.LANGUAGE_CODE == 'it' %}Nuovo{% elif request.LANGUAGE_CODE == 'pt' %}Novo{% elif request.LANGUAGE_CODE == 'nl' %}Nieuw{% else %}New{% endif %}</span>
{% elif integration.is_featured == 'popular' %}
<span class="saas-integrations__badge saas-integrations__badge--popular">{% if request.LANGUAGE_CODE == 'ru' %}Populair{% elif request.LANGUAGE_CODE == 'de' %}Beliebt{% elif request.LANGUAGE_CODE == 'fr' %}Populaire{% elif request.LANGUAGE_CODE == 'es' %}Popular{% elif request.LANGUAGE_CODE == 'it' %}Popolare{% elif request.LANGUAGE_CODE == 'pt' %}Popular{% elif request.LANGUAGE_CODE == 'nl' %}Populair{% else %}Popular{% endif %}</span>
{% endif %}
{% if integration.url %}<a href="{{ integration.url }}" class="saas-integrations__link">{% endif %}
<div class="saas-integrations__logo">{% image integration.logo width-48 class="saas-integrations__logo-img" %}</div>
<span class="saas-integrations__name">{{ integration.name }}</span>
{% if integration.url %}</a>{% endif %}
</div>
{% endfor %}
</div>
{% if self.cta_text and self.cta_url %}
<div class="saas-integrations__footer"><a href="{{ self.cta_url }}" class="saas-integrations__cta">{{ self.cta_text }}<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8H13M13 8L9 4M13 8L9 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></a></div>
{% endif %}
</div>
</section>

View File

@@ -0,0 +1,24 @@
{% load i18n ocyan_thumbnail %}
{% if menu_items %}
{% for menu_item in menu_items %}
{% with category_icon=menu_item.category.icons.first %}
{% if menu_item.has_children %}
<li class="nav-item has_children">
<a class="nav-link category-label" data-name="{{ menu_item.name|safe }}" data-href="{{ menu_item.get_absolute_url }}" tabindex="-1">
<span>{% trans "Show everything in" %}</span>{{ menu_item.name }}
</a>
<ul class="menu-level">
{% else %}
<li class="nav-item child">
<a class="nav-link child-category" href="{{ menu_item.get_absolute_url }}" tabindex="-1">
{{ menu_item.name }}
</a>
</li>
{% endif %}
{% for close in menu_item.num_to_close %}
</ul>
</li>
{% endfor %}
{% endwith %}
{% endfor %}
{% endif %}