mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
better page styling
This commit is contained in:
@@ -143,6 +143,11 @@ function markCurrentPagesInInhaltsverzeichnis(pageNumbers) {
|
||||
}
|
||||
});
|
||||
|
||||
// Hide all continuation entries by default
|
||||
document.querySelectorAll('.continuation-entry').forEach(entry => {
|
||||
entry.classList.add('hidden');
|
||||
});
|
||||
|
||||
// Reset all page numbers in Inhaltsverzeichnis
|
||||
document.querySelectorAll('.page-number-inhalts').forEach(pageNum => {
|
||||
pageNum.classList.remove('bg-red-500', 'text-white');
|
||||
@@ -216,6 +221,12 @@ function markCurrentPagesInInhaltsverzeichnis(pageNumbers) {
|
||||
if (pageContainer) {
|
||||
pageContainer.classList.remove('border-slate-300', 'border-amber-400');
|
||||
pageContainer.classList.add('border-red-500');
|
||||
|
||||
// Show continuation entries for this visible page
|
||||
const continuationEntries = pageContainer.querySelectorAll('.continuation-entry[data-page="' + startPage + '"]');
|
||||
continuationEntries.forEach(entry => {
|
||||
entry.classList.remove('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
// Also make links in the current article non-clickable and remove hover effects
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="space-y-0">
|
||||
{{ range $groupedPiece := (index $model.Pieces.Items $page) }}
|
||||
<div class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200" data-page="{{ $page }}">
|
||||
<div class="inhalts-entry py-1 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200{{ if $groupedPiece.PieceByIssue.IsContinuation }} continuation-entry hidden{{ end }}" data-page="{{ $page }}"{{ if $groupedPiece.PieceByIssue.IsContinuation }} data-is-continuation="true"{{ end }}>
|
||||
{{ template "_inhaltsverzeichnis_eintrag" $groupedPiece.PieceByIssue }}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
{{ range $groupedPiece := (index $model.AdditionalPieces.Items $page) }}
|
||||
<div class="inhalts-entry py-2 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200" data-page="{{ $page }}">
|
||||
<div class="inhalts-entry py-2 px-0 bg-slate-50 rounded hover:bg-slate-100 transition-colors duration-200{{ if $groupedPiece.PieceByIssue.IsContinuation }} continuation-entry hidden{{ end }}" data-page="{{ $page }}"{{ if $groupedPiece.PieceByIssue.IsContinuation }} data-is-continuation="true"{{ end }}>
|
||||
{{ template "_inhaltsverzeichnis_eintrag" $groupedPiece.PieceByIssue }}
|
||||
|
||||
|
||||
|
||||
@@ -392,6 +392,11 @@ function markCurrentPagesInInhaltsverzeichnis(pageNumbers) {
|
||||
}
|
||||
});
|
||||
|
||||
// Hide all continuation entries by default
|
||||
document.querySelectorAll('.continuation-entry').forEach(entry => {
|
||||
entry.classList.add('hidden');
|
||||
});
|
||||
|
||||
// Reset all page numbers in Inhaltsverzeichnis
|
||||
document.querySelectorAll('.page-number-inhalts').forEach(pageNum => {
|
||||
pageNum.classList.remove('text-red-600', 'font-bold');
|
||||
@@ -462,6 +467,12 @@ function markCurrentPagesInInhaltsverzeichnis(pageNumbers) {
|
||||
if (pageContainer) {
|
||||
pageContainer.classList.remove('border-slate-300', 'border-amber-400');
|
||||
pageContainer.classList.add('border-red-500');
|
||||
|
||||
// Show continuation entries for this visible page
|
||||
const continuationEntries = pageContainer.querySelectorAll('.continuation-entry[data-page="' + startPage + '"]');
|
||||
continuationEntries.forEach(entry => {
|
||||
entry.classList.remove('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
// Also make links in the current article non-clickable and remove hover effects
|
||||
|
||||
Reference in New Issue
Block a user