Front Matter CMS - Theme
Publisher: Elio StruyfThemes in package: 1
A theme intended for the screenshots of Front Matter CMS, based on the GitHub Light theme.
A theme intended for the screenshots of Front Matter CMS, based on the GitHub Light theme.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment, punctuation.definition.comment, string.comment | #6a737d | — |
| constant, entity.name.constant, variable.other.constant, variable.other.enummember, variable.language | #1281E2 | — |
| entity, entity.name | #8E25BB | — |
| variable.parameter.function | #0e131f | — |
| entity.name.tag | #337357 | — |
| keyword | #E94444 | — |
| storage, storage.type | #E94444 | — |
| storage.modifier.package, storage.modifier.import, storage.type.java | #0e131f | — |
| string, punctuation.definition.string, string punctuation.section.embedded source | #0E61AA | — |
| support | #1281E2 | — |
| meta.property-name | #1281E2 | — |
| variable | #F46715 | — |
| variable.other | #0e131f | — |
| invalid.broken | #b31d28 | italic |
| invalid.deprecated | #b31d28 | italic |
| invalid.illegal | #b31d28 | italic |
| invalid.unimplemented | #b31d28 | italic |
| carriage-return | #fafbfc | italic underline |
| message.error | #b31d28 | — |
| string variable | #1281E2 | — |
| source.regexp, string.regexp | #0E61AA | — |
| string.regexp.character-class, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #0E61AA | — |
| string.regexp constant.character.escape | #337357 | bold |
| support.constant | #1281E2 | — |
| support.variable | #1281E2 | — |
| meta.module-reference | #1281E2 | — |
| punctuation.definition.list.begin.markdown | #F46715 | — |
| markup.heading, markup.heading entity.name | #1281E2 | bold |
| markup.quote | #337357 | — |
| markup.italic | #0e131f | italic |
| markup.bold | #0e131f | bold |
| markup.underline | — | underline |
| markup.strikethrough | — | strikethrough |
| markup.inline.raw | #1281E2 | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #b31d28 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #337357 | — |
| markup.changed, punctuation.definition.changed | #F46715 | — |
| markup.ignored, markup.untracked | #f6f8fa | — |
| meta.diff.range | #8E25BB | bold |
| meta.diff.header | #1281E2 | — |
| meta.separator | #1281E2 | bold |
| meta.output | #1281E2 | — |
| brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote | #586069 | — |
| brackethighlighter.unmatched | #b31d28 | — |
| constant.other.reference.link, string.other.link | #0E61AA | underline |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}