Website Summary Files Commits Branches @commit @diff @stats
path: root / layouts
diff options
context:
space:
mode:
Commitfba5befbf5b9cb9b9026b8f6af7f6c5444e1a8f5 (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-10-04 15:15:57 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-10-04 15:15:57 +0300
Filesf25c11016c9ec94f27f928ca00fe0173b71dda59 /layouts
IPL-fba5befbf5b9cb9b9026b8f6af7f6c5444e1a8f5.tar
IPL-fba5befbf5b9cb9b9026b8f6af7f6c5444e1a8f5.tar.gz
IPL-fba5befbf5b9cb9b9026b8f6af7f6c5444e1a8f5.zip
Squashed 'website/themes/base16/' content from commit 7b2da73
git-subtree-dir: website/themes/base16 git-subtree-split: 7b2da739c813cd680e44606d2150e3c66a6794e6
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..2340809
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,16 @@
+{{ partial "header.html" . }}
+
+<main role="main" class="page-not-found">
+
+ <h1>
+ <span class="base05">[</span><span class="base08">4</span><span class="base09">0</span><span class="base0a">4</span><span class="base05">]</span>
+ <span class="base05"># _</span>
+ </h1>
+
+ <h2>
+ not found
+ </h2>
+
+</main>
+
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..cf5b2b2
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,8 @@
+{{ partial "header.html" . }}
+<main role="main" class="article-list">
+ <h1 class="list-title">{{ .Title }}</h1>
+ {{ range .Data.Pages }}
+ {{ partial "article-list-item.html" . }}
+ {{ end }}
+</main>
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..b9ff539
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,7 @@
+{{ partial "header.html" . }}
+
+<main role="main" class="article">
+ {{ partial "article.html" . }}
+</main>
+
+{{ partial "footer.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..2744d98
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,5 @@
+{{ partial "header.html" . }}
+
+{{ partial "homepage.html" . }}
+
+{{ partial "footer.html" . }}
diff --git a/layouts/partials/article-list-item.html b/layouts/partials/article-list-item.html
new file mode 100644
index 0000000..10b8fce
--- /dev/null
+++ b/layouts/partials/article-list-item.html
@@ -0,0 +1,12 @@
+<article class="list-item" itemscope itemtype="http://schema.org/Blog">
+ <h2 class="headline" itemprop="headline"><a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} (Draft){{ end }}</a></h2>
+ <div class="meta">
+{{ if not .Date.IsZero }}
+ <span class="key">published on</span>
+ <span class="val"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
+{{ end }}
+ </div>
+ <section class="summary">
+ {{ .Summary }} {{ if .Truncated }} <a href="{{ .RelPermalink }}">Read More...</a>{{ end }}
+ </section>
+</article>
diff --git a/layouts/partials/article.html b/layouts/partials/article.html
new file mode 100644
index 0000000..c69a76f
--- /dev/null
+++ b/layouts/partials/article.html
@@ -0,0 +1,30 @@
+{{ $page := .Page }}
+<article class="single" itemscope itemtype="http://schema.org/BlogPosting">
+ <div class="meta">
+{{ if not .Page.Date.IsZero }}
+ <span class="key">published on</span>
+ <span class="val"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
+{{ end }}
+{{ with .Params.categories }}
+ <span class="key">{{ if $page.Date.IsZero }}published {{ end }}in</span>
+ <span class="val">
+{{ range . }}
+ <a href="{{ . | printf "categories/%s" | relURL }}">{{ . }}</a>
+{{ end }}
+ </span>
+{{ end }}
+{{ with .Params.tags }}
+ <br>
+ <span class="key">tags:</span>
+ <span class="val">
+{{ range . }}
+ <a href="{{ . | printf "tags/%s" | relURL }}">{{ . }}</a>
+{{ end }}
+ </span>
+{{ end }}
+ </div>
+ <h1 class="headline" itemprop="headline">{{ .Title }}</h1>
+ <section class="body" itemprop="articleBody">
+ {{ .Content }}
+ </section>
+</article>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..13b47a3
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,10 @@
+</div>
+
+<footer>
+ <div class="container">
+ <span class="copyright">&copy; {{ .Site.LastChange.Year }} {{ .Site.Title }} - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
+ </div>
+</footer>
+
+</body>
+</html>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..715808c
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
+<head>
+<meta charset="utf-8">
+<meta name="description" content="{{ if eq .Description "" }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
+{{- with $.Param "keywords" }}
+<meta name="keywords" content="{{ delimit . "," }}">
+{{- end }}
+{{- with $.Param "author" }}
+<meta name="author" content="{{ . }}">
+{{- end }}
+{{ .Hugo.Generator }}
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="{{ "css/style.css" | relURL }}" type="text/css">
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
+<link rel="alternate" href="{{ "index.xml" | relURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
+<title>{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title>
+</head>
+<body>
+
+<header>
+ <div class="container clearfix">
+ <a class="path" href="{{ .Site.BaseURL }}">[{{ .Site.Title }}]</a>
+ <span class="caret"># _</span>
+ <div class="right">
+ {{ range $i, $page := (where .Site.Pages "Section" "pages") }}
+ {{ if not (eq $i 0) }}|{{ end }}
+ <a class="path" href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
+ {{ end }}
+ </div>
+ </div>
+</header>
+
+<div class="container">
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html
new file mode 100644
index 0000000..a1580ed
--- /dev/null
+++ b/layouts/partials/hero.html
@@ -0,0 +1,13 @@
+{{ $baseurl := .Site.BaseURL }}
+<h1 class="site-title">
+ <span class="base05">[</span><span class="base08">b</span><span class="base09">a</span><span class="base0a">s</span><span class="base0b">e</span><span class="base0c">1</span><span class="base0d">6</span><span class="base05">]</span>
+ <span class="base05"># _</span>
+</h1>
+
+<div class="hero-logo">
+ <img src="{{ "img/base16-eighties.svg" | relURL }}">
+</div>
+
+<div style="text-align: center;">
+ Add your own "<code>layouts/partials/hero.html</code>" to replace this text.
+</div>
diff --git a/layouts/partials/homepage.html b/layouts/partials/homepage.html
new file mode 100644
index 0000000..cdbc78e
--- /dev/null
+++ b/layouts/partials/homepage.html
@@ -0,0 +1,44 @@
+{{ $baseurl := .Site.BaseURL }}
+<main role="main" class="homepage">
+
+ {{ partial "hero.html" . }}
+
+ <h1 class="headline">Recent Posts</h1>
+
+ <div class="article-list">
+ {{ range first 3 (where .Data.Pages "Section" "post") }}
+ {{ partial "article-list-item.html" . }}
+ {{ end }}
+ </div>
+
+{{ with .Site.Taxonomies.categories }}
+
+ <h1 class="headline">Categories</h1>
+
+ <section class="categories">
+ {{ range $name, $value := . }}
+ <h2 class="category">
+ <a href="{{ $baseurl }}categories/{{ $name | urlize }}">{{ title $name }}</a>
+ <small>({{ .Count }})</small>
+ </h2>
+ {{ end }}
+ </section>
+
+{{ end }}
+
+{{ with .Site.Taxonomies.tags }}
+
+ <h1 class="headline">Tags</h1>
+
+ <section class="tags">
+ {{ range $name, $value := . }}
+ <span class="tag">
+ <a href="{{ $baseurl }}tags/{{ $name | urlize }}">{{ $name }}</a>
+ <small>({{ .Count }})</small>
+ </span>
+ {{ end }}
+ </section>
+
+{{ end }}
+
+</main>