Skip to content

armgit / kiln

Public Imported from GitHub
0

Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.

3.1 KB
Raw Blame
---
import PageHeader from "../../../components/PageHeader.astro";
import { readFile } from "node:fs/promises";
import { resolve } from "node:path";
import BaseLayout from "../../../layouts/BaseLayout.astro";
import type { Specimen } from "../../../types";
import { SITE } from "../../../lib/config";
import { archiveName, isDemo } from "../../../lib/archive-names.mjs";
const specimens: Specimen[] = JSON.parse(
  await readFile(resolve("public/assets/index.json"), "utf8"),
);
// A recorded demo run names no model (three items); the card says so in the same words as the item page.
const modelLine = (model: string) =>
  model === "Not independently recorded" ? "Model not recorded" : model;
const description =
  "Earlier examples from earlier Kiln versions. Browse their source and model downloads.";
---

<BaseLayout
  title="Archive · Earlier Kiln examples"
  description={description}
  card="archive"
  breadcrumbs={[
    { label: "Gallery", href: "/gallery/" },
    { label: "Archive", href: "/gallery/archive/" },
  ]}
  jsonLd={{
    "@context": "https://schema.org",
    "@type": "CollectionPage",
    name: "Kiln archive",
    url: `${SITE}/gallery/archive/`,
    description,
  }}
>
  <div class="container pt-8">
    <div class="max-w-reading">
      <PageHeader>Archive</PageHeader>
      <p class="lead mt-6">
        Earlier examples from earlier Kiln versions.
      </p>
      <p class="mt-4">
        These {specimens.length} historical examples retain their source, model
        and authorship records. They may contain modelling issues. Build checks
        do not establish their visual quality.
      </p>
      <a class="text-link mt-4" href="/gallery/">
        Browse the asset gallery <span aria-hidden="true">→</span>
      </a>
    </div>
    <ul class="mt-10 grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
      {specimens.map((specimen, index) => (
        <li class="min-w-0 border-b border-rule pb-5">
          <a
            class="group block text-ink no-underline"
            href={`/gallery/archive/${specimen.name}/`}
          >
            <img
              src={`/${specimen.thumb}`}
              width="560"
              height="560"
              alt=""
              loading={index < 4 ? "eager" : "lazy"}
              decoding="async"
              class="aspect-square w-full border border-rule bg-stage object-contain"
            />
            <h2 class="mt-4 text-title font-semibold group-hover:underline">
              {archiveName(specimen.name)}
            </h2>
          </a>
          {isDemo(specimen.name) && (
            <p class="mt-2">
              <span class="inline-block border border-rule px-2 py-0.5 font-mono text-code text-dim">Demo run</span>
            </p>
          )}
          {specimen.caption && (
            <p class="mt-2 text-caption">{specimen.caption}</p>
          )}
          <p class="mt-3 font-mono text-code text-dim">
            {specimen.tris.toLocaleString("en-US")} triangles · {modelLine(specimen.model)}
          </p>
        </li>
      ))}
    </ul>
  </div>
</BaseLayout>