-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
120bb63
commit 29e1bb5
Showing
5 changed files
with
46 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,14 @@ | ||
--- | ||
import Navbar from './ui/Navbar' | ||
import NavAstro from './Navbar.astro' | ||
const { PageName } = Astro.props | ||
import Emoji from 'astro-emoji' | ||
--- | ||
|
||
<Navbar client:load> | ||
<NavAstro slot="navbar"/> | ||
</Navbar> | ||
|
||
<script define:vars={{ PageName }} is:inline> | ||
|
||
switch (PageName) { | ||
case 'Home': | ||
case 'Note': | ||
case 'Notes': | ||
document.getElementById('notes').classList.add('active') | ||
break; | ||
case 'Tag': | ||
case 'Tags': | ||
document.getElementById('tags').classList.add('active') | ||
break; | ||
case 'About': | ||
document.getElementById('about').classList.add('active') | ||
break; | ||
} | ||
|
||
</script> | ||
<nav class="flex flex-col mt-12 mb-10 text-[#F2F5F7]"> | ||
<div class="flex font-['Merriweather'] text-4xl font-black mb-3"> | ||
<a href="/">Derek Brown <Emoji symbol="👨🏻💻" label="person" /></a> | ||
</div> | ||
<div class="font-['Merriweather'] text-xl flex items-center gap-4"> | ||
<span class="navItem" id="notes"><a href="/">Notes</a></span> | ||
<span class="navItem" id="tags"><a href="/tags">Tags</a></span> | ||
<span class="navItem" id="about"><a href="/about">About</a></span> | ||
</div> | ||
</nav> |
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,14 +1,29 @@ | ||
--- | ||
import Emoji from 'astro-emoji' | ||
import Nav from './ui/Nav' | ||
import NavAstro from './Nav.astro' | ||
const { PageName } = Astro.props | ||
--- | ||
|
||
<nav class="flex flex-col mt-12 mb-10 text-[#F2F5F7]"> | ||
<div class="flex font-['Merriweather'] text-4xl font-black mb-3"> | ||
<a href="/">Derek Brown <Emoji symbol="👨🏻💻" label="person" /></a> | ||
</div> | ||
<div class="font-['Merriweather'] text-xl flex items-center gap-4"> | ||
<span class="navItem" id="notes"><a href="/">Notes</a></span> | ||
<span class="navItem" id="tags"><a href="/tags">Tags</a></span> | ||
<span class="navItem" id="about"><a href="/about">About</a></span> | ||
</div> | ||
</nav> | ||
<Nav> | ||
<NavAstro slot="nav"/> | ||
</Nav> | ||
|
||
<script define:vars={{ PageName }} is:inline> | ||
|
||
switch (PageName) { | ||
case 'Home': | ||
case 'Note': | ||
case 'Notes': | ||
document.getElementById('notes').classList.add('active') | ||
break; | ||
case 'Tag': | ||
case 'Tags': | ||
document.getElementById('tags').classList.add('active') | ||
break; | ||
case 'About': | ||
document.getElementById('about').classList.add('active') | ||
break; | ||
} | ||
|
||
</script> |
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,7 @@ | ||
export default function Nav(props) { | ||
return ( | ||
<div> | ||
{props.nav} | ||
</div> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
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