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

github.com/tblyler/light-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Blyler <tony@blyler.cc>2016-11-03 06:10:49 +0300
committerTony Blyler <tony@blyler.cc>2016-11-03 06:10:49 +0300
commit113550eb8a963973c6172efd08a44e52114d7880 (patch)
tree332bd0564ec156705154f94631758e04c29cccb0 /layouts
parent89eaf19aa2c6e9153f8eeea132a9b84e49b2b269 (diff)
Initial commit
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html6
-rw-r--r--layouts/_default/list.html19
-rw-r--r--layouts/_default/single.html9
-rw-r--r--layouts/index.html7
-rw-r--r--layouts/pages/single.html12
-rw-r--r--layouts/partials/footer.html12
-rw-r--r--layouts/partials/header.html61
-rw-r--r--layouts/post/single.html12
-rw-r--r--layouts/post/summary.html16
9 files changed, 154 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..4acf980
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,6 @@
+{{ partial "header.html" . }}
+<h1>404</h1>
+<h2>
+ Sorry, this page does not exist.
+</h2>
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..8ed782f
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,19 @@
+{{ partial "header.html" . }}
+ {{ range .Data.Pages.GroupByDate "2006" }}
+ <div class="listBody">
+ <div class="list">
+ <h2>{{ .Key }}</h2>
+ {{ range .Pages }}
+ <h3>
+ <a href="{{ .Permalink }}">
+ {{ .Title }} {{ if .GetParam "draft" }}DRAFT{{ end }}
+ </a>
+ </h3>
+ <div class="post-meta">
+ {{ .Date.Format "Mon, Jan 2, 2006" }}
+ </div>
+ {{ end }}
+ </div>
+ </div>
+ {{ end }}
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..95c225b
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,9 @@
+{{ partial "header.html" . }}
+ <div class="postBody">
+ <div class="post">
+ {{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
+ <span class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
+ {{ .Content }}
+ </div>
+ </div>
+{{ partial "footer.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..4be8db8
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,7 @@
+{{ partial "header.html" . }}
+ {{ range first 10 .Data.Pages }}
+ {{ if eq .Type "post" }}
+ {{ .Render "summary" }}
+ {{ end }}
+ {{ end }}
+{{ partial "footer.html" . }}
diff --git a/layouts/pages/single.html b/layouts/pages/single.html
new file mode 100644
index 0000000..6537425
--- /dev/null
+++ b/layouts/pages/single.html
@@ -0,0 +1,12 @@
+{{ partial "header.html" . }}
+ <div class="postBody">
+ <div class="post">
+ {{ if .Title }}
+ <h1>{{ .Title }}</h1>
+ {{ end }}
+ <div class="content">
+ {{ .Content }}
+ </div>
+ </div>
+ </div>
+{{ partial "footer.html" . }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..6890120
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,12 @@
+ <div class="links">
+ <a href="{{ .Site.BaseURL }}">Home</a>
+ {{ range first 1 (where .Site.Pages "Type" "post") }}
+ <a href="{{ .Site.BaseURL }}post/">Archive</a>
+ {{ end }}
+ {{ range where .Site.Pages "Type" "!=" "post" }}
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ {{ end }}
+ <a href="#top">Top</a>
+ </div>
+ </body>
+</html>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..b86bdcb
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
+ <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
+ <base href="{{ .Permalink }}">
+ <link rel="canonical" href="{{ .Permalink }}">
+ {{ if .RSSlink }}
+ <link href="{{ .RSSlink }}" rel="alternative" type="application/rss+xml" title="{{ .Title }}" />
+ {{ end }}
+ <link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/main.css" />
+ </head>
+ <body>
+ <a id="title" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
+ {{ if .Site.Params.logo }}
+ <img id="logo" alt="Logo" src="{{ .Site.Params.logo }}" />
+ {{ end }}
+ {{ if .Site.Title }}
+ <h1>{{ .Site.Title }}</h1>
+ {{ end }}
+ </a>
+ <div id="social">
+ {{ if .Site.Params.email }}
+ <a href="mailto:{{ .Site.Params.email }}" title="Email {{ .Site.Params.email }}">
+ <img alt="Email" src="{{ .Site.BaseURL }}images/email.svg" />
+ </a>
+ {{ end }}
+ {{ if .Site.Params.github }}
+ <a href="https://github.com/{{ .Site.Params.github }}" title="Github">
+ <img alt="GitHub" src="{{ .Site.BaseURL }}images/github.svg" />
+ </a>
+ {{ end }}
+ {{ if .Site.Params.facebook }}
+ <a href="https://facebook.com/{{ .Site.Params.facebook }}" title="Facebook">
+ <img alt="Facebook" src="{{ .Site.BaseURL }}images/facebook.svg" />
+ </a>
+ {{ end }}
+ {{ if .Site.Params.twitter }}
+ <a href="https://twitter.com/{{ .Site.Params.twitter }}" title="Twitter">
+ <img alt="Twitter" src="{{ .Site.BaseURL }}images/twitter.svg" />
+ </a>
+ {{ end }}
+ {{ if .Site.Params.linkedin }}
+ <a href="https://linkedin.com/in/{{ .Site.Params.linkedin }}" title="LinkedIn">
+ <img alt="LinkedIn" src="{{ .Site.BaseURL }}images/linkedin.svg" />
+ </a>
+ {{ end }}
+ </div>
+ {{ if .Site.Params.description }}
+ <p>{{ .Site.Params.description }}</p>
+ {{ end }}
+ <div class="links">
+ <a href="{{ .Site.BaseURL }}">Home</a>
+ {{ range first 1 (where .Site.Pages "Type" "post") }}
+ <a href="{{ .Site.BaseURL }}post/">Archive</a>
+ {{ end }}
+ {{ range where .Site.Pages "Type" "!=" "post" }}
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ {{ end }}
+ </div>
diff --git a/layouts/post/single.html b/layouts/post/single.html
new file mode 100644
index 0000000..74970ef
--- /dev/null
+++ b/layouts/post/single.html
@@ -0,0 +1,12 @@
+{{ partial "header.html" . }}
+ <div class="postBody">
+ <div class="post">
+ <h1>{{ .Title }}</h1>
+ <span class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - Read in {{ .ReadingTime }} Min</span>
+ <div class="content">
+ {{ .TableOfContents }}
+ {{ .Content }}
+ </div>
+ </div>
+ </div>
+{{ partial "footer.html" . }}
diff --git a/layouts/post/summary.html b/layouts/post/summary.html
new file mode 100644
index 0000000..6506244
--- /dev/null
+++ b/layouts/post/summary.html
@@ -0,0 +1,16 @@
+<div class="postBody">
+ <article class="post">
+ <header>
+ <h1>
+ <a href="{{ .Permalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a>
+ </h1>
+ <span class="post-meta">
+ {{ .Date.Format "Mon, Jan 2, 2006" }} - Read in {{ .ReadingTime }} Min
+ </span>
+ </header>
+ <div class="summary">
+ {{ .Summary }}
+ <a href="{{ .Permalink }}">Read more...</a>
+ </div>
+ </article>
+</div>