From 8b7d450a1254f607c6eaa32a2e4330231625308b Mon Sep 17 00:00:00 2001 From: Jakub Date: Sun, 11 Feb 2024 15:21:08 -0500 Subject: [PATCH] comit --- layouts/404.html | 27 +++++-- layouts/_default/list.html | 1 + layouts/_default/single.html | 1 + layouts/index.html | 1 + layouts/partials/header.html | 1 - layouts/partials/nav.html | 56 +++++++------- static/css/404.css | 27 +++++++ static/css/colorschemes/404.css | 21 ++++++ static/css/colorschemes/gruvbox.css | 8 ++ static/css/style.css | 110 ++++++++++++++++++++++++++-- 10 files changed, 210 insertions(+), 43 deletions(-) create mode 100644 static/css/404.css create mode 100644 static/css/colorschemes/404.css diff --git a/layouts/404.html b/layouts/404.html index eb07e88..9aa0f28 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,10 +1,27 @@ {{ partial "header.html" . }} + + +
+ +
-

Error 404:

-

Page Not Found

+ +

Error

+

404

+
+
+

Strona nie odnaleziona

+

Podany adres URL nie został odnaleziony.

+

Kliknij tutaj, aby przejść do polskej strony głównej.

+
+

Page Not Found

+

The url you entered couldn't be found.

+

Click here to go to the english homepage.

-

The url you entered is invalid or has been deleted.

-

Click here to return home.

+
-{{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index da4d143..395ad66 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,4 +1,5 @@ {{ partial "header.html" . }} + {{ partial "nav.html" . }}

{{ .Title }}

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c6097ff..26ec675 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,4 +1,5 @@ {{ partial "header.html" . }} + {{ partial "nav.html" . }}

{{ .Title }}

diff --git a/layouts/index.html b/layouts/index.html index b702d50..5c4340d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,4 +1,5 @@ {{ partial "header.html" . }} + {{ partial "nav.html" . }}
{{ .Content }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 14c2833..db4b0b6 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,6 +12,5 @@ - {{ partial "nav.html" . }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 0f3eb97..800df33 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,11 +1,8 @@
- -
+ +
+ diff --git a/static/css/404.css b/static/css/404.css new file mode 100644 index 0000000..fa5a280 --- /dev/null +++ b/static/css/404.css @@ -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%; + } +} diff --git a/static/css/colorschemes/404.css b/static/css/colorschemes/404.css new file mode 100644 index 0000000..f324d20 --- /dev/null +++ b/static/css/colorschemes/404.css @@ -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; +} diff --git a/static/css/colorschemes/gruvbox.css b/static/css/colorschemes/gruvbox.css index 5d9454f..10b36f0 100644 --- a/static/css/colorschemes/gruvbox.css +++ b/static/css/colorschemes/gruvbox.css @@ -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; } } diff --git a/static/css/style.css b/static/css/style.css index 45887c9..cb0f1cc 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -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; +} + + +} +