{#SNIPPET CANONIQUE- Type Sulu: partners_companies#}{# Valeurs de base #}{% set effectiveSectionSettings = showSectionSettings|default(true) ? sectionSettings|default({}) : {} %}{% set content = effectiveSectionSettings|merge(partnersCompanies) %}{% set companies = partners_snippet_companies() %}{% set datas = {} %}{% if content is defined and content is not none and content is not empty %}{# Propriétés de la section #}{% set datas = datas|merge({'section': section(content)}) %}{# Propriétés du titre #}{% set datas = datas|merge({'title': title(content)}) %}{# Mise à jour du CSS lié à la section #}<style>{% include '_snippets/components/_section.html.twig' %}{% include '_snippets/components/_title.html.twig' %}/* ========================================PARTNERS COMPANIES MARQUEE STYLES======================================== */.partners-companies {width: 100%;overflow: hidden;position: relative;}.partners-companies .marquee {display: flex;white-space: nowrap;position: relative;width: fit-content;will-change: transform;align-items: center;gap: {{content.marqueeGap|default(40)}}{{content.marqueeGapUnit|default('px')}};}.partners-companies .marquee .company-logo {display: inline-flex;align-items: center;justify-content: center;flex-shrink: 0;position: relative;height: {{content.marqueeHeight|default(90)}}{{content.marqueeHeightUnit|default('px')}};min-width: 120px;max-width: 200px;overflow: visible;}.partners-companies .marquee .company-logo img {height: {{content.marqueeHeight|default(90) ~ content.marqueeHeightUnit|default('px')}};width: auto;max-width: 100%;object-fit: contain;transition: 0.3s ease-in-out;display: block;filter:{{content.isBlackAndWhite|default(false) ? 'grayscale(100%)' : 'grayscale(0%)'}};}.partners-companies .marquee .company-logo a {display: flex;align-items: center;justify-content: center;height: 100%;width: 100%;overflow: visible;}.partners-companies .marquee .company-logo img {transform: scale(0.95);}.partners-companies .marquee .company-logo:hover img {transform: scale(1);filter:{{content.isBlackAndWhite|default(false) ? 'grayscale(0%)' : 'unset'}};}/* Responsive */@media(max-width: 768px) {.partners-companies .marquee .company-logo {height: {{(content.marqueeHeight|default(90) * 0.8)|round}}{{content.marqueeHeightUnit|default('px')}};min-width: 100px;max-width: 150px;margin-right: {{(content.marqueeGap|default(40) * 0.75)|round}}{{content.marqueeGapUnit|default('px')}};overflow: visible;}.partners-companies .marquee .company-logo img {height: {{(content.marqueeHeight|default(90) * 0.8)|round}}{{content.marqueeHeightUnit|default('px')}};}.partners-companies .marquee .company-logo a {overflow: visible;}}@media(max-width: 480px) {.partners-companies .marquee .company-logo {height: {{(content.marqueeHeight|default(90) * 0.6)|round}}{{content.marqueeHeightUnit|default('px')}};min-width: 80px;max-width: 120px;margin-right: {{(content.marqueeGap|default(40) * 0.5)|round}}{{content.marqueeGapUnit|default('px')}};overflow: visible;}.partners-companies .marquee .company-logo img {height: {{(content.marqueeHeight|default(90) * 0.6)|round}}{{content.marqueeHeightUnit|default('px')}};}.partners-companies .marquee .company-logo a {overflow: visible;}}</style>{# Affichage des éléments #}<section id="{{ datas.section.id|default('') }}" class="partners-companies-section">{% if showSectionSettings|default(true) and attribute(content, 'titleTextSection')|default('') is not empty %}{{ ('<'~attribute(content, 'typeTitleSection')|default('h2')~' class="partners-companies-title">')|raw }}{% if attribute(content, 'pictogramTitleSection')|default('') is not empty %}<span class="icon">{{ getLucidIcon(attribute(content, 'pictogramTitleSection')|default('')) }}</span>{% endif %}{{ attribute(content, 'titleTextSection')|raw }}{{ ('</'~attribute(content, 'typeTitleSection')|default('h2')~'>')|raw }}{% elseif datas.title.text is defined and datas.title.text is not empty %}{{ ('<'~datas.title.level|default('h2')~' class="partners-companies-title">')|raw }}{{ datas.title.text|raw }}{{ ('</'~datas.title.level|default('h2')~'>')|raw }}{% endif %}{% if companies is defined and companies is not empty %}<div class="partners-companies" data-direction="{{ content.marqueeDirection|default('leftToRight') }}" data-speed="{{ content.marqueeSpeed|default(1) }}" data-gap="{{ content.marqueeGap|default(40) }}"><div class="marquee">{% for company in companies %}{% set media = crea_media_get_media(['logo'], company) %}{% if media is defined and media is not null %}{% set logoUrl = media.cdnUrl|default('/img/placeholder-company.svg') %}<div class="company-logo">{% if company.id is defined and company.id is not null and company.id is not empty %}<a href="/croisieres?companies[]={{ company.id }}"><img src="{{ logoUrl }}" alt="{{ company.name|default('Logo compagnie') }}" loading="lazy"></a>{% else %}<img src="{{ logoUrl }}" alt="{{ company.name|default('Logo compagnie') }}" loading="lazy">{% endif %}</div>{% endif %}{% endfor %}</div></div>{% endif %}</section>{# Le JavaScript du carousel partners companies est maintenant géré par assets/website/js/snippets/partners-companies.js #}{% endif %}