mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 09:15:33 +00:00
Titel
This commit is contained in:
@@ -99,10 +99,110 @@ type AlmanachResult struct {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
const noenters = document.querySelectorAll(".no-enter");
|
||||
noenters.forEach((el) => {
|
||||
el.addEventListener("keydown", (ev) => {
|
||||
if (ev.key === "Enter") {
|
||||
ev.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="container-normal mx-auto px-8 mt-4">
|
||||
{{ template "_usermessage" $model }}
|
||||
<form class="w-full grid grid-cols-12 gap-4" id="changealmanachform" x-target="changealmanachform user-message almanach-header-data" hx-boost="false" method="POST">
|
||||
<form class="w-full grid grid-cols-12 gap-4 dbform" id="changealmanachform" x-target="changealmanachform user-message almanach-header-data" hx-boost="false" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ $model.csrf_token }}" />
|
||||
<input type="hidden" name="last_edited" value="{{ $model.result.Entry.Updated }}" />
|
||||
|
||||
<div class="inputwrapper col-span-8">
|
||||
<div class="flex flex-row justify-between">
|
||||
<label for="preferred_title" class="inputlabel">Kurztitel<i class="ri-text"></i></label>
|
||||
<reset-button class="text-sm" controls="preferred_title" wrapper-class="inputwrapper" modified-class-suffix="modified"></reset-button>
|
||||
</div>
|
||||
<textarea name="preferred_title" id="preferred_title" class="inputinput no-enter" placeholder="" required autocomplete="off">{{ $model.result.Entry.PreferredTitle }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-span-4"></div>
|
||||
<div class="col-span-8" id="titles"></div>
|
||||
|
||||
<div class="col-span-4"></div>
|
||||
|
||||
<div-menu target-id="titles" class="col-span-2 col-start-7">
|
||||
<button class="div-menu-button text-xs text-right w-full cursor-pointer"><i class="ri-add-line"></i> Titel hinzufügen</button>
|
||||
|
||||
<div class="inputwrapper {{ if eq $model.result.Entry.TitleStmt "" }}hidden{{ end }}" data-value="titel">
|
||||
<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">
|
||||
<reset-button controls="title" wrapper-class="inputwrapper" modified-class-suffix="modified" class="text-sm"></reset-button>
|
||||
<button
|
||||
@click="(ev) => {
|
||||
ev.preventDefault();
|
||||
$el.parentNode.parentNode.parentNode.classList.add('hidden');
|
||||
}"
|
||||
class="text-sm cursor-pointer">
|
||||
<i class="ri-close-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<textarea name="title" id="title" class="inputinput" placeholder="" autocomplete="off" rows="2">{{ $model.result.Entry.TitleStmt }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.SubtitleStmt "" }}hidden{{ end }}" data-value="subtitle">
|
||||
<div class="flex flex-row justify-between">
|
||||
<label for="subtitle" class="inputlabel menu-label">Untertitel <i class="ri-text"></i></label>
|
||||
<div>
|
||||
<reset-button controls="subtitle" wrapper-class="inputwrapper" modified-class-suffix="modified" class="text-sm"></reset-button>
|
||||
<button
|
||||
@click="(ev) => {
|
||||
ev.preventDefault();
|
||||
$el.parentNode.parentNode.parentNode.classList.add('hidden');
|
||||
}"
|
||||
class="text-sm cursor-pointer">
|
||||
<i class="ri-close-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<textarea name="subtitle" id="subtitle" class="inputinput" placeholder="" autocomplete="off" rows="2">{{ $model.result.Entry.SubtitleStmt }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.VariantTitle "" }}hidden{{ end }}" data-value="varianttitle">
|
||||
<div class="flex flex-row justify-between">
|
||||
<label for="varianttitle" class="inputlabel menu-label">Titelvariante(n) <i class="ri-text"></i></label>
|
||||
<div>
|
||||
<reset-button controls="varianttitle" wrapper-class="inputwrapper" modified-class-suffix="modified" class="text-sm"></reset-button>
|
||||
<button
|
||||
@click="(ev) => {
|
||||
ev.preventDefault();
|
||||
$el.parentNode.parentNode.parentNode.classList.add('hidden');
|
||||
}"
|
||||
class="text-sm cursor-pointer">
|
||||
<i class="ri-close-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<textarea name="varianttitle" id="varianttitle" class="inputinput" placeholder="" autocomplete="off" rows="2">{{ $model.result.Entry.VariantTitle }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.ParallelTitle "" }}hidden{{ end }}" data-value="paralleltitle">
|
||||
<div class="flex flex-row justify-between">
|
||||
<label for="paralleltitle" class="inputlabel menu-label">Titel (übersetzt) <i class="ri-text"></i></label>
|
||||
<div>
|
||||
<reset-button controls="paralleltitle" wrapper-class="inputwrapper" modified-class-suffix="modified" class="text-sm"></reset-button>
|
||||
<button
|
||||
@click="(ev) => {
|
||||
ev.preventDefault();
|
||||
$el.parentNode.parentNode.parentNode.classList.add('hidden');
|
||||
}"
|
||||
class="text-sm cursor-pointer">
|
||||
<i class="ri-close-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<textarea name="paralleltitle" id="paralleltitle" class="inputinput" placeholder="" autocomplete="off" rows="2">{{ $model.result.Entry.ParallelTitle }}</textarea>
|
||||
</div>
|
||||
</div-menu>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user