themes how part of site settings

This commit is contained in:
Mark Gregory
2026-07-28 12:43:19 +01:00
parent eafc5e8063
commit f834328044
12 changed files with 144 additions and 18 deletions
@@ -31,6 +31,12 @@
@if (! empty($field['help']))<span class="mt-1 block text-xs text-zinc-500">{{ $field['help'] }}</span>@endif
@if (($field['type'] ?? 'text') === 'textarea')
<textarea name="settings[{{ $key }}]" rows="4" class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">{{ old("settings.$key", $values[$key] ?? '') }}</textarea>
@elseif (($field['type'] ?? 'text') === 'select')
<select name="settings[{{ $key }}]" class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
@foreach (($field['options'] ?? []) as $optionValue => $optionLabel)
<option value="{{ $optionValue }}" @selected(old("settings.$key", $values[$key] ?? '') === $optionValue)>{{ $optionLabel }}</option>
@endforeach
</select>
@else
<input type="{{ $field['type'] ?? 'text' }}" name="settings[{{ $key }}]" value="{{ old("settings.$key", $values[$key] ?? '') }}" placeholder="{{ $field['placeholder'] ?? '' }}" class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
@endif