summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorMichał Sapka <michal@sapka.me>2023-01-08 12:12:11 +0100
committerMichał Sapka <michal@sapka.me>2023-01-08 12:12:11 +0100
commit0381d2e62d10fd30402c29d85041071adcc483bf (patch)
tree7a07eb53f9b4f95c71750af29b8a3db3e07c6817 /layouts/_default
parent8987664e3ab4dd08879c3d45ba4ba954aaec6f69 (diff)
feat: basic list
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html45
-rw-r--r--layouts/_default/list.html13
-rw-r--r--layouts/_default/single.html5
3 files changed, 30 insertions, 33 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 280135e..e3cd969 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
-<HTML lang="en">
- <HEAD>
- <META charset="utf-8">
- <TITLE>{{ block "title" . }}
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>{{ block "title" . }}
{{ .Site.Title }}
{{ end }}</TITLE>
<link rel='stylesheet' type='text/css' href='/style.css'>
@@ -29,10 +29,10 @@
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
<meta name="robots" content="index, follow">
{{ if isset .Params "tags" }}<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">{{end}}
- </HEAD>
- <BODY>
+ </head>
+ <body>
{{ block "header" . }}
- <HEADER>
+ <header>
{{ $image := resources.Get "logo.png" }}
{{ $image := $image.Resize "x45" }}
<a href="/">
@@ -42,35 +42,26 @@
(because giphy sucks)
</div>
</a>
- </HEADER>
+ </header>
{{ end }}
- <MAIN>
+ <main>
{{ block "page-title" . }}
<h2> {{ .Page.Title }}</h2>
{{ end }}
{{ block "main" . }}
{{ end }}
- </MAIN>
{{ block "FOOTER" . }}
- <FOOTER>
- <ASIDE>
- <BR>
- Terms and conditions
- <OL>
- <li> I don't care who you are so I won't track you.
- <li> I have stolen all those memes so I have no rights to them.
- <li> You will not kill my server.
- </OL>
- </ASIDE>
+ </main>
+ <footer>
<div>
- Created by <a href="https://sapka.me" target="_blank">Michal</a>.
- <a href="https://github.com/michalsapka/meme.sapka.me" target="_blank">Source code is available</a>.
- <BR>
- <BR>
+ <a href="https://github.com/michalsapka/website" target="_blank">Source code is available</a>. Theme is temporary. Only glory of Satan is eternal.
+ <BR><BR>
+ Unless stated otherwise, all content Copyright 2022, 2023 Michał Sapka. Unauthorized use under penalty of watching a random Netflix show or a fine of one million dolars.
+
</div>
- </FOOTER>
+ </footer>
{{ end }}
- </BODY>
-</HTML>
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index b9ddde4..d4ad721 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,6 +1,17 @@
{{ define "main" }}
- {{ range where .Pages "Params.category" "meme"}}
+ {{ range .Pages }}
<article class="list">
+ <a href="{{ .Page.Permalink }}">
+ {{ .Page.Title }}
+ </a>
+ ({{ .PublishDate.Format "January 2nd, 2006" }})
+ <div>
+ {{ .Page.Summary }}
+ </div>
+ {{- if .Page.Truncated }}
+ <a href="{{ .Page.Permalink }}">More</a>
+ </div>
+ {{ end }}
</article>
{{ end }}
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 47ec310..a6a1697 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,11 +2,6 @@
{{ end }}
{{ define "main" }}
-{{ $imageUrl := .Params.image }}
-{{ $image := resources.Get $imageUrl }}
-{{ $image := $image.Resize "790x" }}
-<img alt="{{ .Params.title }}" src="{{ $image.Permalink }}" width={{ $image.Width }} height={{ $image.Height }}/><BR/>
-<hr/>
added on {{ .PublishDate.Format "January 2, 2006" }}
{{- if isset .Params "tags" -}}
{{- $tagsLen := len .Params.tags -}}