From 25a455d778c789065db7df1a440e5e116b71788e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Jun 2021 16:23:38 +0100 Subject: [PATCH] Add box shadow to nav and update setting order for layout --- packages/standard-components/manifest.json | 36 +++++++++---------- .../standard-components/src/Layout.svelte | 36 ++++++++++++------- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json index bb67771a71..db834762bb 100644 --- a/packages/standard-components/manifest.json +++ b/packages/standard-components/manifest.json @@ -18,18 +18,6 @@ "label": "Title", "key": "title" }, - { - "type": "boolean", - "label": "Hide title", - "key": "hideTitle", - "defaultValue": false - }, - { - "type": "boolean", - "label": "Hide logo", - "key": "hideLogo", - "defaultValue": false - }, { "type": "select", "label": "Navigation", @@ -37,12 +25,6 @@ "options": ["Top", "Left", "None"], "defaultValue": "Top" }, - { - "type": "boolean", - "label": "Sticky header", - "key": "sticky", - "defaultValue": false - }, { "type": "select", "label": "Width", @@ -54,6 +36,24 @@ "type": "navigation", "label": "Links", "key": "links" + }, + { + "type": "boolean", + "label": "Hide title", + "key": "hideTitle", + "defaultValue": false + }, + { + "type": "boolean", + "label": "Hide logo", + "key": "hideLogo", + "defaultValue": false + }, + { + "type": "boolean", + "label": "Sticky header", + "key": "sticky", + "defaultValue": false } ] }, diff --git a/packages/standard-components/src/Layout.svelte b/packages/standard-components/src/Layout.svelte index fa3a118f4f..1e26f23a3c 100644 --- a/packages/standard-components/src/Layout.svelte +++ b/packages/standard-components/src/Layout.svelte @@ -7,7 +7,7 @@ export let title export let hideTitle = false - export let logoUrl = "https://i.imgur.com/Xhdt1YP.png" + export let logoUrl export let hideLogo = false export let navigation = "Top" export let sticky = false @@ -59,10 +59,13 @@ {/if}
@@ -128,12 +131,12 @@ align-items: stretch; background: white; z-index: 1; + box-shadow: 0 0 8px -1px rgba(0, 0, 0, 0.075); } .layout--top .nav-wrapper.sticky { position: sticky; top: 0; left: 0; - box-shadow: 0 0 8px -1px rgba(0, 0, 0, 0.075); } .nav { @@ -151,6 +154,7 @@ flex-direction: row; justify-content: space-between; align-items: center; + gap: var(--spacing-xl); } .main-wrapper { display: flex; @@ -187,10 +191,19 @@ flex-direction: row; justify-content: flex-start; align-items: center; - gap: var(--spacing-xl); + gap: var(--spacing-m); + flex: 1 1 auto; } .logo img { - height: 48px; + height: 36px; + } + .logo :global(h1) { + font-weight: 600; + flex: 1 1 auto; + width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .portal { display: grid; @@ -239,11 +252,8 @@ padding: var(--spacing-xl); } - .nav--left .logo img { - height: 36px; - } .nav--left .links { - margin-top: 0; + margin-top: var(--spacing-m); flex-direction: column; justify-content: flex-start; align-items: stretch; @@ -275,8 +285,8 @@ display: grid; place-items: center; } - .logo img { - height: 36px; + .logo { + flex: 0 0 auto; } .logo :global(h1) { display: none;