diff --git a/web/src/components/TagsBox.astro b/web/src/components/TagsBox.astro index 2e7a81a4..8ff6fcee 100644 --- a/web/src/components/TagsBox.astro +++ b/web/src/components/TagsBox.astro @@ -1,12 +1,14 @@ --- -// a page's tags, folded away at the end of its content (#52): "ٹیگ" and how many; open to see the chips -import Tags from './Tags.astro'; +// a page's tags at the end of its content (#52): «ٹیگ» and how many, at the start of the line; opened, the tags follow it +// on the same line and wrap across the content's width. A visually hidden checkbox holds open/closed (no script needed) import { ud } from '../lib/urdu'; const { tags } = Astro.props as { tags: { type: string; name: string }[] }; +const href = (t: { type: string; name: string }) => `/tag/${encodeURIComponent(t.type)}/${encodeURIComponent(t.name)}`; --- {tags.length > 0 && ( - +
)} diff --git a/web/src/pages/design.astro b/web/src/pages/design.astro index 34c4df1b..c517c6ac 100644 --- a/web/src/pages/design.astro +++ b/web/src/pages/design.astro @@ -3,6 +3,7 @@ // Switch palette, light/dark and font from the header's display settings. import Base from '../layouts/Base.astro'; import Icon from '../components/Icon.astro'; +import TagsBox from '../components/TagsBox.astro'; if (import.meta.env.PROD) return new Response(null, { status: 404 }); const colours = [ ['surfaces', ['surface-page', 'surface-raised', 'surface-poem', 'surface-sunken']], @@ -72,6 +73,9 @@ const radii = ['sm', 'md', 'lg', 'pill']; شائع شدہواپس +