Default logo URL in navigation component and add setting to hide logo
This commit is contained in:
parent
3f9bdd9589
commit
c91fb7d500
|
@ -338,6 +338,12 @@
|
|||
"type": "text",
|
||||
"label": "Logo URL",
|
||||
"key": "logoUrl"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"label": "Hide logo",
|
||||
"key": "hideLogo",
|
||||
"defaultValue": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -5,16 +5,22 @@
|
|||
const component = getContext("component")
|
||||
|
||||
export let logoUrl
|
||||
export let hideLogo
|
||||
</script>
|
||||
|
||||
<div class="nav" use:styleable={$component.styles}>
|
||||
{#if !hideLogo}
|
||||
<div class="nav__top">
|
||||
<a href="/" use:linkable>
|
||||
{#if logoUrl}
|
||||
<img class="logo" alt="logo" src={logoUrl} height="48" />
|
||||
{/if}
|
||||
<img
|
||||
class="logo"
|
||||
alt="logo"
|
||||
src={logoUrl || "https://i.imgur.com/Dn7Xt1G.png"}
|
||||
height="48"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="nav__menu">
|
||||
<slot />
|
||||
</div>
|
||||
|
@ -33,6 +39,7 @@
|
|||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.nav__top img {
|
||||
margin-right: 16px;
|
||||
|
@ -52,7 +59,6 @@
|
|||
|
||||
.nav__menu {
|
||||
display: flex;
|
||||
margin-top: 40px;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
|
Loading…
Reference in New Issue