From 7bfec28ef2c6c8d166730e9defad39a056bc7b82 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Sat, 3 Dec 2022 12:39:17 -0500 Subject: [PATCH] =?UTF-8?q?feat(core):=20=E2=9C=A8=20add=20site=20logo=20t?= =?UTF-8?q?o=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/skins.citizen.styles/Header.less | 13 +++++++ templates/Drawer__logo.mustache | 41 +++++++++++----------- templates/Header.mustache | 1 + templates/Header__logo.mustache | 23 ++++++++++++ 4 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 templates/Header__logo.mustache diff --git a/resources/skins.citizen.styles/Header.less b/resources/skins.citizen.styles/Header.less index 701c3891..1f09a58b 100644 --- a/resources/skins.citizen.styles/Header.less +++ b/resources/skins.citizen.styles/Header.less @@ -66,6 +66,12 @@ } } + &__logo { + padding: 0 var( --space-xs ) 0 0; + border-right: 1px solid var( --border-color-base ); + margin: 0 var( --space-xxs ); + } + &__inner { z-index: -1; // Inner element should be behind menu and search display: flex; @@ -143,6 +149,13 @@ left: 0; border-top: 0; border-right: 1px solid var( --border-color-base ); + + &__logo { + padding: 0 0 var( --space-xs ) 0; + border-right: 0; + border-bottom: 1px solid var( --border-color-base ); + margin: var( --space-xxs ) 0; + } } } diff --git a/templates/Drawer__logo.mustache b/templates/Drawer__logo.mustache index 2de6bbc3..a7003d99 100644 --- a/templates/Drawer__logo.mustache +++ b/templates/Drawer__logo.mustache @@ -1,21 +1,20 @@ -{{! - LogoDefinition logo - string link-mainpage link to the main page - string msg-sitesubtitle the contents of the sitesubtitle message key -}} -{{#data-logos}} - -{{/data-logos}} +{{! + LogoDefinition logo + string link-mainpage link to the main page +}} +{{#data-logos}} + +{{/data-logos}} diff --git a/templates/Header.mustache b/templates/Header.mustache index 9c5ea81c..39b09179 100644 --- a/templates/Header.mustache +++ b/templates/Header.mustache @@ -3,6 +3,7 @@ string msg-citizen-drawer-toggle The label used by the drawer button }}
+ {{>Header__logo}} {{#data-search-box}}{{>Search}}{{/data-search-box}} {{>Drawer}}
diff --git a/templates/Header__logo.mustache b/templates/Header__logo.mustache new file mode 100644 index 00000000..267c106a --- /dev/null +++ b/templates/Header__logo.mustache @@ -0,0 +1,23 @@ +{{! + LogoDefinition logo + string link-mainpage link to the main page + TODO: Maybe merge with Drawer__logo? +}} +{{#data-logos}} + +{{/data-logos}}