diff --git a/web/src/components/Header.astro b/web/src/components/Header.astro index 89595c5..a7cb544 100644 --- a/web/src/components/Header.astro +++ b/web/src/components/Header.astro @@ -1,15 +1,35 @@ +--- +const links = [ + { + txt: "new", + lnk: "/recipe/new" + }, + { + txt: "add", + lnk: "/recipe/import" + }, + { + txt: "tags", + lnk: "/tags" + }, + { + txt: "search", + lnk: "/search" + }, +] +---
\ No newline at end of file diff --git a/web/src/components/detail/ImageCarousel.astro b/web/src/components/detail/ImageCarousel.astro index 784bf16..05fa80b 100644 --- a/web/src/components/detail/ImageCarousel.astro +++ b/web/src/components/detail/ImageCarousel.astro @@ -11,12 +11,12 @@ const { class: className, images } = Astro.props const cap = links.length - 1; const img = document.getElementById('carousel-img') as HTMLImageElement; - if (cap == 0) { + if (cap > 0) { const b0 = document.getElementById('dec-button') const b1 = document.getElementById('inc-button') - b0!.hidden = true - b1!.hidden = true + b0!.hidden = false + b1!.hidden = false } function inc() { @@ -39,9 +39,9 @@ const { class: className, images } = Astro.props