summaryrefslogtreecommitdiff
path: root/src/components/Header.astro
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-06-28 18:14:22 -0300
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-06-28 18:14:22 -0300
commit79fd506d30eef3d113f4a8e3ab9ebd9004f1e8cc (patch)
tree96ff57c92e897c3cc3331e23043d20f1665c7d0a /src/components/Header.astro
parenta1eac976b20e39f86d5944fbec68e2a0f8ffb746 (diff)
feat: index page
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/components/Header.astro')
-rw-r--r--src/components/Header.astro69
1 files changed, 48 insertions, 21 deletions
diff --git a/src/components/Header.astro b/src/components/Header.astro
index 28ab542..496337f 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -1,26 +1,53 @@
---
-import HeaderLink from "./HeaderLink.astro";
-import Search from "./Search.astro";
-
-export interface Props {
- showSearch?: boolean;
- showNav?: boolean;
-}
-
-const { showSearch, showNav } = Astro.props;
+import ActiveLink from "./organisms/ActiveLink.astro";
+import Search from "./templates/Search.astro";
---
<header>
- <h1>&lt;<a href="/">cravodeabril.pt</a>&gt;</h1>
- {showSearch && <Search />}
- {
- showNav && (
- <nav>
- <ul>
- <li><HeaderLink href="/blog">Publicações</HeaderLink></li>
- <li><HeaderLink href="/blog/keywords">Palavras-Chave</HeaderLink></li>
- </ul>
- </nav>
- )
- }
+ <h1>
+ <span class="bracket">&lt;</span><a href="/">cravodeabril.pt</a><span
+ class="bracket"
+ >&gt;</span>
+ </h1>
+ <Search />
+ <nav>
+ <ul>
+ <li class="small"><ActiveLink href="/blog">Publicações</ActiveLink></li>
+ <li class="small">
+ <ActiveLink href="/blog/keywords">Palavras-Chave</ActiveLink>
+ </li>
+ <li class="small">
+ <ActiveLink href="/blog/micro/1">Micro blogue</ActiveLink>
+ </li>
+ </ul>
+ </nav>
</header>
+
+<style>
+ header {
+ margin-block-end: calc(var(--size-4) * 1em);
+ border-block-end: 1px solid var(--color-light);
+ }
+ .bracket {
+ color: var(--color-active);
+ }
+ nav {
+ display: flex;
+ max-width: max-content;
+ align-items: center;
+ justify-content: center;
+ }
+ ul {
+ display: flex;
+ flex: 1;
+ gap: calc(var(--size-0) * 1em);
+ list-style-type: none;
+ align-items: center;
+ justify-content: center;
+ padding: calc(var(--size-2) * 1em);
+ margin-block-start: 0;
+ }
+ li {
+ padding: calc(var(--size-1) * 1em);
+ }
+</style>