--- import CatalogCard from "@components/catalog/CatalogCard.svelte"; import Layout from "@layouts/Layout.astro"; import Pagnation from "./pagnation.astro"; import { getLangFromUrl, useTranslations } from "../../../i18n/utils"; const lang = getLangFromUrl(Astro.url); const t = useTranslations(lang); const { page } = Astro.params; const response = await fetch(new URL("/api/catalog-assets/", Astro.url)); //console.log(new URL("/api/catalog-assets/", Astro.url)); const assetsJson = await response.json(); const nextPage = parseInt(page!) + 1; const previousPage = parseInt(page!) - 1; const lastPage = assetsJson.pages; ---

Nebula Catalog

The Nebula Catalog is a place for you to find user-created themes and plugins.

{/* The first page. If the user is on this page, or the one after it, don't show it. */} {parseInt(page!) > 2 && ( 1 ) } {previousPage > 0 && ( {previousPage} ) } {/* The greyed out page the user is currently on */} {page} {nextPage < lastPage && ( {nextPage} ) } {/* Pagnation input */} {/* The last page. If the user is on this page, don't show it. */} {page != lastPage && ( {assetsJson.pages} ) }