Links
Saved reading and interesting things from my public{" "} Semble collection.
The saved links could not be loaded right now. You can still browse them on Semble.
) : cards.length === 0 ? (No saved links yet.
) : ( )}import { getProfile, getSembleData, type SembleData } from "../data.ts";
import { PageNav } from "./page-nav.tsx";
function publicUrl(value: string): URL | undefined {
try {
const url = new URL(value);
return ["https:", "http:"].includes(url.protocol) ? url : undefined;
} catch {
return undefined;
}
}
function excerpt(description: string): string {
const text = description.replace(/\s+/g, " ").trim();
if (text.length <= 300) return text;
const end = text.lastIndexOf(" ", 300);
return `${text.slice(0, end > 0 ? end : 300)}…`;
}
// Read-only projection of Cameron's existing public Semble bookmarks, not contacts.
export function LinksContent({ data }: { data: SembleData }) {
const cards = data.cards.filter((card) => card.type === "URL" && publicUrl(card.url));
return (
Saved reading and interesting things from my public{" "}
Semble collection.
The saved links could not be loaded right now. You can still browse them on Semble. No saved links yet.Links