diff --git a/src/implementations/twig/components/splash-page/splash-page.html.twig b/src/implementations/twig/components/splash-page/splash-page.html.twig index 7e5c3e2e6ae..4bb7f87f3eb 100644 --- a/src/implementations/twig/components/splash-page/splash-page.html.twig +++ b/src/implementations/twig/components/splash-page/splash-page.html.twig @@ -117,8 +117,18 @@
{# EU languages #} + {% set container_class = 'ecl-splash-page__language-category' %} {% if _items is not empty and _items is iterable %} -
+ {% if _items|length == 1 %} + {% set container_class = container_class ~ ' ecl-splash-page__language-single-item-category' %} + {% endif %} + {% if _items|length == 2 %} + {% set container_class = container_class ~ ' ecl-splash-page__language-two-item-category' %} + {% endif %} + {% if _items|length == 4 %} + {% set container_class = container_class ~ ' ecl-splash-page__language-four-item-category' %} + {% endif %} +
{% if _eu_category is not empty %}

{{- _eu_category -}} diff --git a/src/implementations/vanilla/components/site-header/_site-header-language-switcher.scss b/src/implementations/vanilla/components/site-header/_site-header-language-switcher.scss index ab98ca9c93f..3b6841014be 100644 --- a/src/implementations/vanilla/components/site-header/_site-header-language-switcher.scss +++ b/src/implementations/vanilla/components/site-header/_site-header-language-switcher.scss @@ -99,7 +99,10 @@ $language-list: null !default; display: flex; justify-content: space-between; padding-inline-start: calc( - var(--s-m) + #{map.get($language-list, 'item-active-border-width')} + #{map.get($language-list, 'title-padding-start')} + #{map.get( + $language-list, + 'item-active-border-width' + )} ); } diff --git a/src/implementations/vanilla/components/splash-page/splash-page.scss b/src/implementations/vanilla/components/splash-page/splash-page.scss index 0cdb8e68c92..1620d46f20e 100644 --- a/src/implementations/vanilla/components/splash-page/splash-page.scss +++ b/src/implementations/vanilla/components/splash-page/splash-page.scss @@ -66,7 +66,10 @@ $language-list: null !default; font: map.get($language-list, 'header-font-mobile'); margin: 0; padding-inline-start: calc( - var(--s-m) + #{map.get($language-list, 'item-active-border-width')} + #{map.get($language-list, 'title-padding-start')} + #{map.get( + $language-list, + 'item-active-border-width' + )} ); } @@ -218,12 +221,48 @@ $language-list: null !default; column-count: 3; } + .ecl-splash-page__language-four-item-category + .ecl-splash-page__language-list { + display: grid; + } + + .ecl-splash-page__language-two-item-category { + flex-grow: 0; + + .ecl-splash-page__language-list { + display: grid; + grid-template-columns: repeat(2, 33%); + } + } + + .ecl-splash-page__language-single-item-category { + flex-grow: 0; + + + .ecl-splash-page__language-category { + flex-grow: 0; + } + + .ecl-splash-page__language-list { + display: grid; + grid-template-columns: repeat(1, 1fr); + } + } + .ecl-splash-page__language-link { width: calc(#{map.get($language-list, 'item-width')} - (2 * var(--s-s))); } } @include breakpoints.up('l') { + .ecl-splash-page__language-two-item-category .ecl-splash-page__language-list { + grid-template-columns: repeat(2, 1fr); + } + + .ecl-splash-page__language-four-item-category + .ecl-splash-page__language-list { + grid-template-columns: repeat(3, 1fr); + } + .ecl-splash-page__language-content { margin-top: map.get($language-list, 'content-margin-desktop'); } diff --git a/src/themes/ec/variables/_language-list.scss b/src/themes/ec/variables/_language-list.scss index 9c3bf43d5df..64e6a5066b4 100644 --- a/src/themes/ec/variables/_language-list.scss +++ b/src/themes/ec/variables/_language-list.scss @@ -20,6 +20,7 @@ $language-list: ( content-margin-mobile: var(--s-s), content-margin-desktop: var(--s-s), category-title-font: var(--f-m), + title-padding-start: var(--s-m), category-title-font-weight: map.get($font-weight, 'regular'), category-title-padding: ( block-start: var(--s-l), diff --git a/src/themes/eu/variables/_language-list.scss b/src/themes/eu/variables/_language-list.scss index a857064b52b..528a9e2367b 100644 --- a/src/themes/eu/variables/_language-list.scss +++ b/src/themes/eu/variables/_language-list.scss @@ -4,8 +4,8 @@ $language-list: ( color: var(--c-d-140), container-padding-mobile: ( - block-start: var(--s-l), - block-end: var(--s-m), + block-start: var(--s-2xl), + block-end: var(--s-2xl), inline-start: var(--s-l), inline-end: var(--s-l), ), @@ -19,8 +19,9 @@ $language-list: ( header-font-desktop: var(--f-p-xl), content-margin-mobile: var(--s-s), content-margin-desktop: var(--s-s), + title-padding-start: var(--s-s), category-title-font: var(--f-p-m), - category-title-font-weight: map.get($font-weight, 'bold'), + category-title-font-weight: map.get($font-weight, 'regular'), category-title-padding: ( block-start: var(--s-l), block-end: var(--s-xs), @@ -36,7 +37,7 @@ $language-list: ( inline-end: var(--s-s), ), code-color: var(--c-d-140), - code-font-weight: map.get($font-weight, 'bold'), + code-font-weight: map.get($font-weight, 'regular'), code-active-font-weight: map.get($font-weight, 'bold'), code-width: 26px, item-active-background: var(--c-p-10), diff --git a/src/themes/eu/variables/_splash-page.scss b/src/themes/eu/variables/_splash-page.scss index 6270c8dbfb8..ebefa4b5749 100644 --- a/src/themes/eu/variables/_splash-page.scss +++ b/src/themes/eu/variables/_splash-page.scss @@ -3,7 +3,7 @@ $splash-page: ( logo-background: var(--c-p-5), - logo-padding: var(--s-l), + logo-padding: var(--s-l) var(--s-2xl), logo-height-mobile: 2.5rem, logo-height-desktop: 2.75rem, ); diff --git a/src/website/src/pages/ec/components/splash-page/index.md b/src/website/src/pages/ec/components/splash-page/index.md index 2c753af0bec..82c3ceb60bf 100644 --- a/src/website/src/pages/ec/components/splash-page/index.md +++ b/src/website/src/pages/ec/components/splash-page/index.md @@ -4,5 +4,5 @@ defaultTab: usage status: ready playground: system: ec - path: /story/components-spinner--default + path: /story/components-splash-page--default --- diff --git a/src/website/src/pages/eu/components/splash-page/index.md b/src/website/src/pages/eu/components/splash-page/index.md index 26e626848bf..82c3ceb60bf 100644 --- a/src/website/src/pages/eu/components/splash-page/index.md +++ b/src/website/src/pages/eu/components/splash-page/index.md @@ -4,5 +4,5 @@ defaultTab: usage status: ready playground: system: ec - path: /story/components-messages--info + path: /story/components-splash-page--default ---