diff --git a/HaWeb/Views/Admin/Dynamic/XMLState.cshtml b/HaWeb/Views/Admin/Dynamic/XMLState.cshtml index 3c7bb47..0174593 100644 --- a/HaWeb/Views/Admin/Dynamic/XMLState.cshtml +++ b/HaWeb/Views/Admin/Dynamic/XMLState.cshtml @@ -167,4 +167,8 @@ } - \ No newline at end of file + + diff --git a/HaWeb/Views/HKB/Dynamic/Briefe.cshtml b/HaWeb/Views/HKB/Dynamic/Briefe.cshtml index aa7aeaf..d1997fa 100644 --- a/HaWeb/Views/HKB/Dynamic/Briefe.cshtml +++ b/HaWeb/Views/HKB/Dynamic/Briefe.cshtml @@ -199,4 +199,7 @@ } - + diff --git a/HaWeb/Views/HKB/Dynamic/Index.cshtml b/HaWeb/Views/HKB/Dynamic/Index.cshtml index 891a468..68ecdfd 100644 --- a/HaWeb/Views/HKB/Dynamic/Index.cshtml +++ b/HaWeb/Views/HKB/Dynamic/Index.cshtml @@ -152,9 +152,11 @@ } - - diff --git a/HaWeb/Views/HKB/Dynamic/Register.cshtml b/HaWeb/Views/HKB/Dynamic/Register.cshtml index 4b7fc13..fba557e 100644 --- a/HaWeb/Views/HKB/Dynamic/Register.cshtml +++ b/HaWeb/Views/HKB/Dynamic/Register.cshtml @@ -24,7 +24,6 @@ : "ha-bibel"; } -
@@ -87,3 +86,9 @@
+ + + \ No newline at end of file diff --git a/HaWeb/Views/HKB/Dynamic/Suche.cshtml b/HaWeb/Views/HKB/Dynamic/Suche.cshtml index 1a8ec1e..655eef8 100644 --- a/HaWeb/Views/HKB/Dynamic/Suche.cshtml +++ b/HaWeb/Views/HKB/Dynamic/Suche.cshtml @@ -5,7 +5,6 @@ ViewData["showCredits"] = "false"; ViewData["Mark"] = Model.ActiveSearch; } - - \ No newline at end of file + + + \ No newline at end of file diff --git a/HaWeb/Views/Shared/_HKBLayout.cshtml b/HaWeb/Views/Shared/_HKBLayout.cshtml index afd2ec2..5d08b3b 100644 --- a/HaWeb/Views/Shared/_HKBLayout.cshtml +++ b/HaWeb/Views/Shared/_HKBLayout.cshtml @@ -20,5 +20,6 @@ @await Html.PartialAsync("/Views/Shared/_Notifications.cshtml") @await RenderSectionAsync("JavaScript", false) + @await Html.PartialAsync("/Views/Shared/_Scripts.cshtml") diff --git a/HaWeb/Views/Shared/_HKWLayout.cshtml b/HaWeb/Views/Shared/_HKWLayout.cshtml index 021b964..ead5f97 100644 --- a/HaWeb/Views/Shared/_HKWLayout.cshtml +++ b/HaWeb/Views/Shared/_HKWLayout.cshtml @@ -17,5 +17,6 @@ @await Html.PartialAsync("/Views/Shared/_ScrollButton.cshtml") @await RenderSectionAsync("JavaScript", false) + @await Html.PartialAsync("/Views/Shared/_Scripts.cshtml") \ No newline at end of file diff --git a/HaWeb/Views/Shared/_Head.cshtml b/HaWeb/Views/Shared/_Head.cshtml index 1d09534..6c55c9f 100644 --- a/HaWeb/Views/Shared/_Head.cshtml +++ b/HaWeb/Views/Shared/_Head.cshtml @@ -20,25 +20,7 @@ @* Styles *@ - - +@* Scripts *@ + + + \ No newline at end of file diff --git a/HaWeb/Views/Shared/_HomeLayout.cshtml b/HaWeb/Views/Shared/_HomeLayout.cshtml index f93bb63..71a340e 100644 --- a/HaWeb/Views/Shared/_HomeLayout.cshtml +++ b/HaWeb/Views/Shared/_HomeLayout.cshtml @@ -28,5 +28,6 @@ @await Html.PartialAsync("/Views/Shared/_ScrollButton.cshtml") @await RenderSectionAsync("JavaScript", false) + @await Html.PartialAsync("/Views/Shared/_Scripts.cshtml") \ No newline at end of file diff --git a/HaWeb/Views/Shared/_Javascript.cshtml b/HaWeb/Views/Shared/_Javascript.cshtml deleted file mode 100644 index 1a71b5b..0000000 --- a/HaWeb/Views/Shared/_Javascript.cshtml +++ /dev/null @@ -1,24 +0,0 @@ - -@* Global Scripts -- These are not inside .cshtml to not loose deferred execution posibility *@ - - - - - - - - - -@* This uses Razor Syntax so it is inlined into this razor file *@ - - diff --git a/HaWeb/Views/Shared/_Notifications.cshtml b/HaWeb/Views/Shared/_Notifications.cshtml index fe89f6f..b27f529 100644 --- a/HaWeb/Views/Shared/_Notifications.cshtml +++ b/HaWeb/Views/Shared/_Notifications.cshtml @@ -7,4 +7,8 @@ - \ No newline at end of file + + diff --git a/HaWeb/Views/Shared/_PublishForm.cshtml b/HaWeb/Views/Shared/_PublishForm.cshtml deleted file mode 100644 index 278a552..0000000 --- a/HaWeb/Views/Shared/_PublishForm.cshtml +++ /dev/null @@ -1,35 +0,0 @@ -@model XMLStateViewModel; - - -@* @if (Model. != null && Model..Any()) { -
Aktuell geladene Dateien
- - @foreach (var (category, files) in Model..OrderBy(x => x.Key)) - { - - - - - } -
@Model.AvailableRoots.Where(x => x.Prefix == category).First().Type: - @foreach (var item in files) - { - if (item != files.Last()) { - @item.FileName, - } - else { - @item.FileName - } - } -
- -
- -
- -
-
-} *@ \ No newline at end of file diff --git a/HaWeb/Views/Shared/_Scripts.cshtml b/HaWeb/Views/Shared/_Scripts.cshtml new file mode 100644 index 0000000..19bb73c --- /dev/null +++ b/HaWeb/Views/Shared/_Scripts.cshtml @@ -0,0 +1,14 @@ + + + diff --git a/HaWeb/Views/Shared/_UploadForm.cshtml b/HaWeb/Views/Shared/_UploadForm.cshtml deleted file mode 100644 index 0b1be9f..0000000 --- a/HaWeb/Views/Shared/_UploadForm.cshtml +++ /dev/null @@ -1,15 +0,0 @@ -@model XMLStateViewModel; - - - -
- -
- Fehler!
- -
-
\ No newline at end of file diff --git a/HaWeb/commands.txt b/HaWeb/commands.txt deleted file mode 100644 index fa212e7..0000000 --- a/HaWeb/commands.txt +++ /dev/null @@ -1,2 +0,0 @@ -rm .\bin\Release\net6.0\linux-x64\publish\appsettings.json -scp -r -i C:\Users\simon\.ssh\id_tss .\bin\Release\net6.0\linux-x64\publish\* admin@astra.tss-hd.de:~/publish/ \ No newline at end of file diff --git a/HaWeb/postcss.config.cjs b/HaWeb/postcss.config.cjs index 3205c53..e0c874c 100644 --- a/HaWeb/postcss.config.cjs +++ b/HaWeb/postcss.config.cjs @@ -1,9 +1,7 @@ module.exports = { plugins: [ - require('postcss-import'), require('tailwindcss'), // Production: require('autoprefixer'), - require('cssnano')({ preset: 'default' }) ], } diff --git a/HaWeb/wwwroot/js/briefe.js b/HaWeb/wwwroot/js/briefe.mjs similarity index 98% rename from HaWeb/wwwroot/js/briefe.js rename to HaWeb/wwwroot/js/briefe.mjs index 5a3973f..478f5da 100644 --- a/HaWeb/wwwroot/js/briefe.js +++ b/HaWeb/wwwroot/js/briefe.mjs @@ -35,4 +35,4 @@ const startup_briefe = function () { tabbtnlist[0].click(); }; -startup_briefe(); \ No newline at end of file +export { startup_briefe }; \ No newline at end of file diff --git a/HaWeb/wwwroot/js/filelistform.js b/HaWeb/wwwroot/js/filelistform.mjs similarity index 98% rename from HaWeb/wwwroot/js/filelistform.js rename to HaWeb/wwwroot/js/filelistform.mjs index f001a2e..1a8a43a 100644 --- a/HaWeb/wwwroot/js/filelistform.js +++ b/HaWeb/wwwroot/js/filelistform.mjs @@ -94,7 +94,7 @@ const startup_filelistform = function () { } var coll = document.getElementsByClassName("expandable"); - for (i = 0; i < coll.length; i++) { + for (let i = 0; i < coll.length; i++) { let element = coll[i] coll[i].addEventListener("click", () => { element.classList.toggle("expanded"); @@ -102,4 +102,4 @@ const startup_filelistform = function () { } }; -startup_filelistform(); \ No newline at end of file +export { startup_filelistform }; \ No newline at end of file diff --git a/HaWeb/wwwroot/js/index.js b/HaWeb/wwwroot/js/index.mjs similarity index 96% rename from HaWeb/wwwroot/js/index.js rename to HaWeb/wwwroot/js/index.mjs index c11c7a8..2e6884e 100644 --- a/HaWeb/wwwroot/js/index.js +++ b/HaWeb/wwwroot/js/index.mjs @@ -1,8 +1,7 @@ -const startup_index = function () { - +const startup_index = function (AvailableLetters, AvailablePages) { function encode(e) { return e.replace(/[^]/g, function (e) { return "&#" + e.charCodeAt(0) + ";" }) } - const ACTIVATEGOTOFILTER = function (filter, button) { + const ACTIVATEGOTOFILTER = function (filter, button) { let f = filter.value; let gotoinfo = document.getElementById("ha-gotoinfo"); @@ -93,4 +92,4 @@ const startup_index = function () { searchfilter.addEventListener("input", () => ACTIVATESEARCHFILTER(searchfilter, searchsubmitbtn)); }; -startup_index(); \ No newline at end of file +export { startup_index }; \ No newline at end of file diff --git a/HaWeb/wwwroot/js/main.js b/HaWeb/wwwroot/js/main.js index 8e5cb6a..67ceabe 100644 --- a/HaWeb/wwwroot/js/main.js +++ b/HaWeb/wwwroot/js/main.js @@ -1,10 +1,39 @@ import "../css/site.css"; import { startup_marginals } from "./marginals.mjs"; import { startup_theme } from "./theme.mjs"; -import { startup_menu } from "./menu.js"; +import { startup_menu } from "./menu.mjs"; import { startup_markanchor } from "./anchor.mjs"; -import { startup_mobilemenu } from "./mobilemenu.js"; +import { startup_mobilemenu } from "./mobilemenu.mjs"; import { startup_scrollbutton } from "./scrollbutton.mjs"; import { startup_clipboard } from "./clipboard.mjs"; +import { startup_filelistform } from "./filelistform.mjs"; +import { startup_index } from "./index.mjs"; +import { startup_briefe } from "./briefe.mjs"; +import { startup_websocket } from "./websocket.mjs"; +import { startup_search } from "./search.mjs"; -export { startup_clipboard, startup_mobilemenu, startup_markanchor, startup_menu, startup_scrollbutton, startup_marginals, startup_theme }; \ No newline at end of file +const startup_default = function () { + startup_marginals(); + startup_theme(); + startup_scrollbutton(); + startup_menu(); + startup_mobilemenu(); + startup_markanchor(); + startup_clipboard(); +} + +export { + startup_search, + startup_websocket, + startup_briefe, + startup_index, + startup_filelistform, + startup_default, + startup_clipboard, + startup_mobilemenu, + startup_markanchor, + startup_menu, + startup_scrollbutton, + startup_marginals, + startup_theme +}; \ No newline at end of file diff --git a/HaWeb/wwwroot/js/menu.js b/HaWeb/wwwroot/js/menu.mjs similarity index 100% rename from HaWeb/wwwroot/js/menu.js rename to HaWeb/wwwroot/js/menu.mjs diff --git a/HaWeb/wwwroot/js/mobilemenu.js b/HaWeb/wwwroot/js/mobilemenu.mjs similarity index 100% rename from HaWeb/wwwroot/js/mobilemenu.js rename to HaWeb/wwwroot/js/mobilemenu.mjs diff --git a/HaWeb/wwwroot/js/publishform.js b/HaWeb/wwwroot/js/publishform.js deleted file mode 100644 index 6857477..0000000 --- a/HaWeb/wwwroot/js/publishform.js +++ /dev/null @@ -1,41 +0,0 @@ -const startup_publishform = function () { - - const LOCALPUBLISHSubmit = async function (oFormElement) { - var fd = new FormData(); - document.getElementById("ha-publishfilelabel").style.pointerEvents = "none"; - document.getElementById("ha-lds-ellipsis-publish").style.display = "inline-block"; - document.getElementById("ha-publishmessage").style.opacity = "0"; - await fetch(oFormElement.action, { - method: 'POST', - headers: { - 'RequestVerificationToken': getCookie('RequestVerificationToken') - } - }) - .then(response => response.json()) - .then(json => { - if ("Error" in json) { - document.getElementById("ha-publishfilelabel").style.pointerEvents = "auto"; - document.getElementById("ha-lds-ellipsis-publish").style.display = "none"; - document.getElementById("ha-publishmessage").style.opacity = "1"; - document.getElementById("publish-result").value = json.Error; - } else { - document.getElementById("ha-publishfilelabel").style.pointerEvents = "auto"; - document.getElementById("ha-lds-ellipsis-publish").style.display = "none"; - document.getElementById("ha-publishmessage").style.opacity = "1"; - document.getElementById("publish-result").value = "Erfolg!"; - location.reload(); - } - }) - .catch((e) => { - document.getElementById("ha-publishfilelabel").style.pointerEvents = "auto"; - document.getElementById("ha-lds-ellipsis-publish").style.display = "none"; - document.getElementById("publish-result").value = "Keine Antwort. Bitte Seite neu laden!"; - }) - } - - var publishelement = document.getElementById("ha-publishform"); - var publishbutton = document.getElementById("ha-publishfilelabel"); - publishbutton.addEventListener("click", () => LOCALPUBLISHSubmit(publishelement)); -}; - -startup_publishform(); \ No newline at end of file diff --git a/HaWeb/wwwroot/js/search.js b/HaWeb/wwwroot/js/search.mjs similarity index 96% rename from HaWeb/wwwroot/js/search.js rename to HaWeb/wwwroot/js/search.mjs index 475579f..455bb48 100644 --- a/HaWeb/wwwroot/js/search.js +++ b/HaWeb/wwwroot/js/search.mjs @@ -16,4 +16,4 @@ const startup_search = function () { searchfilter.addEventListener("input", () => ACTIVATESEARCHFILTER(searchfilter, searchsubmitbtn)); } -startup_search(); +export { startup_search }; \ No newline at end of file diff --git a/HaWeb/wwwroot/js/websocket.js b/HaWeb/wwwroot/js/websocket.mjs similarity index 99% rename from HaWeb/wwwroot/js/websocket.js rename to HaWeb/wwwroot/js/websocket.mjs index a76a082..27470fd 100644 --- a/HaWeb/wwwroot/js/websocket.js +++ b/HaWeb/wwwroot/js/websocket.mjs @@ -147,4 +147,4 @@ const startup_websocket = function () { } }; -startup_websocket(); \ No newline at end of file +export { startup_websocket }; \ No newline at end of file