From da982e3fdffe1fb8c7efe2d51d4910e79d214555 Mon Sep 17 00:00:00 2001 From: David Valdez Date: Sun, 13 Jan 2019 00:41:14 -0600 Subject: [PATCH] Add the Language link beside the main menu --- agaric/css/agaric.css | 3 +++ agaric/sass/agaric/_component.navbar.scss | 4 ++++ .../templates/block/block--system-menu-block--main.html.twig | 4 ++++ agaric/templates/block/links--language-block.html.twig | 5 +++++ 4 files changed, 16 insertions(+) create mode 100644 agaric/templates/block/links--language-block.html.twig diff --git a/agaric/css/agaric.css b/agaric/css/agaric.css index cb6a8c9..f184c39 100644 --- a/agaric/css/agaric.css +++ b/agaric/css/agaric.css @@ -7637,6 +7637,9 @@ a.navbar-link.is-active { a.navbar-link.is-active:focus::before { display: none; } } +a.language-link.navbar-item.is-active { + display: none; } + @media screen and (min-width: 769px), print { .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown:focus .navbar-link, diff --git a/agaric/sass/agaric/_component.navbar.scss b/agaric/sass/agaric/_component.navbar.scss index f553144..8ad8f71 100644 --- a/agaric/sass/agaric/_component.navbar.scss +++ b/agaric/sass/agaric/_component.navbar.scss @@ -227,6 +227,10 @@ a.navbar-link.is-active { } } +a.language-link.navbar-item.is-active { + display:none; +} + .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown:focus .navbar-link, .navbar-item.has-dropdown.is-active .navbar-link { diff --git a/agaric/templates/block/block--system-menu-block--main.html.twig b/agaric/templates/block/block--system-menu-block--main.html.twig index 88d5789..15641aa 100644 --- a/agaric/templates/block/block--system-menu-block--main.html.twig +++ b/agaric/templates/block/block--system-menu-block--main.html.twig @@ -7,3 +7,7 @@ %} {% set attributes = attributes.addClass(classes) %} +{% block content %} + {{ language }} + {{ content }} +{% endblock %} diff --git a/agaric/templates/block/links--language-block.html.twig b/agaric/templates/block/links--language-block.html.twig new file mode 100644 index 0000000..884bf06 --- /dev/null +++ b/agaric/templates/block/links--language-block.html.twig @@ -0,0 +1,5 @@ +{% if links -%} + {%- for item in links -%} + {{ item.link }} + {%- endfor -%} +{%- endif %}