Unterstützung von Übersetzungen + Dark Mode

This commit is contained in:
Simon-Martens
2024-01-24 15:04:23 +01:00
parent 02822dbe06
commit a29080b117
15 changed files with 74 additions and 59 deletions

View File

@@ -5,7 +5,7 @@
@await Html.PartialAsync("/Views/Shared/_Head.cshtml")
</head>
<body class="h-full w-full">
<body class="h-full w-full" hx-boost="true">
<div class="flex flex-col h-full">
@await Html.PartialAsync("/Views/Shared/_HKBMenu.cshtml")
<main role="main" class="mb-6 w-full desktop:max-w-screen-desktop mx-auto grow">

View File

@@ -3,8 +3,8 @@
}
<header class="sticky w-100 font-serif mb-6">
<nav class="flex flex-row w-100 bg-slate-50 border-t-[5px] border-gray-300 dark:shadow-xl dark:border-gray-900 py-3 px-3 desktop:px-8 flex-wrap">
<a asp-controller="Index" asp-action="Index" class="text-xl xl:text-3xl grow-0 shrink-0 text-black hover:text-black">
<nav class="flex flex-row w-100 bg-slate-50 border-t-[5px] border-gray-300 dark:shadow-xl dark:border-gray-900 py-3 px-3 desktop:px-8 flex-wrap dark:bg-black dark:text-slate-100">
<a asp-controller="Index" asp-action="Index" class="text-xl xl:text-3xl grow-0 shrink-0 text-black hover:text-black dark:text-slate-100">
<img src="/favicon.ico" class="inline-block w-8 h-8 xl:w-12 xl:h-12 mr-2 border border-gray-300 shadow-sm" alt="HKB-Logo" loading="lazy" />
<span class="sm:hidden">Hamann: Komm. Briefausgabe</span>
<span class="hidden sm:inline md:hidden">Johan Georg Hamann: Kommentierte Briefausgabe</span>
@@ -30,7 +30,7 @@
</svg>
</button>
</div>
<div class="ha-topnav " id="ha-topnav">
<div class="ha-topnav" id="ha-topnav">
<a class="ha-active-default" asp-controller="Index" asp-action="Index">
Suche & Briefauswahl

View File

@@ -8,19 +8,17 @@
<script defer src="/js/scrollbutton.js" asp-append-version="true"></script>
<script defer src="/js/clipboard.js" asp-append-version="true"></script>
@if (ViewData.ContainsKey("Mark")) {
<script src="/js/mark.min.js" asp-append-version="true"></script>
@* This uses Razor Syntax so it is inlined into this razor file *@
<script>
document.addEventListener("DOMContentLoaded", (event) => {
var elements = document.querySelectorAll(".ha-register-body, .ha-searchresultpreview, .ha-commenthead, .ha-entry");
if (elements.length < 1000) {
var instancesearch = new Mark(elements);
instancesearch.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"] });
}
var instanceletter = new Mark(document.querySelectorAll(".ha-letterbody"));
instanceletter.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"] });
});
</script>
}
<script src="/js/mark.min.js" asp-append-version="true"></script>
@* This uses Razor Syntax so it is inlined into this razor file *@
<script>
document.addEventListener("DOMContentLoaded", (event) => {
var elements = document.querySelectorAll(".ha-register-body, .ha-searchresultpreview, .ha-commenthead, .ha-entry");
if (elements.length < 1000) {
var instancesearch = new Mark(elements);
instancesearch.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"] });
}
var instanceletter = new Mark(document.querySelectorAll(".ha-letterbody"));
instanceletter.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"] });
});
</script>