Revert "Add missing admin action files and navigation links"
This reverts commit 41be6835bf.
This commit is contained in:
1 parent
4a1e1115b3
commit
4d515bc400
338 files changed
+5949
-28144
No files matched your search
@@ -53,7 +53,10 @@ 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={{
|
||||
@@ -131,7 +134,10 @@ 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
|
||||
@@ -158,20 +164,24 @@ 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">
|
||||
@@ -218,7 +228,9 @@ 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