lovely. got a couple of partial implementations....

This commit is contained in:
Chris Kruining 2025-04-03 17:27:35 +02:00
parent 89ca4013fd
commit 89f526e9d9
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
14 changed files with 180 additions and 154 deletions

View file

@ -1,8 +1,11 @@
import type { Entry } from "../content";
import { Component } from "solid-js";
import { createSlug } from "../content";
import { Component, createMemo } from "solid-js";
import css from "./list-item.module.css";
export const ListItem: Component<{ entry: Entry }> = (props) => {
const slug = createMemo(() => createSlug(props.entry));
return (
<div class={css.listItem}>
<img src={props.entry.thumbnail} />
@ -10,7 +13,7 @@ export const ListItem: Component<{ entry: Entry }> = (props) => {
<main>
<strong>{props.entry.title}</strong>
<a href={`/watch/${props.entry.id}`}>Watch now</a>
<a href={`/watch/${slug()}`}>Watch now</a>
</main>
</div>
);