From 19051bc505085073275aa85fc075520019c809c4 Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Sat, 13 Jul 2019 21:12:40 +0200 Subject: [PATCH] Added authors, as an exercise for other taxonomies. --- content/_index.cs.md | 2 +- content/authors/Greenscreener/_index.cs.md | 7 +++++ content/authors/Greenscreener/_index.en.md | 7 +++++ content/authors/_index.cs.md | 4 +++ themes/patek/assets/css/main.scss | 3 ++ themes/patek/i18n/cs.toml | 2 ++ themes/patek/i18n/en.toml | 2 ++ themes/patek/layouts/_default/list.html | 3 +- themes/patek/layouts/authors/list.html | 17 +++++++++++ themes/patek/layouts/partials/list.html | 14 ++++++++++ .../layouts/partials/paginator-buttons.html | 28 +++++++++++++++++++ 11 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 content/authors/Greenscreener/_index.cs.md create mode 100644 content/authors/Greenscreener/_index.en.md create mode 100644 content/authors/_index.cs.md create mode 100644 themes/patek/layouts/authors/list.html create mode 100644 themes/patek/layouts/partials/list.html create mode 100644 themes/patek/layouts/partials/paginator-buttons.html diff --git a/content/_index.cs.md b/content/_index.cs.md index 507c6f8..901b062 100644 --- a/content/_index.cs.md +++ b/content/_index.cs.md @@ -1,5 +1,5 @@ --- -title: "" +title: "Homepage" date: 2019-07-12T14:54:15+02:00 draft: false authors: [ "Greenscreener" ] diff --git a/content/authors/Greenscreener/_index.cs.md b/content/authors/Greenscreener/_index.cs.md new file mode 100644 index 0000000..fa23dec --- /dev/null +++ b/content/authors/Greenscreener/_index.cs.md @@ -0,0 +1,7 @@ +--- +title: "Greenscreener" +avatar: "https://greenscreener.tk/images/GSLOGO.svg" +fullname: "Jan Černohorský" +--- +# Blehgh +Lorem ipsum dolor sit amet. \ No newline at end of file diff --git a/content/authors/Greenscreener/_index.en.md b/content/authors/Greenscreener/_index.en.md new file mode 100644 index 0000000..fa23dec --- /dev/null +++ b/content/authors/Greenscreener/_index.en.md @@ -0,0 +1,7 @@ +--- +title: "Greenscreener" +avatar: "https://greenscreener.tk/images/GSLOGO.svg" +fullname: "Jan Černohorský" +--- +# Blehgh +Lorem ipsum dolor sit amet. \ No newline at end of file diff --git a/content/authors/_index.cs.md b/content/authors/_index.cs.md new file mode 100644 index 0000000..c5c4466 --- /dev/null +++ b/content/authors/_index.cs.md @@ -0,0 +1,4 @@ +--- +title: "Autoři" +type: "_default" +--- \ No newline at end of file diff --git a/themes/patek/assets/css/main.scss b/themes/patek/assets/css/main.scss index f255dc7..acc71ea 100644 --- a/themes/patek/assets/css/main.scss +++ b/themes/patek/assets/css/main.scss @@ -57,4 +57,7 @@ $primary: #0b2a37; font-family: 'Fira Code'; font-size: smaller; } +.author-media { + margin-bottom: 15px; +} // /Custom styles diff --git a/themes/patek/i18n/cs.toml b/themes/patek/i18n/cs.toml index e69de29..d20206a 100644 --- a/themes/patek/i18n/cs.toml +++ b/themes/patek/i18n/cs.toml @@ -0,0 +1,2 @@ +[readmore] +other = "Číst dále" \ No newline at end of file diff --git a/themes/patek/i18n/en.toml b/themes/patek/i18n/en.toml index e69de29..56cd5eb 100644 --- a/themes/patek/i18n/en.toml +++ b/themes/patek/i18n/en.toml @@ -0,0 +1,2 @@ +[readmore] +other = "Read more" \ No newline at end of file diff --git a/themes/patek/layouts/_default/list.html b/themes/patek/layouts/_default/list.html index 41b8269..88cc96c 100644 --- a/themes/patek/layouts/_default/list.html +++ b/themes/patek/layouts/_default/list.html @@ -1,3 +1,4 @@ {{ define "main" }} - +

{{ .Title }}

+ {{ partial "list.html" .}} {{ end }} \ No newline at end of file diff --git a/themes/patek/layouts/authors/list.html b/themes/patek/layouts/authors/list.html new file mode 100644 index 0000000..edc0a5b --- /dev/null +++ b/themes/patek/layouts/authors/list.html @@ -0,0 +1,17 @@ +{{ define "main" }} +
+
+
+ User avatar +
+
+
+

{{ .Title }}

+
{{ .Params.fullname }}
+
+
+
+ {{ .Content }} +
+ {{ partial "list.html" . }} +{{ end }} \ No newline at end of file diff --git a/themes/patek/layouts/partials/list.html b/themes/patek/layouts/partials/list.html new file mode 100644 index 0000000..e1fd1c7 --- /dev/null +++ b/themes/patek/layouts/partials/list.html @@ -0,0 +1,14 @@ +{{ $baseUrl := .Site.BaseURL }} +{{ $paginator := .Paginate (.Pages.ByPublishDate.Reverse) }} +{{ partial "paginator-buttons.html" $paginator }} +{{ range $paginator.Pages }} +
+
+ +
+

{{ replaceRE "invisible\\(\\);(?:.|\n)*invisibleEnd\\(\\);" "" .Summary }} {{ T "readmore" }}

+
+{{ end }} +{{ partial "paginator-buttons.html" $paginator }} diff --git a/themes/patek/layouts/partials/paginator-buttons.html b/themes/patek/layouts/partials/paginator-buttons.html new file mode 100644 index 0000000..fb40c2f --- /dev/null +++ b/themes/patek/layouts/partials/paginator-buttons.html @@ -0,0 +1,28 @@ +{{ $paginator := . }} +{{ if gt $paginator.TotalPages 1 }} +
+ +
+{{ end }} \ No newline at end of file