continue re-design

This commit is contained in:
Developers Digest
2025-09-05 13:06:17 -04:00
parent b96d048dbd
commit 836b085f75
270 changed files with 32269 additions and 5182 deletions
@@ -0,0 +1,31 @@
import colors from "@/styles/colors.json";
const TYPED_COLORS = colors as unknown as Record<
string,
Record<"hex" | "p3", string>
>;
const hslValues = Object.entries(TYPED_COLORS).map(([key, value]) => {
// Fix hex values - they need # prefix
const hexValue = value.hex.startsWith("#") ? value.hex : `#${value.hex}`;
return `--${key}: ${hexValue}`;
});
const p3Values = Object.entries(TYPED_COLORS)
.filter(([, value]) => value.p3)
.map(([key, value]) => `--${key}: color(display-p3 ${value.p3})`);
const colorsStyle = `
:root {
${hslValues.join(";\n ")}
}
@supports (color: color(display-p3 1 1 1)) {
:root {
${p3Values.join(";\n ")}
}
}`;
export default function ColorStyles() {
return <style dangerouslySetInnerHTML={{ __html: colorsStyle }} />;
}