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
Initial commit
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html31
-rw-r--r--layouts/_default/list.html16
-rw-r--r--layouts/_default/single.html29
-rw-r--r--layouts/partials/icon.html29
4 files changed, 105 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 }}
diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html
new file mode 100644
index 0000000..f9c6db9
--- /dev/null
+++ b/layouts/partials/icon.html
@@ -0,0 +1,29 @@
+{{- if (eq . "codepen") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-codepen"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>
+{{- else if (eq . "facebook") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-facebook"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
+{{- else if (eq . "github") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>
+{{- else if (eq . "gitlab") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-gitlab"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>
+{{- else if (eq . "instagram") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-instagram"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.5" y2="6.5"></line></svg>
+{{- else if (eq . "linkedin") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-linkedin"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
+{{- else if (eq . "slack") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-slack"><path d="M22.08 9C19.81 1.41 16.54-.35 9 1.92S-.35 7.46 1.92 15 7.46 24.35 15 22.08 24.35 16.54 22.08 9z"></path><line x1="12.57" y1="5.99" x2="16.15" y2="16.39"></line><line x1="7.85" y1="7.61" x2="11.43" y2="18.01"></line><line x1="16.39" y1="7.85" x2="5.99" y2="11.43"></line><line x1="18.01" y1="12.57" x2="7.61" y2="16.15"></line></svg>
+{{- else if (eq . "twitter") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-twitter"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
+{{- else if (eq . "youtube") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-youtube"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>
+{{- else if (eq . "email") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-mail"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
+{{- else if (eq . "tag") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tag"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7" y2="7"></line></svg>
+{{- else if (eq . "clock") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-clock"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
+{{- else if (eq . "calendar") -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>
+{{- else -}}
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
+{{- end -}}