Request details, Drive folders, image folders, clip tool to Drive (v1.9.12 to v1.9.14-content-display) #16

Merged
ngu-git-admin merged 13 commits from content-display into main 2026-09-30 19:05:26 +01:00
4 changed files with 13 additions and 10 deletions
Showing only changes of commit 9ff1cd6e99 - Show all commits

View file

@ -60,7 +60,7 @@ hand.
| Folder | Used by | Set in | | Folder | Used by | Set in |
| --- | --- | --- | | --- | --- | --- |
| `Requests/<type>` | Files sent with the Request form, a folder per type (`Requests/Chapters`, `Requests/Blog posts`...) | `DRIVE_FOLDER` and `TYPE_FOLDERS` in `server/src/routes/requests.js` | | `Requests/<type>` | Files sent with the Request form, a folder per type (`Requests/Chapters`, `Requests/Blog Posts`...) | `DRIVE_FOLDER` and `TYPE_FOLDERS` in `server/src/routes/requests.js` |
| `Media` and folders in it | Files for pages to link to (Tools → Media → Files), in folders you make there | `FOLDER` in `server/src/routes/files.js` | | `Media` and folders in it | Files for pages to link to (Tools → Media → Files), in folders you make there | `FOLDER` in `server/src/routes/files.js` |
A new use calls `driveUpload("<Folder>", name, mime, bytes)` from A new use calls `driveUpload("<Folder>", name, mime, bytes)` from

View file

@ -67,7 +67,7 @@ const MIN_MESSAGE = 10;
// folder per type under Requests, eg. Requests/Chapters. // folder per type under Requests, eg. Requests/Chapters.
const DRIVE_FOLDER = "Requests"; const DRIVE_FOLDER = "Requests";
const TYPE_FOLDERS = { const TYPE_FOLDERS = {
blog: "Blog posts", blog: "Blog Posts",
event: "Events", event: "Events",
chapter: "Chapters", chapter: "Chapters",
region: "Regions", region: "Regions",

View file

@ -24,8 +24,9 @@
a fold-out of description, media, map); a fold-out of description, media, map);
text is an optional intro. ScheduleBlock text is an optional intro. ScheduleBlock
table text: a row per line, cells split by | table text: a row per line, cells split by |
cards items as link cards: text the title, cards items as link cards, up to three in a row:
detail, url, media the picture text the title, detail, url, media the
picture
divider nothing divider nothing
"Formatted" is InlineText.tsx: **bold**, *italic*, [text](url), "Formatted" is InlineText.tsx: **bold**, *italic*, [text](url),
@ -95,10 +96,10 @@ function LinkCard({ item }: { item: ContentBlockItem }) {
{!img.failed && ( {!img.failed && (
<img src={img.src} alt="" loading="lazy" onError={img.onError} className="aspect-video w-full object-cover" /> <img src={img.src} alt="" loading="lazy" onError={img.onError} className="aspect-video w-full object-cover" />
)} )}
<span className="flex flex-1 flex-col gap-1 p-5"> <span className="flex flex-1 flex-col gap-1 p-4">
<span className="text-xs font-semibold text-muted">{where}</span> <span className="truncate text-xs font-semibold text-muted">{where}</span>
<span className="font-display text-lg font-bold leading-snug text-ink group-hover:text-link">{item.text}</span> <span className="font-display text-base font-bold leading-snug text-ink group-hover:text-link">{item.text}</span>
{item.detail && <span className="line-clamp-3 text-sm text-body">{item.detail}</span>} {item.detail && <span className="line-clamp-3 text-sm leading-snug text-body">{item.detail}</span>}
</span> </span>
</Anchor> </Anchor>
) )
@ -224,7 +225,9 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
const cards = (block.items ?? []).filter((item) => item.url && item.text) const cards = (block.items ?? []).filter((item) => item.url && item.text)
if (cards.length === 0) return null if (cards.length === 0) return null
return ( return (
<ul className={cards.length === 1 ? 'max-w-xl' : 'grid gap-4 sm:grid-cols-2'}> // One grid whatever the count: a lone card takes a column
// rather than the width, and more sit up to three in a row.
<ul className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
{cards.map((item, i) => ( {cards.map((item, i) => (
<li key={i}> <li key={i}>
<LinkCard item={item} /> <LinkCard item={item} />

View file

@ -279,7 +279,7 @@ export const BLOCK_TYPES = [
["video", "Video", "A YouTube, Vimeo or Facebook video, or a video file, played in place."], ["video", "Video", "A YouTube, Vimeo or Facebook video, or a video file, played in place."],
["schedule", "Schedule", "Entries in one tab per day, each folding out for more. The text is an optional intro."], ["schedule", "Schedule", "Entries in one tab per day, each folding out for more. The text is an optional intro."],
["table", "Table", "A grid of text, eg. a comparison chart: one row per line, cells split by |, the first row the header."], ["table", "Table", "A grid of text, eg. a comparison chart: one row per line, cells split by |, the first row the header."],
["cards", "Link cards", "Cards with a picture, title and description, each a link, like a link shared in a chat. Paste a link and press Fetch preview."], ["cards", "Link cards", "Cards with a picture, title and description, each a link to a page or a file, like a link shared in a chat; up to three in a row. Paste a link and press Fetch preview, or Choose a file."],
["divider", "Divider", "A thin line between parts."], ["divider", "Divider", "A thin line between parts."],
]; ];