This commit is contained in:
Jakub 2024-02-11 15:21:08 -05:00
parent 6101ec652a
commit 8b7d450a12
10 changed files with 210 additions and 43 deletions

View File

@ -1,10 +1,27 @@
{{ partial "header.html" . }}
<header class="not-found">
<ul class="menu" >
<li>
<a class="logo" >{{ .Site.Title }}</a>
</li>
</ul>
</header>
<div class="content">
<h1>Error 404: </h1>
<h2>Page Not Found</h2>
<link rel="stylesheet" href="/css/404.css" type="text/css">
<h1 class="not-found">Error</h1>
<h1 class="not-found-num" >404</h1>
<div style="padding: 30px;"></div>
<hr/>
<h2>Strona nie odnaleziona</h2>
<p>Podany adres URL nie został odnaleziony.</p>
<p><a class="button" href="/">Kliknij tutaj, aby przejść do polskej strony głównej.</a></p>
<hr/>
<h2>Page Not Found</h2>
<p>The url you entered couldn't be found.</p>
<p><a class="button" href="/en">Click here to go to the english homepage.</a></p>
<p>The url you entered is invalid or has been deleted.</p>
<p><a class="button" href="/">Click here to return home.</a></p>
<hr/>
</div>
{{ partial "footer.html" . }}

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
{{ .Content }}

View File

@ -12,6 +12,5 @@
</head>
<body>
{{ partial "nav.html" . }}

View File

@ -1,11 +1,8 @@
<header class="header">
<input class="menu-btn" type="checkbox" id="menu-btn" />
<ul class="menu" >
<li>
<a href="/" class="logo" >{{ .Site.Title }}</a>
</li>
<li>
<div class="menu" >
<a href="/{{ .Language.LanguageCode }}" class="logo" >{{ .Site.Title }}</a>
<label class="menu-icon" for="menu-btn">
<div class="hamburger" onclick="myFunction(this)">
<div class="bar1"></div>
@ -18,29 +15,28 @@
}
</script>
</label>
</li>
<li>
<ul class="menu-entries">
<div class="menu-entries">
{{ range.Site.Menus.main }}
{{ if eq .Identifier "home" }}
<li><a class="home-link" href="{{ .URL }}">{{ .Name }}</a></li>
<a class="home-link" href="{{ .URL }}">{{ .Name }}</a>
{{ else }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
{{end}}
<li class="lang-switcher">
<a href="">{{ }}
<ul >
{{ range .Translations }}
<li> <a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a> </li>
{{ end}}
</ul>
</li>
</ul>
</li>
</ul>
{{ end }}
<div class="lang-switch" >
<input class="lang-btn" type="checkbox" id="lang-btn" />
<label class="lang-switch" for="lang-btn">
<a>{{ .Language.LanguageName }} ⏷</a>
</label>
<div class="translation-list" >
{{ with .Translations }}
{{ range . }}
<a href="{{ .RelPermalink }}"> {{ .Language.LanguageName }}</a>
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
</header>

27
static/css/404.css Normal file
View File

@ -0,0 +1,27 @@
.not-found ul.menu li {
width: 100%;
}
.not-found a.logo {
width: 100%;
background-color: var(--alt-bg);
text-align: center;
pointer-events: none;
}
h1.not-found-num {
text-align: center;
font-size: 72px;
margin-top: 0;
}
h1.not-found {
text-align: center;
margin-bottom: 0;
}
@media screen and (min-width: 1040px) {
.content {
margin: 5em 5% auto 5%;
}
}

View File

@ -0,0 +1,21 @@
.not-found ul.menu li {
width: 100%;
}
.not-found a.logo {
width: 100%;
background-color: var(--alt-bg);
text-align: center;
pointer-events: none;
}
h1.not-found-num {
text-align: center;
font-size: 72px;
margin-top: 0;
}
h1.not-found {
text-align: center;
margin-bottom: 0;
}

View File

@ -7,6 +7,10 @@
--table: #fbf1c7;
--table-alt: #d5c4a1;
--lang-btn-bg: black;
--langs-bg: black;
--langs-bg-hov: gray;
}
@media (prefers-color-scheme: dark) {
@ -19,5 +23,9 @@
--table: #282828;
--table-alt: #504945;
--lang-btn-bg: black;
--langs-bg: black;
--langs-bg-hov: gray;
}
}

View File

@ -8,6 +8,10 @@ html, body {
padding: 0;
}
h1,h2,h3,h4,h5,h6 {
margin: 0;
}
body{
font-size: 100%;
line-height: 1.5;
@ -28,7 +32,6 @@ footer {
width: calc(100% - 40px);
text-align: center;
padding: 20px;
margin-left: 15%;z
}
footer.fixed {
@ -64,8 +67,7 @@ footer.fixed {
padding: 0;
}
.menu li {
list-style-type: none;
.menu a {
display: inline-block;
}
@ -77,7 +79,7 @@ footer.fixed {
right: 0;
}
.menu-btn {
.menu-btn, .lang-btn {
display: none;
}
@ -113,7 +115,7 @@ a.home-link { display: none; }
transition-property: all;
}
.menu-btn:checked ~ .menu li .menu-entries {
.menu-btn:checked ~ .menu .menu-entries {
/* Reveal Entries */
height: auto;
max-height: 900px; /* May Need to be change manually for nav lists */
@ -176,7 +178,7 @@ a.home-link { display: none; }
position: inherit;
}
.menu a, .menu li { display: block; }
.menu a, .menu a { display: block; }
a.home-link { display: none; }
.content {
@ -190,7 +192,10 @@ a.home-link { display: none; }
box-shadow: inset -22px 0 20px -20px var(--shadow);
}
footer { width: calc(85% - 40px); }
footer {
width: calc(85% - 40px);
margin-left: 15%;
}
footer.fixed { left: 15%; }
}
@ -330,3 +335,94 @@ blockquote.location p { padding: inherit; }
grid-column: span 2; /* Span two columns */
}
}
/* TODO put in a clean spot */
.lang-switch {
display: inline-block;
background-color: var(--lang-btn-bg);
text-align: center;
width: 120px;
}
.lang-switch a {
width: 100%;
padding-left: 0;
padding-right: 0;
}
.lang-switch a:hover {
background-color: gray;
}
/* lang-switch content (hidden by default) */
.translation-list {
display: block;
height: 0;
position: absolute;
background-color: var(--langs-bg);
width: 120px;
top: 64px;
right: 0;
overflow: hidden;
transition: 400ms;
transition-property: all;
}
/* Links inside the lang-switch */
.translation-list a {
float: none;
display: block;
}
/* Add a grey background color to lang-switch links on hover */
/* Show the lang-switch menu on hover */
.lang-btn:checked ~ .translation-list {
height: auto;
max-height: 70px;
}
@media screen and (min-width: 1040px) {
.lang-switch {
width: 100%;
text-align: left;
}
.lang-switch a {
padding: 20px;
width: auto;
}
.translation-list {
position: static;
width: auto;
}
}
@media screen and (max-width: 755px) {
.lang-switch {
width: 100%;
display: block;
}
.lang-switch a {
padding: 20px;
width: auto;
}
.translation-list {
position: static;
width: auto;
}
}