From a1eac976b20e39f86d5944fbec68e2a0f8ffb746 Mon Sep 17 00:00:00 2001 From: João Augusto Costa Branco Marado Torres Date: Tue, 24 Jun 2025 16:13:59 -0300 Subject: feat: configurable header component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Augusto Costa Branco Marado Torres --- src/components/Header.astro | 53 +++++++++++++---------------------- src/components/Search.astro | 32 +++++++++++++++++++++ src/components/signature/Commit.astro | 3 +- 3 files changed, 52 insertions(+), 36 deletions(-) create mode 100644 src/components/Search.astro (limited to 'src/components') diff --git a/src/components/Header.astro b/src/components/Header.astro index 874a496..28ab542 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,41 +1,26 @@ --- import HeaderLink from "./HeaderLink.astro"; +import Search from "./Search.astro"; + +export interface Props { + showSearch?: boolean; + showNav?: boolean; +} + +const { showSearch, showNav } = Astro.props; ---

<cravodeabril.pt>

- -
-

- -

-

-

- Esta pesquisa é efectuada pelo Google e utiliza software - proprietário. -

-
-
- + {showSearch && } + { + showNav && ( + + ) + }
diff --git a/src/components/Search.astro b/src/components/Search.astro new file mode 100644 index 0000000..5ca4569 --- /dev/null +++ b/src/components/Search.astro @@ -0,0 +1,32 @@ +--- + +--- + + +
+

+ +

+

+

+ Esta pesquisa é efectuada pelo Google e utiliza software + proprietário. +

+
+
diff --git a/src/components/signature/Commit.astro b/src/components/signature/Commit.astro index 9cc997a..a2138ab 100644 --- a/src/components/signature/Commit.astro +++ b/src/components/signature/Commit.astro @@ -6,8 +6,7 @@ import { toIso8601Full } from "@utils/datetime"; type Props = { commit: Commit; lang: string }; const dir = await gitDir(); -const { hash, files, author, committer, signature } = - Astro.props.commit; +const { hash, files, author, committer, signature } = Astro.props.commit; const formatter = new Intl.DateTimeFormat([Astro.props.lang], { dateStyle: "short", -- cgit v1.2.3