import { BOOKS } from "@/consts";
import Popover from "./Popover.astro";
const { bible, book }: Props = Astro.props;
<Popover id="chapters-popover" title="Chapters">
Array.from({ length: BOOKS[book] }, (_, i) => (
<button class="chapter-button" data-chapter={i + 1}>
<script is:inline define:vars={{ bible, book }}>
document.querySelectorAll(".chapter-button").forEach((button) => {
button.addEventListener("click", () => {
const chapter = button.getAttribute("data-chapter");
const link = document.createElement("a");
link.href = `/bibles/${bible}/${book}/${chapter}`;
grid-template-columns: repeat(3, 1fr);
color: var(--color-link);