From 2a89630a47358edd3351bd8ad90ab03bd507bd59 Mon Sep 17 00:00:00 2001
From: Alex Shpak <alex-shpak@users.noreply.github.com>
Date: Sat, 24 Nov 2018 15:14:43 +0100
Subject: Add simple blog rendering

---
 layouts/partials/docs/html-head.html |  1 -
 layouts/posts/baseof.html            | 20 ++++++++++++++++++++
 layouts/posts/list.html              | 20 ++++++++++++++++++++
 layouts/posts/single.html            | 11 +++++++++++
 4 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 layouts/posts/baseof.html
 create mode 100644 layouts/posts/list.html
 create mode 100644 layouts/posts/single.html

diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html
index 363bcd2..c4f6a49 100644
--- a/layouts/partials/docs/html-head.html
+++ b/layouts/partials/docs/html-head.html
@@ -4,6 +4,5 @@
 
 <link href="https://fonts.googleapis.com/css?family=Oxygen|Oxygen+Mono:300,400,700" rel="stylesheet">
 <link rel="stylesheet" href="{{ "normalize.min.css" | absURL }}">
-<!-- <link rel="stylesheet" href="/basscss.min.css"> -->
 {{ $styles := resources.Get "book.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
 <link rel="stylesheet" href="{{ $styles.RelPermalink }}">
\ No newline at end of file
diff --git a/layouts/posts/baseof.html b/layouts/posts/baseof.html
new file mode 100644
index 0000000..d147c1e
--- /dev/null
+++ b/layouts/posts/baseof.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+{{- partial "docs/shared" -}}
+<html>
+
+<head>
+  {{ partial "docs/html-head" . }}
+  {{ partial "docs/inject/head" . }}
+</head>
+
+<body>
+  <main>
+    <div class="book-posts mx-auto">
+      {{ template "main" . }}
+    </div>
+  </main>
+  {{ partial "docs/inject/body" . }}
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
new file mode 100644
index 0000000..4fda83f
--- /dev/null
+++ b/layouts/posts/list.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+<section>
+  {{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
+  {{ range sort .Paginator.Pages }}
+  <article>
+    <h2>
+      <a href="{{ .Permalink }}">{{ .Title }}</a>
+    </h2>
+    <h5>{{ .Date.Format "January 2, 2006" }}</h5>
+    <p>
+      {{ .Summary }}
+      {{ if .Truncated }}
+      <a href="{{ .Permalink }}">...</a>
+      {{ end }}
+    </p>
+  </article>
+  {{ end }}
+  {{ template "_internal/pagination.html" . }}
+</section>
+{{ end }}
\ No newline at end of file
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
new file mode 100644
index 0000000..f31b1a9
--- /dev/null
+++ b/layouts/posts/single.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+<section>
+  <header>
+    <h1>{{ .Title }}</h1>
+    <h5>{{ .Date.Format "January 2, 2006" }}</h5>
+  </header>
+  <article class="markdown">
+    {{- .Content -}}
+  </article>
+</section>
+{{ end }}
\ No newline at end of file
-- 
cgit v1.2.3