mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
created javascript modules
This commit is contained in:
@@ -20,5 +20,25 @@
|
||||
@* Styles *@
|
||||
<link rel="stylesheet" href="/dist/style.css" asp-append-version="true" />
|
||||
|
||||
@* JavaScript *@
|
||||
@await Html.PartialAsync("/Views/Shared/_JavaScript.cshtml")
|
||||
<script type="module">
|
||||
import { startup_clipboard, startup_markanchor, startup_mobilemenu, startup_scrollbutton, startup_marginals, startup_theme, startup_menu } from "/dist/scripts.js";
|
||||
startup_marginals();
|
||||
startup_theme();
|
||||
startup_scrollbutton();
|
||||
startup_menu();
|
||||
startup_mobilemenu();
|
||||
startup_markanchor();
|
||||
startup_clipboard();
|
||||
</script>
|
||||
<script type="module">
|
||||
import "/js/mark.min.js";
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user