diff --git a/README.md b/README.md index 0a252b1b..e4f9d699 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ Astro + Tailwind source for the [Abstract Machines](https://absmach.eu) website ## Development ```bash -npm install -npm run dev +pnpm install +pnpm run dev ``` Astro runs on `http://localhost:4321` by default. @@ -29,8 +29,8 @@ Astro runs on `http://localhost:4321` by default. ## Build & Preview ```bash -npm run build -npm run preview +pnpm run build +pnpm run preview ``` ## Cloudflare Scripts @@ -38,8 +38,8 @@ npm run preview Use the package scripts for Pages Functions workflows: ```bash -npm run cf:dev -npm run cf:deploy +pnpm run cf:dev +pnpm run cf:deploy ``` - `cf:dev`: Builds the site and starts local Pages dev server from `dist/` using `wrangler.jsonc`. @@ -112,7 +112,7 @@ Production does not use `.dev.vars`. - `.dev.vars` is local-only for `wrangler pages dev`. - For production, configure values in Cloudflare Pages: -Dashboard -> Pages -> your project -> Settings -> Variables and Secrets -> Production. + Dashboard -> Pages -> your project -> Settings -> Variables and Secrets -> Production. - No separate production env file is required in the repo. For local Cloudflare Pages function testing, copy `.dev.vars.example` to `.dev.vars` and fill the values. @@ -128,7 +128,7 @@ See [WRITING.md](WRITING.md) for frontmatter and writing guidelines. ## Sitemap / robots.txt -- `@astrojs/sitemap` generates `dist/sitemap-index.xml` (and chunk files like `dist/sitemap-0.xml`) during `npm run build`. +- `@astrojs/sitemap` generates `dist/sitemap-index.xml` (and chunk files like `dist/sitemap-0.xml`) during `pnpm run build`. - `src/pages/robots.txt.ts` is prerendered as `/robots.txt` and points to `/sitemap-index.xml`. ## RSS diff --git a/public/img/s0.png b/public/img/s0.png deleted file mode 100644 index eb95b21b..00000000 Binary files a/public/img/s0.png and /dev/null differ diff --git a/public/img/s0.webp b/public/img/s0.webp new file mode 100644 index 00000000..767de56c Binary files /dev/null and b/public/img/s0.webp differ diff --git a/public/img/s1.mp4 b/public/img/s1.mp4 new file mode 100644 index 00000000..b705244a Binary files /dev/null and b/public/img/s1.mp4 differ diff --git a/src/components/ProductCard.astro b/src/components/ProductCard.astro index b4e979e9..986ebc9d 100644 --- a/src/components/ProductCard.astro +++ b/src/components/ProductCard.astro @@ -11,6 +11,7 @@ const { subtitle, kicker, logoSrc, + videoSrc, logoAlt = "Product logo", logoLoading = "lazy", logoClass = "", @@ -18,6 +19,7 @@ const { } = Astro.props; const hasLogo = logoSrc || Astro.slots.has("logo"); +const isVideo = videoSrc || (logoSrc && (logoSrc.endsWith('.mp4') || logoSrc.endsWith('.webm') || logoSrc.endsWith('.ogg'))); const splitClass = featured ? "flex flex-col gap-5 md:flex-row md:gap-0" : "flex flex-col gap-5 lg:flex-row lg:gap-0"; @@ -42,6 +44,15 @@ const articleClass = featured
+ ) : isVideo ? ( +