Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change home icon to text #29

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import menu from '@config/menu.json';
import config from '@config/config.json';
import HamburgerIcon from '@icons/HamburgerIcon.astro';
import CloseIcon from '@icons/CloseIcon.astro';
import HomeIcon from '@icons/HomeIcon.astro';
import ThemeIcon from '@components/ThemeIcon.astro';

export interface NavigationLink {
Expand All @@ -15,11 +14,11 @@ export interface NavigationLink {
const { main }: { main: NavigationLink[] } = menu;
---

<header class="bg-zinc-50 dark:bg-zinc-900 sticky top-0 z-50">
<header class="sticky top-0 z-50 bg-zinc-50 dark:bg-zinc-900">
<div class="mx-auto max-w-screen-lg px-4 py-4 sm:px-4 sm:py-4 lg:px-4">
<div class="flex items-start justify-between gap-2 sm:gap-4 md:items-center">
<div class="block dark:hidden">
<a href="/" class="logo flex items-center" aria-current="page">
<a href="//kuzudb.com" class="logo flex items-center" aria-current="page">
<figure>
<Image
src={config.site.logoLight}
Expand All @@ -34,7 +33,7 @@ const { main }: { main: NavigationLink[] } = menu;
</a>
</div>
<div class="hidden dark:block">
<a href="/" class="logo flex items-center" aria-current="page">
<a href="//kuzudb.com" class="logo flex items-center" aria-current="page">
<figure>
<Image
src={config.site.logoDark}
Expand Down Expand Up @@ -87,7 +86,7 @@ const { main }: { main: NavigationLink[] } = menu;
main?.map((menu) => (
<li class="text-md block rounded-lg px-2 py-2 text-zinc-500 transition-all hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200">
<a href={menu?.url} class="relative flex items-center">
{menu?.name === 'Home' ? <HomeIcon /> : menu?.name}
{menu?.name}
</a>
</li>
))
Expand Down
2 changes: 1 addition & 1 deletion src/config/menu.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": [
{
"name": "Home",
"name": "Blog",
"url": "/"
},
{
Expand Down
Loading