From 5e356c5f635d45f0241854d9f43f38b2f0bd44f9 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Tue, 10 Jul 2018 01:41:34 +0800 Subject: [PATCH] style(*): google js style & trim whitespace --- layouts/404.html | 6 +- layouts/_default/baseof.html | 2 +- layouts/_default/section.html | 8 +- layouts/_default/single.html | 2 +- layouts/_default/taxonomy.html | 26 +-- layouts/_default/terms.html | 32 +-- layouts/index.html | 14 +- layouts/partials/comments.html | 122 ++++++------ layouts/partials/footer.html | 12 +- layouts/partials/head.html | 22 +- layouts/partials/post/reward.html | 6 +- layouts/partials/post/toc.html | 4 +- layouts/partials/scripts.html | 78 ++++---- layouts/post/single.html | 34 ++-- layouts/post/summary.html | 10 +- src/js/even.js | 321 +++++++++++++++--------------- src/js/main.js | 20 +- 17 files changed, 362 insertions(+), 357 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index fcf2b37..171fe09 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,6 +1,6 @@ -{{ define "title" }}404 page not found - {{ .Site.Title }}{{ end }} +{{- define "title" }}404 page not found - {{ .Site.Title }}{{ end -}} -{{ define "content" }} +{{- define "content" -}}
/* 404 page not found. */
@@ -15,4 +15,4 @@ var errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)]; errorEmojiContainer.appendChild(document.createTextNode(errorEmoji)); -{{ end }} +{{- end -}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0693148..c9cb88b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ {{ if ne .Site.Params.version "3.x" -}} -{{ errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/olOwOlo/hugo-theme-even#installation \n 2. You have an incompatible update. See https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#300 \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/README-zh.md#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#300 \n" -}} + {{ errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/olOwOlo/hugo-theme-even#installation \n 2. You have an incompatible update. See https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#300 \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/README-zh.md#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#300 \n" -}} {{ end -}} diff --git a/layouts/_default/section.html b/layouts/_default/section.html index fbe80f1..2b159e4 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,6 +1,6 @@ -{{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }} +{{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}} -{{ define "content"}} +{{- define "content" }} {{- $paginator := .Paginate .Data.Pages.ByDate.Reverse .Site.Params.archivePaginate }}${codeLineHtml} | ${codeHtml} |
${codeLineHtml} | ${codeHtml} |