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

github.com/vaga/hugo-theme-m10c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien CASTERS <fabien@vaga.io>2019-01-19 12:47:03 +0300
committerFabien CASTERS <fabien@vaga.io>2019-01-20 20:07:11 +0300
commit90cbe1cab5e3ee9bc780c495242e6b1e4b2b3351 (patch)
tree341b53e4f21b3dd38db6b64a112c117b8716d3e7 /layouts/_default
Initial commit
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html31
-rw-r--r--layouts/_default/list.html16
-rw-r--r--layouts/_default/single.html29
3 files changed, 76 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..beb3db4
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+ <head>
+ <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} // {{ .Site.Title }}{{ end }}</title>
+ <meta charset="utf-8" />
+ <meta name="generator" content="Hugo {{ .Hugo.Version }}" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="author" content="{{ .Site.Params.author | default "John Doe" }}" />
+ <meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
+ <base href="{{ .Site.BaseURL }}" />
+ {{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}}
+ <link rel="stylesheet" href="{{ $style.Permalink }}" />
+ </head>
+ <body>
+ <header class="app-header">
+ <a href="/"><img class="app-header-avatar" src="./avatar.jpg" /></a>
+ <h1>{{ .Site.Title }}</h1>
+ <p>{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}</p>
+ <div class="app-header-social">
+ {{ range .Site.Params.social }}
+ <a target="_blank" href="{{ .url }}">{{ partial "icon.html" .name }}</a>
+ {{ end }}
+ </div>
+ </header>
+ <main class="app-container">
+ {{ block "main" . }}
+ {{ .Content }}
+ {{ end }}
+ </main>
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..6b90c77
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,16 @@
+{{ define "main" }}
+ <article>
+ <h1>{{ .Title }}</h1>
+ <ul class="posts-list">
+ {{ range $index, $element := $.Paginator.Pages }}
+ <li class="posts-list-item">
+ <a class="posts-list-item-title" href="{{ .Permalink }}">{{ .Title }}</a>
+ <span class="posts-list-item-description">
+ {{ partial "icon.html" "clock" }} {{ .ReadingTime }} min read -
+ {{ .PublishDate.Format "Jan 2, 2006" }}
+ </span>
+ </li>
+ {{ end }}
+ </ul>
+ </article>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..9c36f61
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,29 @@
+{{ define "main" }}
+ <article class="post">
+ <header class="post-header">
+ <h1 class ="post-title">{{ .Title }}</h1>
+ <div class="post-meta">
+ <div>
+ {{ partial "icon.html" "calendar" }}
+ {{ .PublishDate.Format "Jan 2, 2006" }}
+ </div>
+ <div>
+ {{ partial "icon.html" "clock" }}
+ {{ .ReadingTime }} min read
+ </div>
+ <div>
+ {{ partial "icon.html" "tag" }}
+ {{ range .Param "tags" -}}
+ {{- $name := . -}}
+ {{- with $.Site.GetPage (printf "/%s/%s" "tags" $name) -}}
+ <a class="tag" href="{{ .Permalink }}">{{ $name }}</a>
+ {{- end -}}
+ {{- end -}}
+ </div>
+ </div>
+ </header>
+ <div class="post-content">
+ {{ .Content }}
+ </div>
+ </article>
+{{ end }}