From 383f0a2fe4f90c9231dc92e8fc34679c219f7009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sun, 8 Jul 2018 18:27:48 +0200 Subject: Minimalist theme blog elements --- layouts/_default/baseof.html | 11 +++++++++++ layouts/_default/summary.html | 16 ++++++++++++++++ layouts/index.html | 11 +++++++++++ layouts/partials/head.html | 2 ++ theme.toml | 21 +++++++++++++++++++++ 5 files changed, 61 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/summary.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/head.html create mode 100644 theme.toml diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..f38999e --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..3052456 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,16 @@ +
+ +
+

+ {{ .Title }} +

+
{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words
+
+

+ {{ .Summary }} +

+
+ Read more → +
+
+
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..17c1d26 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,11 @@ +{{ define "main" }} + +

{{.Title}}

+ +

Posts

+ + + {{ range where .Data.Pages "Section" "post" }} + {{ .Render "summary" }} + {{ end }} +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..c35336d --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,2 @@ + + diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..33986d8 --- /dev/null +++ b/theme.toml @@ -0,0 +1,21 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "Minimalist" +license = "MIT" +licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE" +description = "" +homepage = "http://example.com/" +tags = [] +features = [] +min_version = "0.41" + +[author] + name = "Óscar Nájera" + homepage = "https://blog.oscarnajera.com" + +# If porting an existing theme +[original] + name = "" + homepage = "" + repo = "" -- cgit v1.2.3