summaryrefslogtreecommitdiff
path: root/layouts/cool-emacs
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-06-15 19:54:48 +0200
committermms <michal@sapka.me>2024-06-15 19:54:48 +0200
commit669a35a3eb3db6420f47a1098a79d07ab38abbcc (patch)
treec4c260f8f8e5c2f74eb687477830080c6d3c7671 /layouts/cool-emacs
parentd3a085d96134a8ae8e948ee4ba20b47eddd0272a (diff)
feat: cool emacs, pub preview
Diffstat (limited to 'layouts/cool-emacs')
-rw-r--r--layouts/cool-emacs/baseof.html149
-rw-r--r--layouts/cool-emacs/list.html33
-rw-r--r--layouts/cool-emacs/single.html31
3 files changed, 208 insertions, 5 deletions
diff --git a/layouts/cool-emacs/baseof.html b/layouts/cool-emacs/baseof.html
index 41f693d..5608fea 100644
--- a/layouts/cool-emacs/baseof.html
+++ b/layouts/cool-emacs/baseof.html
@@ -1,8 +1,147 @@
-
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta charset="utf-8">
+ <title> {{ .Page.Title }} | Cool Emacs </title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ {{- $header_rect := resources.Get "unix-history/header-rect.png" }}
+ {{- $header_rect_180 := $header_rect.Resize "180x webp q90"}}
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ $header_rect_180.Permalink }}">
+
+ {{- $header_rect_32 := $header_rect.Resize "32x webp q90"}}
+ <link rel="icon" type="image/png" sizes="32x32" href="{{ $header_rect_32.Permalink }}">
+
+ {{- $header_rect_16 := $header_rect.Resize "16x webp q90"}}
+ <link rel="icon" type="image/png" sizes="16x16" href="{{ $header_rect_16.Permalink }}">
+
+ <meta name="description" content="{{ .Params.Abstract | default .Site.Params.DefaultDescription}}">
+
+ <meta property="og:title" content="{{ .Page.Title }}">
+ <meta property="og:type" content="website">
+ <meta property="og:url" content="{{ .Permalink }}">
+ <meta property="og:image" content="{{ $header_rect.Permalink }}">
+ <meta property="og:description" content="{{ .Params.Abstract | default .Site.Params.DefaultDescription}}">
+
+ <link rel="canonical" href="{{ .Permalink }}">
+ <link rel='alternate' type='application/rss+xml' title="Feed with all changes" href='/index.xml'>
+ <link rel='alternate' type='application/rss+xml' title="Feed with Cool Emacs changes" href='/cool-emacs/index.xml'>
+ <meta name="robots" content="index, follow">
+ <link rel="me" href="https://emacs.ch/@mms">
+
+ <link rel="webmention" href="https://webmention.io/d-s.sh/webmention">
+ <link rel="pingback" href="https://webmention.io/d-s.sh/xmlrpc">
+
+ {{- $bg := resources.Get "cool-emacs/bg.gif" -}}
+ <style>
+ :root {
+ --bg-color: #F5F5F5;
+ --text-color: #000;
+ --heading-color: #9b0000;
+ --heading-shadow: 14px 7px 16px rgba(166, 168, 191, 1);
+ }
+ body {
+ font-family: helvetica;
+ background-color: #B2BEB5;
+ font-size: 1em;
+ background-image: url({{ $bg.Permalink }});
+ background-repeat: repeat-y;
+ background-size: 30px;
+ background-color: var(--bg-color);
+ color: var(--text-color);
+ }
+
+ .site {
+ width: 800px;
+ max-width: 80%;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding: 20px;
+ margin-left: 50px;
+ }
+ @media only screen and (max-width: 600px) {
+ .site {
+ margin-left: 10px;
+ }
+ }
+
+ article figure {
+ text-align: center;
+ margin: 0;
+ max-width: 100%;
+ font-size: 0.8em;
+ }
+
+ img {
+ max-width: 60%;
+ height: auto;
+ }
+
+ figure img {
+ border-width: 5px;
+ border-style: solid;
+ border-color: var(--heading-color);
+ }
+
+ p, ul {
+ line-height: 1.4em;
+ text-align: justify;
+ }
+ p, ul, .highlight, pre code {
+ margin-left: 40px;
+ }
+ @media only screen and (max-width: 600px) {
+ p, ul, .highlight, pre code {
+ margin-left: 20px;
+ }
+ }
+ .highlight {
+ display: block;
+ max-width: 90%;
+ overflow-x: scroll;
+ width: 750px;
+ }
+ pre {
+ padding: 10px;
+ }
+ h1 {
+ padding-bottom: 50px;
+ text-shadow: var(--heading-shadow);
+ }
+ h2, h3 {
+ text-shadow: var(--heading-shadow);
+ font-family: monospace;
+ color: var(--heading-color);
+ }
+
+ </style>
+
+
+</head>
<body>
+ <div class="site">
+ <header>
+ {{ block "head" . }}
+ {{ end }}
- <header>
- Cool Emacs
- <hr>
- <h1>{{ .Title }}</h1>
</header>
+ <article>
+ <h1>{{ .Title }}</h1>
+
+ {{ block "main" . }}
+ {{ end }}
+ </article>
+
+ <footer>
+ <hr>
+ Website created and operated by <a href="https://michal.sapka.me">MichaƂ</a>
+ <div style="padding: 15px; text-align: center;">
+ {{ partial "buttons/valid_html" . }}
+ {{ partial "buttons/emacs" . }}
+ {{ partial "buttons/openbsd" . }}
+ </div>
+ </footer>
+ </div>
+</body>
diff --git a/layouts/cool-emacs/list.html b/layouts/cool-emacs/list.html
new file mode 100644
index 0000000..6295d15
--- /dev/null
+++ b/layouts/cool-emacs/list.html
@@ -0,0 +1,33 @@
+{{ define "head"}}
+<a href="/">Back</a>
+<hr>
+{{end}}
+
+
+
+{{ define "main" }}
+
+{{if .Page.Content}}
+ {{ .Page.Content }}
+ {{- if .Params.primary_menu }}
+ {{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }}
+ {{- end }}
+
+ {{ partial "single/dates.html" . }}
+{{ else }}
+
+ {{ if in .Page.Params.Categories "blog" }}
+ {{ partial "partials/blog_index.html" . }}
+ {{ else if in .Page.Params.Categories "article" }}
+ {{ partial "partials/article_index.html" . }}
+ {{ else }}
+
+ <h2>Articles</h2>
+ {{ range .Data.Pages }}
+ {{ partial "partials/article_list_item.html" . }}
+ {{ end }}
+
+ {{ end }}
+{{end}}
+
+{{ end }}
diff --git a/layouts/cool-emacs/single.html b/layouts/cool-emacs/single.html
new file mode 100644
index 0000000..855124b
--- /dev/null
+++ b/layouts/cool-emacs/single.html
@@ -0,0 +1,31 @@
+{{ define "head" }}
+<a href="/cool-emacs">
+{{- $header_rect := resources.Get "unix-history/header-top.png" }}
+{{- $header_rect_180 := $header_rect.Resize "50x webp q90"}}
+<!-- <img -->
+<!-- style=" -->
+<!-- height: 1.5em; -->
+<!-- width: auto; -->
+<!-- margin-right: 0.5em; -->
+<!-- " -->
+<!-- src="{{ $header_rect_180.Permalink }}" -->
+<!-- ></a> -->
+
+<b><i>Cool Emacs</i></b></a>
+<hr>
+
+{{ end }}
+
+{{ define "main" }}
+
+<article>
+ {{ .Page.Content }}
+</article>
+
+{{- if .Params.primary_menu }}
+ {{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }}
+{{- end }}
+
+{{ partial "single/dates.html" . }}
+
+{{- end }}