+Incipit on inoput form

This commit is contained in:
Simon Martens
2026-01-07 11:19:41 +01:00
parent 25641c4dec
commit 02d78388e7
2 changed files with 61 additions and 47 deletions

View File

@@ -82,10 +82,10 @@ type AlmanachResult struct {
<div class="font-bold text-sm mb-1"><i class="ri-calendar-line"></i> Zuletzt bearbeitet</div>
<div>
<div class="px-1.5 py-0.5 rounded-xs bg-gray-200 w-fit">
{{ GermanDate $model.result.Entry.Updated }};
{{ GermanDate $model.result.Entry.Updated }},
{{ GermanTime
$model.result.Entry.Updated
}}
}}h
</div>
{{- if $model.result.User -}}
<div class="px-1.5 py-0.5 rounded-xs mt-1.5 bg-gray-200 w-fit">
@@ -142,13 +142,14 @@ type AlmanachResult struct {
</div>
<div-manager dm-target="titles" class="col-span-2 col-start-7">
<button class="dm-menu-button text-xs text-right w-full cursor-pointer"><i class="ri-add-line"></i> Titel hinzufügen</button>
<button class="dm-menu-button text-right w-full cursor-pointer"><i class="ri-add-line"></i>
Titeldaten hinzufügen</button>
<div class="inputwrapper {{ if eq $model.result.Entry.TitleStmt "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="title" class="inputlabel menu-label"> Titel <i class="ri-text"></i> </label>
<div class="text-xs">
<button class="dm-close-button">
<label for="title" class="inputlabel menu-label"> <i class="ri-text"></i> Titel</label>
<div class="pr-2">
<button class="dm-close-button font-bold input-label">
<i class="ri-close-line"></i>
</button>
</div>
@@ -156,47 +157,15 @@ type AlmanachResult struct {
<textarea name="title" id="title" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.TitleStmt -}}
</textarea
>
</textarea>
</div>
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.SubtitleStmt "" }}hidden{{ end }}">
<div class="mt-2 inputwrapper {{ if eq $model.result.Entry.ParallelTitle "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="subtitle" class="inputlabel menu-label"> Untertitel <i class="ri-text"></i> </label>
<div class="text-xs">
<button class="dm-close-button">
<i class="ri-close-line"></i>
</button>
</div>
</div>
<textarea name="subtitle" id="subtitle" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.SubtitleStmt -}}
</textarea
>
</div>
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.VariantTitle "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="varianttitle" class="inputlabel menu-label"> Titelvarianten <i class="ri-text"></i> </label>
<div class="text-xs">
<button class="dm-close-button">
<i class="ri-close-line"></i>
</button>
</div>
</div>
<textarea name="varianttitle" id="varianttitle" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.VariantTitle -}}
</textarea
>
</div>
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.ParallelTitle "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="paralleltitle" class="inputlabel menu-label"> Übersetzter Titel <i class="ri-text"></i> </label>
<div class="text-xs">
<button class="dm-close-button">
<label for="paralleltitle" class="inputlabel menu-label"><i class="ri-text"></i> Titel
(übersetzt)</label>
<div class="pr-2">
<button class="dm-close-button font-bold input-label">
<i class="ri-close-line"></i>
</button>
</div>
@@ -204,8 +173,54 @@ type AlmanachResult struct {
<textarea name="paralleltitle" id="paralleltitle" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.ParallelTitle -}}
</textarea
>
</textarea>
</div>
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.SubtitleStmt "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="subtitle" class="inputlabel menu-label"><i class="ri-text"></i> Untertitel</label>
<div class="pr-2">
<button class="dm-close-button font-bold input-label">
<i class="ri-close-line"></i>
</button>
</div>
</div>
<textarea name="subtitle" id="subtitle" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.SubtitleStmt -}}
</textarea>
</div>
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.VariantTitle "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="varianttitle" class="inputlabel menu-label"><i class="ri-text"></i>
Titelvarianten</label>
<div class="pr-2">
<button class="dm-close-button font-bold input-label">
<i class="ri-close-line"></i>
</button>
</div>
</div>
<textarea name="varianttitle" id="varianttitle" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.VariantTitle -}}
</textarea>
</div>
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.IncipitStmt "" }}hidden{{ end }}">
<div class="flex flex-row justify-between">
<label for="incipit" class="inputlabel menu-label"><i class="ri-text"></i> Incipit</label>
<div class="pr-2">
<button class="dm-close-button font-bold input-label">
<i class="ri-close-line"></i>
</button>
</div>
</div>
<textarea name="incipit" id="incipit" class="inputinput" placeholder="" autocomplete="off">
{{- $model.result.Entry.IncipitStmt -}}
</textarea>
</div>
</div-manager>
</form>

View File

@@ -7,7 +7,6 @@ const DM_MENU_CLASS = "dm-menu";
const DM_ITEM_CLASS = "dm-menu-item";
const DM_CLOSE_BUTTON_CLASS = "dm-close-button";
//
// Prereq: child divs must eiteher have dm-title attr or a label element
// The child divs will be moved to the target element when selected
// The target element must be specified by the attribute dm-target on the custom element