1
0
Fork 0

fix header

This commit is contained in:
maltejur 2020-11-03 16:49:52 +01:00
parent ad6ad2b93c
commit 37ad758384
6 changed files with 15 additions and 15 deletions

View file

@ -6,7 +6,7 @@ export default function HeaderHertzschlag() {
<h1>hertz heute / HertzBLATT Archiv</h1> <h1>hertz heute / HertzBLATT Archiv</h1>
</a> </a>
<nav> <nav>
<a href="#" style="margin-left: 25px">HertzSCHLAG</a> <a href="#" style="margin-left: 25px">HertzSCHLAG Archiv</a>
</nav> </nav>
`; `;

View file

@ -6,7 +6,7 @@ export default function HeaderHertzschlag() {
<h1>HertzSCHLAG Archiv</h1> <h1>HertzSCHLAG Archiv</h1>
</a> </a>
<nav> <nav>
<a href="#hertzblatt" style="margin-left: 25px">HertzBLATT</a> <a href="#hertzblatt" style="margin-left: 25px">HertzBLATT Archiv</a>
<a href="#hertzschlag/liste" style="margin-left: 25px">Alle Ausgaben</a> <a href="#hertzschlag/liste" style="margin-left: 25px">Alle Ausgaben</a>
</nav> </nav>
`; `;

View file

@ -9,13 +9,13 @@ export default function Liste() {
json.hertzschlag.forEach((i) => { json.hertzschlag.forEach((i) => {
listehtml = listehtml =
listehtml + listehtml +
"<tr onclick='window.location=\"#ausgabe/" + "<tr onclick='window.location=\"#hertzschlag/" +
i["Ausgabe"] + i["Ausgabe"] +
"\"'><td><a href='#ausgabe/" + "\"'><td><a href='#hertzschlag/" +
i["Ausgabe"] + i["Ausgabe"] +
"'>" + "'>" +
i["Ausgabe"] + i["Ausgabe"] +
"</a></td><td><a href='#ausgabe/" + "</a></td><td><a href='#hertzschlag/" +
i["Ausgabe"] + i["Ausgabe"] +
"'>" + "'>" +
i["Thema"] + i["Thema"] +

View file

@ -44,11 +44,9 @@ export default class Router {
} }
if (rigthRoute) { if (rigthRoute) {
if ( const routeName = routeSplit[0] == "hertzschlag" ? "" : routeSplit[0];
this.el.getAttribute("currentroute") != routeSplit[0] || if (this.el.getAttribute("currentroute") != routeName || !this.lazy) {
!this.lazy this.el.setAttribute("currentroute", routeName);
) {
this.el.setAttribute("currentroute", routeSplit[0]);
let neww = this.routes[route](params); let neww = this.routes[route](params);
this.el.innerHTML = ""; this.el.innerHTML = "";
this.el.appendChild(neww); this.el.appendChild(neww);

View file

@ -28,6 +28,7 @@ new Router(
document.querySelector("#home"), document.querySelector("#home"),
{ {
"": Home, "": Home,
hertzschlag: Home,
"hertzschlag/::": Home, "hertzschlag/::": Home,
hertzblatt: HomeHertzblatt, hertzblatt: HomeHertzblatt,
"hertzblatt/::": HomeHertzblatt, "hertzblatt/::": HomeHertzblatt,
@ -46,6 +47,7 @@ new Router(
document.querySelector("#innerHeader"), document.querySelector("#innerHeader"),
{ {
"": HeaderHertzschlag, "": HeaderHertzschlag,
hertzschlag: HeaderHertzschlag,
"hertzschlag/::": HeaderHertzschlag, "hertzschlag/::": HeaderHertzschlag,
hertzblatt: HeaderHertzblatt, hertzblatt: HeaderHertzblatt,
"hertzblatt/::": HeaderHertzblatt, "hertzblatt/::": HeaderHertzblatt,

View file

@ -84,12 +84,12 @@ body {
font-weight: 400 !important; font-weight: 400 !important;
font-size: 20px; font-size: 20px;
margin-left: 15px; margin-left: 15px;
transition: transform 0.2s ease; transition: color 0.2s ease;
transform: translateY(0); color: rgba(255, 255, 255, 1);
} }
#header nav a:hover { #header nav a:hover {
transform: translateY(-2px); color: rgba(255, 255, 255, 0.8);
} }
.welle-l { .welle-l {
@ -122,7 +122,8 @@ body {
overflow-x: hidden; overflow-x: hidden;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 0; grid-gap: 0;
height: 100%; height: calc(100% - 5em);
padding-top: 5em;
} }
.module { .module {
@ -377,7 +378,6 @@ i {
#home { #home {
position: fixed; position: fixed;
padding-top: 5em;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;