Reapply "Add missing admin action files and navigation links"
This reverts commit 4d515bc400.
This commit is contained in:
1 parent
96ed768f14
commit
5b4228261a
338 files changed
+28143
-5948
No files matched your search
@@ -53,10 +53,7 @@ function toHex(value: string | null, def: string): string {
|
||||
return value && /^#[0-9a-fA-F]{6}$/.test(value) ? value : def;
|
||||
}
|
||||
|
||||
function colorGrid(
|
||||
fields: { key: string; label: string; def: string }[],
|
||||
current: Record<string, string>,
|
||||
) {
|
||||
function colorGrid(fields: { key: string; label: string; def: string }[], current: Record<string, string>) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
@@ -134,10 +131,7 @@ export default async function AdminTheme({
|
||||
{Object.entries(PRESETS).map(([name, palette]) => (
|
||||
<form key={name} action={applyPreset}>
|
||||
<input type="hidden" name="preset" value={name} />
|
||||
<button
|
||||
type="submit"
|
||||
className="btn btn-outline inline-flex items-center gap-2"
|
||||
>
|
||||
<button type="submit" className="btn btn-outline inline-flex items-center gap-2">
|
||||
<span className="flex items-center gap-1">
|
||||
{["color_primary", "color_accent", "color_surface", "color_text"].map((k) => (
|
||||
<span
|
||||
@@ -164,24 +158,20 @@ export default async function AdminTheme({
|
||||
<form action={saveTheme}>
|
||||
<section className="mt-6">
|
||||
<h2 className="admin-section-title">{t("colours")}</h2>
|
||||
<div className="admin-card">
|
||||
{colorGrid(COLOR_FIELDS, current)}
|
||||
</div>
|
||||
<div className="admin-card">{colorGrid(COLOR_FIELDS, current)}</div>
|
||||
</section>
|
||||
|
||||
<section className="mt-6">
|
||||
<h2 className="admin-section-title">{t("buttonsLinks")}</h2>
|
||||
<div className="admin-card">
|
||||
{colorGrid(BUTTON_FIELDS, current)}
|
||||
</div>
|
||||
<div className="admin-card">{colorGrid(BUTTON_FIELDS, current)}</div>
|
||||
</section>
|
||||
|
||||
<section className="mt-6">
|
||||
<h2 className="admin-section-title">Gradient mix</h2>
|
||||
<p className="text-xs text-[var(--color-text-muted)] mb-2">Control the card header and hero background gradients.</p>
|
||||
<div className="admin-card">
|
||||
{colorGrid(GRADIENT_FIELDS, current)}
|
||||
</div>
|
||||
<p className="text-xs text-[var(--color-text-muted)] mb-2">
|
||||
Control the card header and hero background gradients.
|
||||
</p>
|
||||
<div className="admin-card">{colorGrid(GRADIENT_FIELDS, current)}</div>
|
||||
</section>
|
||||
|
||||
<section className="mt-6">
|
||||
@@ -228,9 +218,7 @@ export default async function AdminTheme({
|
||||
|
||||
<section className="mt-6">
|
||||
<h2 className="admin-section-title">{t("cssTitle")}</h2>
|
||||
<p className="text-xs text-[var(--color-text-muted)] mb-2">
|
||||
{t("cssSubtitle")}
|
||||
</p>
|
||||
<p className="text-xs text-[var(--color-text-muted)] mb-2">{t("cssSubtitle")}</p>
|
||||
<textarea
|
||||
name="custom_css"
|
||||
defaultValue={customCss}
|
||||
|
||||
Reference in new issue
Block a user