From 3bb532df30e5ed3cf3713dc450a1a0ec99172e08 Mon Sep 17 00:00:00 2001 From: Track3 Date: Wed, 12 Dec 2018 00:02:36 +0800 Subject: Improve code quality & consistency * Add EditorConfig * Rebuild animate.css: remove an unused animation * Slightly rewrite header part --- layouts/404.html | 2 +- layouts/_default/baseof.html | 2 +- layouts/_default/list.html | 4 +-- layouts/_default/single.html | 2 +- layouts/index.html | 2 +- layouts/partials/footer.html | 2 +- layouts/partials/header.html | 22 +++++++---------- layouts/partials/social-icons.html | 2 +- layouts/posts/rss.xml | 50 +++++++++++++++++++------------------- layouts/posts/single.html | 2 +- 10 files changed, 43 insertions(+), 47 deletions(-) (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html index c4cee71..535fd1a 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -16,4 +16,4 @@ {{ define "footer" }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index db28f28..66ddb80 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -33,4 +33,4 @@ {{ template "_internal/google_analytics_async.html" . }} - \ No newline at end of file + diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1e8873a..3a5df64 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ {{ end }} {{ define "main" }} -
+

{{ .Title }}

{{- if .Content }}
@@ -31,4 +31,4 @@ {{ define "footer" }} {{ partialCached "footer.html" . }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8a4c168..53d566d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -19,4 +19,4 @@ {{ define "footer" }} {{ partialCached "footer.html" . }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/index.html b/layouts/index.html index c36f3d3..d2754dc 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -27,4 +27,4 @@ {{ define "footer" }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 18aeaf3..423ef8f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,4 +1,4 @@ \ No newline at end of file + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7e8f747..8c241fe 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,18 +10,14 @@ {{- end }}
-
-
- {{- with .Params.featuredImg }} - - {{- end }} - {{- with .Site.Params.social }} - - {{- partialCached "social-icons.html" . -}} - - {{- end }} - -
+
+ {{- with .Params.featuredImg }} + + {{- end }} + {{- with .Site.Params.social -}} + {{ partialCached "social-icons.html" . }} + {{- end -}} +
@@ -31,4 +27,4 @@
  • {{ .Name }}
  • {{- end }} - \ No newline at end of file + diff --git a/layouts/partials/social-icons.html b/layouts/partials/social-icons.html index 61c44a6..3496bef 100644 --- a/layouts/partials/social-icons.html +++ b/layouts/partials/social-icons.html @@ -1,3 +1,3 @@ {{ range . -}} {{ .name }}{{ partial "svg.html" . }} -{{- end }} \ No newline at end of file +{{- end -}} diff --git a/layouts/posts/rss.xml b/layouts/posts/rss.xml index eaf28c0..8db9f49 100644 --- a/layouts/posts/rss.xml +++ b/layouts/posts/rss.xml @@ -1,27 +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 }} - + + {{ 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 index 2c94eb0..107b6d3 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -55,4 +55,4 @@ {{ define "footer" }} {{ partialCached "footer.html" . }} -{{ end }} \ No newline at end of file +{{ end }} -- cgit v1.2.3