OpenPoem Night
Publisher: OpenPoem.orgThemes in package: 1
A dark, cinematic theme for the few who listen between the words. Night black, cream ink, a single blood-red accent.
A dark, cinematic theme for the few who listen between the words. Night black, cream ink, a single blood-red accent.
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 | #6b6d75 | italic |
| string, string.quoted, punctuation.definition.string | #c9a978 | — |
| string.template, punctuation.definition.template-expression | #c9a978 | — |
| constant.character.escape, constant.other.placeholder | #e8b0a4 | — |
| constant.numeric, keyword.other.unit | #d98b7a | — |
| constant.language.boolean, constant.language.null, constant.language.undefined, constant.language.nan | #d1382b | — |
| keyword, keyword.control, storage.type, storage.modifier, keyword.operator.new, keyword.operator.expression, keyword.operator.logical | #d1382b | — |
| keyword.operator, punctuation.separator, punctuation.terminator, meta.brace, punctuation.accessor | #9a9ca4 | — |
| variable, variable.other, meta.definition.variable, variable.other.readwrite | #cbccd2 | — |
| variable.parameter, variable.parameter.function | #c6b2a6 | italic |
| variable.language, variable.language.this, keyword.other.this, variable.language.super | #d1382b | italic |
| entity.name.function, support.function, meta.function-call.generic, meta.function-call | #e8b0a4 | — |
| entity.name.type, entity.name.class, support.type, support.class, entity.other.inherited-class, entity.name.type.class | #e6c98a | — |
| support.type.primitive, keyword.type | #d1382b | italic |
| variable.other.property, meta.object-literal.key, support.type.property-name, variable.object.property, variable.other.object.property | #bfc1c9 | — |
| entity.name.tag, punctuation.definition.tag | #d1382b | — |
| entity.other.attribute-name | #e6c98a | italic |
| support.type.property-name.css, support.constant.property-value.css, constant.other.color | #e8b0a4 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.pseudo-class.css | #e6c98a | — |
| string.regexp, constant.other.character-class.regexp, punctuation.definition.character-class.regexp | #6fae86 | — |
| entity.name.namespace, entity.name.module, storage.modifier.import, storage.modifier.package | #e6c98a | — |
| meta.decorator, punctuation.decorator, entity.name.function.decorator, meta.decorator entity.name.function | #d99a5b | — |
| constant.other.symbol, constant.other.key, entity.name.constant | #e8b0a4 | — |
| support.constant, support.variable, support.other.variable | #d98b7a | — |
| markup.heading, entity.name.section, markup.heading entity.name | #f2efe8 | bold |
| punctuation.definition.heading.markdown | #d1382b | — |
| markup.bold | #e6c98a | bold |
| markup.italic | — | italic |
| markup.inline.raw, markup.fenced_code, markup.raw.block | #c9a978 | — |
| markup.underline.link, string.other.link, constant.other.reference.link.markdown | #d1382b | — |
| markup.quote | #8a8c94 | italic |
| markup.inserted, markup.inserted.diff | #6fae86 | — |
| markup.deleted, markup.deleted.diff | #d1382b | — |
| markup.changed, markup.changed.diff | #d99a5b | — |
| meta.diff.header, punctuation.definition.range.diff | #8a8c94 | — |
| invalid, invalid.illegal | #e5493c | — |
| invalid.deprecated | #e5493c | strikethrough |
| entity.name.label, keyword.control.label | #e6c98a | — |
| token.info-token | #7fb0a8 | — |
| token.warn-token | #d8b46a | — |
| token.error-token | #e5493c | — |
| token.debug-token | #c98aa0 | — |
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}!`;
}