Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/damiencaselli/paperback.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Caselli <damien.caselli@gmail.com>2016-08-09 16:57:29 +0300
committerDamien Caselli <damien.caselli@gmail.com>2016-08-09 16:57:29 +0300
commita76785145fa48806d361d9a90bf287b1a7e8a247 (patch)
treef61f6a3b803e53e4eadd01995dc2a4d6d9946c1c /layouts
Initial commit
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html1
-rw-r--r--layouts/index.html27
-rw-r--r--layouts/partials/footer.html5
-rw-r--r--layouts/partials/head.html14
-rw-r--r--layouts/partials/header.html11
-rw-r--r--layouts/partials/nav.html17
-rw-r--r--layouts/partials/title.html7
-rw-r--r--layouts/post/list-item-expanded.html12
-rw-r--r--layouts/post/list-item.html3
-rw-r--r--layouts/post/single.html21
-rw-r--r--layouts/section/post.html35
11 files changed, 153 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..af97393
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1 @@
+four oh four
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..bdf9156
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+
+ {{ partial "head.html" . }}
+
+ <body>
+ <div class="container">
+
+ {{ partial "header.html" . }}
+
+ <section>
+
+ {{ range first (index .Site.Params "HomepagePosts" | default 3) (where .Data.Pages "Type" "post") }}
+ <article>
+ {{ .Render "list-item-expanded" }}
+ </article>
+ {{ end }}
+
+ </section>
+
+ {{ partial "nav.html" . }}
+
+ {{ partial "footer.html" . }}
+
+ </div>
+ </body>
+</html>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..6371e16
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,5 @@
+<footer class="site-footer">
+ <span class="owner">©2016 {{ .Site.Params.AuthorName }}</span>
+
+ <!-- {{ .Hugo.BuildDate }} -->
+</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..e94efaa
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,14 @@
+
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="author" content="{{ .Site.Params.AuthorName }}">
+ {{ .Hugo.Generator }}
+ {{ partial "title" . }}
+ <meta name="description" content="{{ .Description }}">
+ <link rel="canonical" href="{{ .Permalink }}">
+ <link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}">
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Arvo:400,700">
+ <link rel="stylesheet" href="{{ .Site.BaseURL }}css/paperback.css">
+</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..64fe71b
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,11 @@
+<header>
+ <h1>{{ .Title }}</h1>
+
+ {{ if ne .IsNode true }}
+ <time datetime="{{ .Date }}">{{ dateFormat "2006/01/02" .Date }}</time>
+ {{ end }}
+
+ {{ if and .IsHome (isset .Site.Params "Tagline") }}
+ <p>{{ .Site.Params.Tagline }}</p>
+ {{ end }}
+</header>
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
new file mode 100644
index 0000000..58e57a1
--- /dev/null
+++ b/layouts/partials/nav.html
@@ -0,0 +1,17 @@
+<nav class="site-nav">
+ <a href="{{ .Site.BaseURL }}">Home</a>
+ <a href="{{ .Site.BaseURL }}post/">All posts</a>
+
+ {{ if eq .Site.Params.SocialLinks true -}}
+
+ {{ if isset .Site.Params "TwitterUsername" -}}
+ <a href="https://twitter.com/{{ .Site.Params.TwitterUsername }}">Twitter</a>
+ {{- end }}
+
+ {{ if isset .Site.Params "GithubUsername" -}}
+ <a href="http://github.com/{{ .Site.Params.GithubUsername }}">GitHub</a>
+ {{- end }}
+
+ {{- end }}
+
+</nav>
diff --git a/layouts/partials/title.html b/layouts/partials/title.html
new file mode 100644
index 0000000..1c260c6
--- /dev/null
+++ b/layouts/partials/title.html
@@ -0,0 +1,7 @@
+<title>
+ {{- if eq .IsHome true -}}
+ {{ .Site.Title }}
+ {{- else -}}
+ {{ .Title }} — {{ .Site.Title }}
+ {{- end -}}
+</title>
diff --git a/layouts/post/list-item-expanded.html b/layouts/post/list-item-expanded.html
new file mode 100644
index 0000000..c623be8
--- /dev/null
+++ b/layouts/post/list-item-expanded.html
@@ -0,0 +1,12 @@
+<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+<div>
+ {{ if .Truncated }}
+ {{ .Summary }}
+
+ <footer>
+ <a href="{{ .Permalink }}">Read more</a>
+ </footer>
+ {{ else }}
+ {{ .Content }}
+ {{ end }}
+</div>
diff --git a/layouts/post/list-item.html b/layouts/post/list-item.html
new file mode 100644
index 0000000..c909b3a
--- /dev/null
+++ b/layouts/post/list-item.html
@@ -0,0 +1,3 @@
+<p>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+</p>
diff --git a/layouts/post/single.html b/layouts/post/single.html
new file mode 100644
index 0000000..18f9fbf
--- /dev/null
+++ b/layouts/post/single.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+
+ {{ partial "head.html" . }}
+
+ <body>
+ <div class="container">
+
+ {{ partial "header.html" . }}
+
+ <article>
+ {{ .Content }}
+ </article>
+
+ {{ partial "nav.html" . }}
+
+ {{ partial "footer.html" . }}
+
+ </div>
+ </body>
+</html>
diff --git a/layouts/section/post.html b/layouts/section/post.html
new file mode 100644
index 0000000..7f452e7
--- /dev/null
+++ b/layouts/section/post.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+
+ {{ partial "head.html" . }}
+
+ <body>
+ <div class="container">
+
+ {{ partial "header.html" . }}
+
+ <article>
+
+ {{ range (where .Data.Pages "Type" "post").GroupByDate "2006/01" -}}
+ <section>
+ <h2>{{ .Key }}</h2>
+
+ <ol>
+ {{ range .Pages -}}
+ <li>
+ {{ .Render "list-item" }}
+ </li>
+ {{ end }}
+ </ol>
+ </section>
+ {{ end }}
+
+ </article>
+
+ {{ partial "nav.html" . }}
+
+ {{ partial "footer.html" . }}
+
+ </div>
+ </body>
+</html>