From c45ce0c7ef67758a84334f8557484df16e846470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=CC=81bor=20Hojtsy?= Date: Thu, 21 Mar 2019 11:29:06 +0100 Subject: [PATCH] Issue #3041699 by kjay, shaal, markconroy: Add the language switcher block to Umami Demo --- .../install/block.block.languageswitcher.yml | 19 ++++++++++++ .../block.block.umami_account_menu.yml | 2 +- .../install/block.block.umami_search.yml | 2 +- .../language-switcher/language-switcher.css | 30 +++++++++++++++++++ .../css/components/blocks/search/search.css | 1 - .../navigation/menu-account/menu-account.css | 1 - .../themes/umami/umami.libraries.yml | 1 + 7 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 core/profiles/demo_umami/config/install/block.block.languageswitcher.yml create mode 100644 core/profiles/demo_umami/themes/umami/css/components/blocks/language-switcher/language-switcher.css diff --git a/core/profiles/demo_umami/config/install/block.block.languageswitcher.yml b/core/profiles/demo_umami/config/install/block.block.languageswitcher.yml new file mode 100644 index 00000000000..9fb1d464028 --- /dev/null +++ b/core/profiles/demo_umami/config/install/block.block.languageswitcher.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - language + theme: + - umami +id: languageswitcher +theme: umami +region: pre_header +weight: 0 +provider: null +plugin: 'language_block:language_interface' +settings: + id: 'language_block:language_interface' + label: 'Language switcher' + provider: language + label_display: '0' +visibility: { } diff --git a/core/profiles/demo_umami/config/install/block.block.umami_account_menu.yml b/core/profiles/demo_umami/config/install/block.block.umami_account_menu.yml index db89c35c61d..df9d54d7b7f 100644 --- a/core/profiles/demo_umami/config/install/block.block.umami_account_menu.yml +++ b/core/profiles/demo_umami/config/install/block.block.umami_account_menu.yml @@ -10,7 +10,7 @@ dependencies: id: umami_account_menu theme: umami region: pre_header -weight: -6 +weight: 2 provider: null plugin: 'system_menu_block:account' settings: diff --git a/core/profiles/demo_umami/config/install/block.block.umami_search.yml b/core/profiles/demo_umami/config/install/block.block.umami_search.yml index bf1f99b2a53..047f516255a 100644 --- a/core/profiles/demo_umami/config/install/block.block.umami_search.yml +++ b/core/profiles/demo_umami/config/install/block.block.umami_search.yml @@ -8,7 +8,7 @@ dependencies: id: umami_search theme: umami region: pre_header -weight: -7 +weight: 1 provider: null plugin: search_form_block settings: diff --git a/core/profiles/demo_umami/themes/umami/css/components/blocks/language-switcher/language-switcher.css b/core/profiles/demo_umami/themes/umami/css/components/blocks/language-switcher/language-switcher.css new file mode 100644 index 00000000000..78e27afabfd --- /dev/null +++ b/core/profiles/demo_umami/themes/umami/css/components/blocks/language-switcher/language-switcher.css @@ -0,0 +1,30 @@ +/** + * @file + * Stylesheet for the language switcher block. + */ + +.block-language > .links { + list-style: none; + margin: 0; + padding: 0; + display: inline-flex; +} + +.block-language > .links li + li { + margin-left: 1rem; +} + +.language-link, +.language-link:hover, +.language-link:focus { + text-decoration: none; + color: inherit; + background-color: inherit; +} +.language-link:hover, +.language-link:focus { + text-decoration: underline; +} +.language-link.is-active { + font-weight: 700; +} diff --git a/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css b/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css index 82e956c17dd..fccf5050b49 100644 --- a/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css +++ b/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css @@ -10,7 +10,6 @@ @media screen and (min-width: 48em) { .search-block-form { display: block; - flex: 0 1 50%; } } diff --git a/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css b/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css index d4ad919f8d4..5daa5b3227f 100644 --- a/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css +++ b/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css @@ -6,7 +6,6 @@ @media screen and (min-width: 48em) { .menu--account { display: block; - flex: 0 1 50%; text-align: right; /* LTR */ } [dir="rtl"] .menu--account { diff --git a/core/profiles/demo_umami/themes/umami/umami.libraries.yml b/core/profiles/demo_umami/themes/umami/umami.libraries.yml index 5227f7233b1..9c30d12de2e 100644 --- a/core/profiles/demo_umami/themes/umami/umami.libraries.yml +++ b/core/profiles/demo_umami/themes/umami/umami.libraries.yml @@ -9,6 +9,7 @@ global: css/components/blocks/disclaimer/disclaimer.css: {} css/components/blocks/page-title/page-title.css: {} css/components/blocks/footer-promo/footer-promo.css: {} + css/components/blocks/language-switcher/language-switcher.css: {} css/components/blocks/search/search.css: {} css/components/blocks/search/search-results.css: {} css/components/blocks/articles-aside/articles-aside.css: {}