summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorMichał M. Sapka <michal@sapka.me>2023-03-02 21:35:19 +0100
committerMichał M. Sapka <michal@sapka.me>2023-03-02 21:35:19 +0100
commitdf1726590fb9a7a16325e881682246bf27f4941c (patch)
tree9e68839aa64e58047ae3028f3916f0519ba6d40d /layouts
parent7a35c1614f44a60335cf6608c839812834291e94 (diff)
fin
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html156
1 files changed, 32 insertions, 124 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index c31074e..0379192 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -2,9 +2,11 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title>{{ block "title" . }}
- {{ .Site.Title }}
- {{ end }}</TITLE>
+ <title>
+ {{- block "title" . }}
+ [{{ .Site.Title}}] {{ .Page.Title }}
+ {{- end }}
+ </title>
<link rel='stylesheet' type='text/css' href='/style.css'>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{- $image := resources.Get "/icons/apple-touch-icon.png"}}
@@ -35,137 +37,43 @@
<script defer data-api="/api/event" data-domain="{{ .Site.Params.PlausibleDomain}}" src="/js/script.js"></script>
</head>
- <body> {{ block "header" . }}
- <style>
-
- ::root {
- color-scheme: light dark; /* both supported */
- --menu-bg: #fff;
- }
-
-.the-site {
- display: flex;
-flex-wrap: wrap;
- margin-left: auto;
- margin-right: auto;
-max-width: 700px;
-margin-top: 20px;
-}
-
-.left-column {
-flex: 200px 0;
-text-align: center;
-flex-shrink: 0;
-}
-
-.left-column nav {
- margin-top: 30px;
- flex-shrink: 0;
-}
-
-.left-column nav a {
- display: block;
- margin-bottom: 5px;
-}
-#topnav {
- background-color: var(--menu-bg);
-}
-@media (max-width: 710px) {
- .left-column nav a {
- display: inline-block;
- margin-right: 10px;
- }
- h1 {
- font-size: 1.5em;
- display: inline-block;
- }
- .the-site {
- margin-top: 5px;
- }
- .left-column nav {
- margin-top: 0;
- margin-bottom: 10px;
- }
-p #logo {
- height: 20px;
- display: inline-block;
- }
- #logo img {
- height: 20px;
- }
- #topnav {
- width: 100%;
-
- }
-}
-h1 {
- text-transform: none;
-}
-.right-column {
- flex: 50%;
-}
-
-/* Responsive layout - makes a one column layout instead of a two-column layout */
-@media (max-width: 710px) {
- .left-column, .right-column {
- flex: 100%;
- }
-}
-
-pre code {
- width: 93%;
- padding-bottom: 5px;
- white-space: pre-wrap;
- border-width: 1px;
- border-style: solid;
- padding: 11px;
- background-color: #f0f0f0;
- word-break: keep-all;
-}
-</style>
+ <body>
<section class="the-site">
<aside class="left-column">
- <a href="/">
- {{ $image := resources.Get "logo.png" }}
- {{ $image := $image.Resize "x160 webpn" }}
+ <a href="/">
+ {{ $logo := resources.Get "logo.png" }}
+ {{ $logo1x := $logo.Resize "x160 webpn" }}
+ {{ $logo2x := $logo.Resize "x310 webpn" }}
<div id="logo">
- <img alt="logo" src="{{ $image.Permalink }}" width={{$image.Width}} height={{$image.Height}}/>
+ <img
+ alt="logo"
+ src="{{ $logo.Permalink }}"
+ srcset="
+ {{ $logo1x.RelPermalink }} 1x,
+ {{ $logo2x.RelPermalink }} 2x,
+ "
+ width="{{$logo.Width}}"
+ height="{{$logo.Height}}"/>
</div>
<h1>{{ .Site.Title }}</h1>
- <nav id="topnav">
- <a href="/">Home</a>
- <a href="/about">About</a>
- <a href="https://git.sapka.me">Git</a>
- <a href="/index.xml">RSS</a>
- </nav>
+ <nav id="mainnav">
+ <a href="/">Home</a>
+ <a href="/about">About</a>
+ <a href="https://git.sapka.me">Git</a>
+ <a href="/index.xml">RSS</a>
+ </nav>
</aside>
- <section class="right-column">
- {{ block "main" . }}
- {{ end }}
-
- {{ block "pagination" . }}
- {{ end }}
- </section>
+ <maim class="right-column">
+ {{ block "main" . }}
+ {{ end }}
+
+ {{ block "pagination" . }}
+ {{ end }}
+ </main>
</section>
-
-
-
-
-
- <header>
- <div id="logo-space">
-
- </a>
- </div>
- </header>
- {{ end }}
- <main>
-
-
{{ block "FOOTER" . }}
- </main>
<footer>
<div>
<a href="https://git.sapka.me/michal-sapka-me.git/" target="_blank">Source code is available</a>. Theme is temporary. <a href="https://plausible.io/{{ .Site.Params.PlausibleDomain }}">Statistics are public</a>. Only glory of Satan is eternal.