@luhtech/site-visuals
v0.2.0
Published
Canonical visual package for LuhTech venture sites -- responsive hero images, numbered diagram figures, and article bylines, composing with @luhtech/site-template.
Readme
@luhtech/site-visuals
Canonical visual components for LuhTech venture marketing sites -- responsive hero images, numbered diagram figures, and article bylines. Composes with @luhtech/site-template (peer dependency); does not fork or replace any of its components.
Components
Hero.astro-- a real, responsive hero image (AVIF/WebP/JPEG at 768/1280/1920 viaastro:assets'<Picture>), with the same eyebrow/heading/subheading/CTA treatment every other section already uses (via@luhtech/site-template'sSectionHeading/CtaLink). A standalone, directly-composed component -- likeSplashHeroin site-template, it is not wired intoSection.astro'ssectionKinddispatch table. A page reaches for it when its hero section has a realheroImage.DiagramFigure.astro-- wraps site-template's ownDiagram.astrowith an optionalnumberprop, prefixing the caption with "Figure N." Deliberately not namedFigure-- site-template'sFigure.astroalready renders a different schema entity (section.figures[], a cited-stat callout), notsection.diagrams[].Byline.astro-- author / date / reading time / series / market-cell label for an article. Prop-driven, not schema-reading (article.schema.jsonhas no author/series/publishedAt fields yet -- that's separate, not-yet-landed scope). Reading time is always computed at render from real body text viareadingTimeMinutes(), never accepted as a stored value.
Setup in a consuming site
astro.config.mjs needs the asset-bank CDN host allowlisted for astro:assets' remote-image support:
export default defineConfig({
image: {
domains: ["ectropy-production-asset-bank.sfo3.cdn.digitaloceanspaces.com"],
},
});Asset resolution
resolveAssetUrl(assetId, bankType, ext) resolves an asset-bank assetId straight to its public CDN URL -- no runtime API call or credential, since the bucket is public-read and CDN-fronted. Registering a new asset (uploading bytes + writing the asset_bank_records row) is a separate, credentialed step (Ectropy-Business/scripts/ingest-asset-bank.py), out of scope for this package, which only renders assets that already exist.
