From 44dbcd6f34c676cefbacf12f18d9883c597a681a Mon Sep 17 00:00:00 2001 From: Track3 Date: Tue, 23 Oct 2018 13:15:50 +0800 Subject: First commit --- layouts/404.html | 19 +++++++++++++ layouts/_default/baseof.html | 36 ++++++++++++++++++++++++ layouts/_default/list.html | 34 +++++++++++++++++++++++ layouts/_default/single.html | 20 ++++++++++++++ layouts/index.html | 27 ++++++++++++++++++ layouts/partials/disqus.html | 16 +++++++++++ layouts/partials/footer.html | 4 +++ layouts/partials/header.html | 34 +++++++++++++++++++++++ layouts/partials/social-icons.html | 3 ++ layouts/partials/svg.html | 21 ++++++++++++++ layouts/posts/rss.xml | 27 ++++++++++++++++++ layouts/posts/single.html | 56 ++++++++++++++++++++++++++++++++++++++ 12 files changed, 297 insertions(+) create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/disqus.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/social-icons.html create mode 100644 layouts/partials/svg.html create mode 100644 layouts/posts/rss.xml create mode 100644 layouts/posts/single.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..c4cee71 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,19 @@ +{{ define "main" }} +
+

+ +

+ +
+{{ end }} + +{{ define "footer" }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..db28f28 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,36 @@ + + + + + + + + {{- with .Site.Params.themeColor }} + + + {{- end }} + + + + + + + {{.Title}} + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }} + {{ end -}} + {{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}} + + {{ block "head" . -}}{{- end }} + + + + {{ block "header" . -}}{{ end -}} + {{ block "main" . -}}{{ end -}} + {{ block "footer" . -}}{{ end }} + {{ $script := resources.Get "js/main.js" | minify | fingerprint -}} + + {{ template "_internal/google_analytics_async.html" . }} + + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..1e8873a --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,34 @@ +{{ define "header" }} +{{ partialCached "header.html" . }} +{{ end }} + +{{ define "main" }} +
+

{{ .Title }}

+ {{- if .Content }} +
+ {{ .Content }} +
+ {{- end }} + {{- range .Data.Pages.GroupByDate "2006" }} +
+
{{ .Key }}
+ +
+ {{- end }} +
+{{ end }} + +{{ define "footer" }} +{{ partialCached "footer.html" . }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..7136bfb --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,20 @@ +{{ define "header" }} +{{ partialCached "header.html" . }} +{{ end }} + +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ .Content }} +
+ {{- with .Params.comments }} + {{ with .Site.DisqusShortname }}{{ partialCached "disqus.html" . }}{{ end }} + {{- end }} +
+{{ end }} + +{{ define "footer" }} +{{ partialCached "footer.html" . }} + +{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..702c2c4 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,27 @@ +{{ define "main" }} +
+
+

{{ .Site.Title }}

+ {{- with .Site.Params.homeSubtitle }} +

{{.}}

+ {{- end }} + {{- with .Site.Params.social }} +
+ {{ partialCached "social-icons.html" . }} +
+ {{- end }} + +
+ +
+{{ end }} + +{{ define "footer" }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html new file mode 100644 index 0000000..b8a7c77 --- /dev/null +++ b/layouts/partials/disqus.html @@ -0,0 +1,16 @@ +
+ + +comments powered by Disqus \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..18aeaf3 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..7e8f747 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,34 @@ + + \ No newline at end of file diff --git a/layouts/partials/social-icons.html b/layouts/partials/social-icons.html new file mode 100644 index 0000000..61c44a6 --- /dev/null +++ b/layouts/partials/social-icons.html @@ -0,0 +1,3 @@ +{{ range . -}} +{{ .name }}{{ partial "svg.html" . }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html new file mode 100644 index 0000000..5591dfe --- /dev/null +++ b/layouts/partials/svg.html @@ -0,0 +1,21 @@ +{{- if (eq .name "codepen") -}} + +{{- else if (eq .name "facebook") -}} + +{{- else if (eq .name "github") -}} + +{{- else if (eq .name "instagram") -}} + +{{- else if (eq .name "linkedin") -}} + +{{- else if (eq .name "slack") -}} + +{{- else if (eq .name "twitter") -}} + +{{- else if (eq .name "youtube") -}} + +{{- else if (eq .name "email") -}} + +{{- else -}} + +{{- end -}} \ No newline at end of file diff --git a/layouts/posts/rss.xml b/layouts/posts/rss.xml new file mode 100644 index 0000000..eaf28c0 --- /dev/null +++ b/layouts/posts/rss.xml @@ -0,0 +1,27 @@ + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end -}} + {{ range .Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + {{ printf `` .Content | safeHTML }} + + {{ end }} + + diff --git a/layouts/posts/single.html b/layouts/posts/single.html new file mode 100644 index 0000000..62a875b --- /dev/null +++ b/layouts/posts/single.html @@ -0,0 +1,56 @@ +{{ define "header" }} +{{ partial "header.html" . }} +{{ end }} + +{{ define "main" }} + {{- with .Params.featuredImg }} +
+ {{- end }} +
+
+
+ +

{{ .Title }}

+
+
+ {{ .Content }} +
+
+
+ {{- with .Params.tags }} +

+ + {{- range . -}} + {{.}} + {{- end }} +

+ {{- end }} +

{{ .WordCount }} Words

+

{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}

+ {{- if .GitInfo }} +

{{ .GitInfo.AbbreviatedHash }} @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}

+ {{- end }} +
+
+
+ {{- with .NextInSection }} + + {{- end }} + {{- with .PrevInSection }} + + {{- end }} +
+ {{- with .Site.DisqusShortname }} + {{ partialCached "disqus.html" . }} + {{- end }} +
+{{ end }} + +{{ define "footer" }} +{{ partialCached "footer.html" . }} + +{{ end }} \ No newline at end of file -- cgit v1.2.3