Code Display Test
1 min read
A sample post to test dark mode code blocks.
JavaScript
function greet(name) {
const message = `Hello, ${name}!`;
console.log(message);
return message;
}
const colors = ["stone", "amber", "warm"];
colors.forEach((c) => greet(c));
CSS
html.dark {
--color-background: #1c1917;
--color-accent: #f59e0b;
}
TypeScript
interface Theme {
name: "light" | "dark";
background: string;
accent: string;
}
const dark: Theme = {
name: "dark",
background: "#1c1917",
accent: "#f59e0b",
};
Some inline code too: localStorage.getItem('theme') and regular prose text to verify dark mode typography.