More Menu, Added Basic Routing

This commit is contained in:
schnulller
2022-05-12 18:31:32 +02:00
parent 702fad0dd7
commit c0ff6cea2d
20 changed files with 582 additions and 191 deletions

View File

@@ -0,0 +1,6 @@
@{
ViewData["Title"] = "Kontakt";
ViewData["SEODescription"] = "Johann Georg Hamann: Kommentierte Briefausgabe, Hg. v. Leonard Keidel und Janina Reibold. Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann.";
}
Hello!

View File

@@ -0,0 +1 @@
Hello from Mitwirkende!

View File

View File

View File

@@ -18,10 +18,10 @@
</head>
<body>
<body class="w-100 h-100">
@await Html.PartialAsync("/Views/Shared/_Menu.cshtml")
<div class="container">
<div class="w-full desktop:max-w-screen-desktop mx-auto">
<main role="main" class="pb-3">
@RenderBody()
</main>

View File

@@ -1,15 +1,15 @@
<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 py-3 px-3 lg:px-8 flex-wrap">
<nav class="flex flex-row w-100 bg-slate-50 border-t-[5px] border-gray-300 py-3 px-3 desktop:px-8 flex-wrap">
<a href="/" class="text-xl xl:text-3xl grow-0 shrink-0 text-black hover:text-black ">
<img src="/favicon.ico" class="inline-block w-8 h-8 xl:w-12 xl:h-12 mr-2 p-1 border border-gray-900 border-t-gray-200 border-l-gray-200 " alt="HKB-Logo" loading="lazy" />
<span class="sm:hidden">J. G. Hamann: Kommentierte Briefausgabe</span>
<span class="sm:hidden">Hamann: Komm. Briefausgabe</span>
<span class="hidden sm:inline md:hidden">Johan Georg Hamann: Kommentierte Briefausgabe</span>
<span class="hidden md:inline align-baseline">Johann Georg Hamann: Kommentierte Briefausgabe (&#x200A;H&#x200A;K&#x200A;B&#x200A;)</span>
</a>
<div class="flex grow shrink">
</div>
<div class="ha-menusymbol inline-block lg:hidden pr-3 align-bottom">
<div class="ha-menusymbol inline-block desktop:hidden pr-3 align-bottom">
<button id="openmenubutton">
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
aria-labelledby="hamburgerIconTitle">
@@ -26,19 +26,35 @@
</svg>
</button>
</div>
<div class="topnav" id="topnav">
<div class="ha-topnav " id="ha-topnav">
<a class="" href="/">
Suche & Briefauswahl
</a>
<a class="" href="/kolloquien.html">
<a class="" href="/Briefe/1">
Briefansicht
</a>
<a class="" href="/acta-baende.html">
Register
</a>
<a class="" href="/studien.html">
<div class="ha-topnav-dropdown">
<a class="cursor-default ha-menu-arrowsymbol">
Register
</a>
<div class="ha-topnav-dropdown-content">
<a class="" href="/Register/Register">Register</a>
<a class="" href="/Register/Bibelstellenregister">Bibelstellenregister</a>
<a class="" href="/Register/Forschungsbibliographie">Forschungsbibliographie</a>
</div>
</div>
<div class="ha-topnav-dropdown">
<a class="cursor-default ha-menu-arrowsymbol">
Edition
</a>
</a>
<div class="ha-topnav-dropdown-content">
<a class="" href="/Edition/Kontakt">Kontakt</a>
<a class="" href="/Edition/Mitwirkende">Mitwirkende</a>
<a class="" href="/Edition/Richtlinien">Editionsrichtlinien</a>
<a class="" href="/Edition/Editionsgeschichte">Editionsgeschichte</a>
<a class="" href="/Edition/Werkausgabe">Werkausgabe</a>
</div>
</div>
</div>
</nav>
</header>
@@ -46,8 +62,8 @@
<script>
const _openmenu = function () {
var x = document.getElementById("topnav");
if (x !== null) x.className += " responsive";
var x = document.getElementById("ha-topnav");
if (x !== null) x.className += " ha-topnav-collapsed";
let oldbutton = document.getElementById("openmenubutton");
if (oldbutton !== null) oldbutton.setAttribute('class', 'hidden');
let newbutton = document.getElementById("closemenubutton");
@@ -55,8 +71,8 @@
}
const _closemenu = function () {
var x = document.getElementById("topnav");
if (x !== null) x.className = "topnav";
var x = document.getElementById("ha-topnav");
if (x !== null) x.className = "ha-topnav";
let oldbutton = document.getElementById("closemenubutton");
if (oldbutton !== null) oldbutton.setAttribute('class', 'hidden');
let newbutton = document.getElementById("openmenubutton");
@@ -64,9 +80,9 @@
}
const _markactive = function () {
const _markactive = function (element) {
// Marks links as active
var all_links = this.getElementsByTagName("a"),
var all_links = element.getElementsByTagName("a"),
i = 0, len = all_links.length,
full_path = location.href.split('#')[0]; //Ignore hashes
@@ -80,5 +96,6 @@
document.getElementById("openmenubutton").addEventListener('click', _openmenu);
document.getElementById("closemenubutton").addEventListener('click', _closemenu);
_markactive(document.getElementById("ha-topnav"));
</script>

View File

@@ -1,3 +1,5 @@
@using HaWeb
@using HaWeb.Models
@using AuthoringTagHelpers
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, AuthoringTagHelpers