sabisan/web/templates/admin_main.html
2026-05-16 20:30:20 +01:00

36 lines
2.7 KiB
HTML

{{define "admin_main.html"}}
{{template "admin_shell_start" .}}
{{template "admin_main_panel" .}}
{{template "admin_shell_end" .}}
{{end}}
{{define "admin_main_partial.html"}}
{{template "admin_tabs_oob" .}}
{{template "admin_flash_oob" .}}
{{template "admin_main_panel" .}}
{{end}}
{{define "admin_main_panel"}}
<section class="bg-white p-6 shadow-sm">
<h1 class="mb-6 text-2xl font-semibold">Main Content</h1>
<form method="post" action="/admin/content" enctype="multipart/form-data" class="grid gap-5">
<input type="hidden" name="hero_image_current" value="{{.Content.HeroImage}}">
<input type="hidden" name="about_image_current" value="{{.Content.AboutImage}}">
<div class="grid gap-4 md:grid-cols-2">
<label class="block text-sm"><span class="mb-2 block text-neutral-500">Hero title</span><input name="hero_title" value="{{.Content.HeroTitle}}" class="w-full border px-3 py-2"></label>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">Hero subtitle</span><input name="hero_subtitle" value="{{.Content.HeroSubtitle}}" class="w-full border px-3 py-2"></label>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">Intro title</span><input name="intro_title" value="{{.Content.IntroTitle}}" class="w-full border px-3 py-2"></label>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">About name</span><input name="about_name" value="{{.Content.AboutName}}" class="w-full border px-3 py-2"></label>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">About role</span><input name="about_role" value="{{.Content.AboutRole}}" class="w-full border px-3 py-2"></label>
</div>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">Intro text</span><textarea name="intro_text" rows="3" class="w-full border px-3 py-2">{{.Content.IntroText}}</textarea></label>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">About bio</span><textarea name="about_bio" rows="4" class="w-full border px-3 py-2">{{.Content.AboutBio}}</textarea></label>
<div class="grid gap-4 md:grid-cols-2">
<label class="block text-sm"><span class="mb-2 block text-neutral-500">Hero image</span><input name="hero_image" type="file" accept="image/png,image/jpeg,image/webp,image/gif" class="w-full border px-3 py-2"></label>
<label class="block text-sm"><span class="mb-2 block text-neutral-500">About image</span><input name="about_image" type="file" accept="image/png,image/jpeg,image/webp,image/gif" class="w-full border px-3 py-2"></label>
</div>
<button class="w-fit bg-neutral-950 px-5 py-3 text-sm uppercase tracking-[0.18em] text-white">Save content</button>
</form>
</section>
{{end}}