Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another pass at Header component for Vue / Svelte and updates showcase.
- Loading branch information
1 parent
3a691ae
commit 93d0be3
Showing
15 changed files
with
246 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.header-nav-item { | ||
display: inline-block; | ||
} | ||
.header-nav-item:not(:last-child) { | ||
margin-right: initial; | ||
} | ||
.header-nav-item :global(a) { | ||
color: var( | ||
--agnosticui-header-color, | ||
var(--agnosticui-default-header-color) | ||
); | ||
text-decoration: none; | ||
} | ||
|
||
@media (min-width: 960px) { | ||
.header-nav-item:not(:last-child) { | ||
margin-right: var( | ||
--agnosticui-header-nav-spacing, | ||
var(--agnosticui-default-header-nav-spacing) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
<script> | ||
import Header from "./Header.svelte"; | ||
import HeaderNav from "./HeaderNav.svelte"; | ||
import HeaderNavItem from "./HeaderNavItem.svelte"; | ||
</script> | ||
|
||
<style> | ||
:root { | ||
--agnosticui-header-mobile-height: 175px; | ||
} | ||
</style> | ||
|
||
<Header isSticky={true}> | ||
<div slot="logoleft">logo left</div> | ||
<HeaderNav> | ||
<ul> | ||
<li><a href="#home">Home</a></li> | ||
<li><a href="#about">About</a></li> | ||
</ul> | ||
<HeaderNav css="nav-overrides"> | ||
<HeaderNavItem><a href="#home">Home</a></HeaderNavItem> | ||
<HeaderNavItem><a href="#products">Products</a></HeaderNavItem> | ||
<HeaderNavItem><a href="#services">Services</a></HeaderNavItem> | ||
<HeaderNavItem><a href="#about">About</a></HeaderNavItem> | ||
</HeaderNav> | ||
<div slot="logoright">logo right</div> | ||
</Header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script> | ||
export let css = ""; | ||
let klasses = ["header-nav-item", css ? `${css}` : ""]; | ||
klasses = klasses.filter((klass) => klass.length); | ||
klasses = klasses.join(" "); | ||
</script> | ||
|
||
<style> | ||
.header-nav-item { | ||
display: inline-block; | ||
} | ||
.header-nav-item:not(:last-child) { | ||
margin-right: initial; | ||
} | ||
.header-nav-item :global(a) { | ||
color: var( | ||
--agnosticui-header-color, | ||
var(--agnosticui-default-header-color) | ||
); | ||
text-decoration: none; | ||
} | ||
@media (min-width: 960px) { | ||
.header-nav-item:not(:last-child) { | ||
margin-right: var( | ||
--agnosticui-header-nav-spacing, | ||
var(--agnosticui-default-header-nav-spacing) | ||
); | ||
} | ||
} | ||
</style> | ||
|
||
<li class={klasses}> | ||
<slot /> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.