fix(css): fix some css bugs

This commit is contained in:
Dillon
2020-01-31 18:46:28 +08:00
parent 7e6236361f
commit 344f0a9f41
36 changed files with 705 additions and 429 deletions

View File

@@ -1,10 +1,16 @@
{{ define "title" }}{{ T "pageNotFound" }} | {{ .Site.Title }}{{ end -}}
{{- define "title" }}{{ T "pageNotFound" | printf "404 %s" }} | {{ .Site.Title }}{{ end -}}
{{ define "content" }}
{{- define "content" -}}
<div class="notfound">
<h1 class="error-emoji"></h1>
<p class="error-text">/* 404 {{ T "pageNotFound" }}. */</p>
<p class="error-link"><a href="{{ .Site.BaseURL }}"> {{ T "backToHome" }}</a></p>
<p class="error-text">
{{- T "pageNotFoundText" -}}
</p>
<p class="error-link">
<a href="{{ .Site.BaseURL }}">
{{- T "backToHome" | printf "← %s" -}}
</a>
</p>
</div>
<script>
var errorEmojiContainer = document.getElementsByClassName('error-emoji')[0];
@@ -15,4 +21,4 @@
var errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
errorEmojiContainer.appendChild(document.createTextNode(errorEmoji));
</script>
{{ end }}
{{- end -}}

View File

@@ -0,0 +1,20 @@
<figure>
<img
{{ $res := resources.Get "svg/loading.svg" | minify }}
src="{{ $res.RelPermalink }}"
data-sizes="auto"
data-src="{{ .Destination | safeURL }}"
alt="{{ .Text }}"
{{- with .Title -}}
title="{{ . }}"
{{- end -}}
class="lazyload"
>
<figcaption class="image-caption">
{{- if .Title -}}
{{- .Title -}}
{{- else -}}
{{- .Text -}}
{{- end -}}
</figcaption>
</figure>

View File

@@ -0,0 +1,10 @@
<a href="{{ .Destination | safeURL }}"
{{- with .Title -}}
title="{{ . }}"
{{- end -}}
{{- if strings.HasPrefix .Destination "http" -}}
target="_blank"
{{- end -}}
>
{{- .Text -}}
</a>

View File

@@ -1,13 +1,13 @@
{{ if ne .Site.Params.version "5.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/dillonzq/LoveIt#installation \n 2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
{{ end -}}
{{- if ne .Site.Params.version "0.1.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/dillonzq/LoveIt#installation \n 2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
{{- end -}}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{- partial "head.html" . }}
{{- partial "head.html" . -}}
</head>
<body>
<script>
@@ -15,15 +15,17 @@
window.isDark && document.body.classList.add('dark-theme');
</script>
<div class="wrapper">
{{ partial "header.html" . -}}
{{- partial "header.html" . -}}
<main class="main">
<div class="container">
{{ block "content" . }}{{ end -}}
{{- block "content" . }}{{ end -}}
</div>
</main>
{{ partial "footer.html" . -}}
{{ partial "scripts.html" . -}}
{{- partial "footer.html" . -}}
{{- partial "scripts.html" . -}}
</div>
<a href="#" class="dynamic-to-top" id="dynamic-to-top" data-scroll><span>&nbsp;</span></a>
<a href="#" class="dynamic-to-top" id="dynamic-to-top" data-scroll>
<span>&nbsp;</span>
</a>
</body>
</html>

View File

@@ -1,17 +1,19 @@
{{ define "title" }}{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title }}{{ end -}}
{{- define "title" }}{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title }}{{ end -}}
{{ define "content" -}}
{{ $data := .Data -}}
<div class="post-warp archive">
{{- define "content" -}}
{{- $data := .Data -}}
<div class="warpper archive">
<h2 class="post-title animated pulse faster">
{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }}
{{- T "all" | humanize}}{{ T .Section | default .Section | humanize -}}
</h2>
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
<h3>{{ .Key }}</h3>
{{- range .Pages -}}
<article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a>
<a href="{{ .RelPermalink }}" class="archive-item-link">
{{- .Title -}}
</a>
<span class="archive-item-date">
{{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
</span>
@@ -20,4 +22,4 @@
{{- end -}}
{{- partial "paginator.html" . -}}
</div>
{{- end }}
{{- end -}}

View File

@@ -1,35 +1,28 @@
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
{{ define "content" }}
<div class="post-warp single">
<h1 class="post-title animated pulse faster">{{ .Title }}</h1>
{{- define "content" -}}
<div class="warpper single">
<h1 class="post-title animated pulse faster">
{{- .Title -}}
</h1>
<div class="post-content">
{{ $content := .Content }}
{{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
{{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `:\(([\w- ]+?)\):` }}
{{ $REout = `<i class="$1 fa-fw"></i>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<sup>\[return\]</sup>` }}
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(h[123456]) (id=".+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(li) (id="fn:.+?")>` }}
{{ $REout = `<$1><a class="post-dummy-target" $2></a>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $content | safeHTML }}
{{- $content := .Content -}}
{{- $REin := `:\(([\w- ]+?)\):` -}}
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- $REin = `<sup>\[return\]</sup>` -}}
{{- $REout = printf "<sup>[%s]</sup>" (T "return") -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- $REin = `<(h[23456]) (id=".+?")>` -}}
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- $content | safeHTML -}}
</div>
</div>
{{end }}
{{- end -}}

View File

@@ -1,3 +1,3 @@
# {{ .Title }}
{{ .RawContent }}
{{ .RawContent }}

View File

@@ -9,7 +9,8 @@
{{ with .Params.featured_image }}
{{ $image := $.Params.featured_image_preview | default . }}
<div class="post-featured-image-preview">
<img src=/images/loading.svg data-sizes=auto data-src={{ $image }} alt="featured image" class="lazyload">
{{ $res := resources.Get "svg/loading.svg" | minify }}
<img src="{{ $res.RelPermalink }}" data-sizes="auto" data-src="{{ $image }}" alt="featured image" class="lazyload">
</div>
{{ end }}
<!-- end featured_image-->
@@ -42,7 +43,7 @@
{{ $summary = replaceRE $REin $REout $summary }}
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
{{ $summary = replaceRE $REin $REout $summary }}
{{ $summary = replaceRE $REin $REout $summary }}
{{ $summary | safeHTML }}
{{ end }}
</div>

View File

@@ -1,37 +1,49 @@
<feed xmlns="http://www.w3.org/2005/Atom">
{{ if .IsHome }}
<title>{{ .Title }}</title>
{{ else }}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
<link href="{{ .Permalink }}index.xml" rel="self"/>
<link href="{{ .Permalink }}"/>
{{ if not .Date.IsZero }}
<updated>{{ .Date.Format "02-01-2006T15:04:05-07:00" | safeHTML }}</updated>
{{ end }}
<id>{{ .Permalink }}</id>
{{- if not .Date.IsZero -}}
<updated>
{{- .Date.Format "02-01-2006T15:04:05-07:00" | safeHTML -}}
</updated>
{{- end -}}
<id>
{{- .Permalink -}}
</id>
<author>
{{ with .Site.Author.name }}
{{- with .Site.Author.name -}}
<name>{{ . }}</name>
{{ end }}
{{ with $.Site.Author.email }}
{{- end -}}
{{- with .Site.Author.email -}}
<email>{{ . }}</email>
{{ end }}
{{- end -}}
</author>
<generator>Hugo -- gohugo.io</generator>
{{ range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) }}
{{- range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) -}}
<entry>
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
<title type="html">
{{- printf "<![CDATA[%s]]>" .Title | safeHTML -}}
</title>
<link href="{{ .Permalink }}"/>
<id>{{ .Permalink }}</id>
{{ with .Site.Author.name }}
<id>
{{- .Permalink -}}
</id>
{{- with .Site.Author.name -}}
<author>
<name>{{ . }}</name>
<name>
{{- . -}}
</name>
</author>
{{ end }}
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
{{- end -}}
<published>
{{- .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}
</published>
<updated>
{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}
</updated>
<content type="html">
{{- printf "<![CDATA[%s]]>" .Content | safeHTML -}}
</content>
</entry>
{{ end }}
</feed>
{{- end -}}
</feed>

View File

@@ -1,22 +1,22 @@
{{ define "content" -}}
{{ if eq .Site.Params.home_mode "post" -}}
<div class="post-warp">
{{- define "content" -}}
{{- if eq .Site.Params.home_mode "post" -}}
<div class="warpper">
{{- partial "home/profile.html" . -}}
{{ $paginator := where .Site.RegularPages "Type" "posts" -}}
{{ $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
{{ with .Site.Params.home_paginate -}}
{{ $paginator = $.Paginate $paginator . -}}
{{ else -}}
{{ $paginator = $.Paginate $paginator -}}
{{ end -}}
{{ range $paginator.Pages -}}
{{ .Render "summary" -}}
{{ end -}}
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
{{- $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
{{- with .Site.Params.home_paginate -}}
{{- $paginator = $.Paginate $paginator . -}}
{{- else -}}
{{- $paginator = $.Paginate $paginator -}}
{{- end -}}
{{- range $paginator.Pages -}}
{{- .Render "summary" -}}
{{- end -}}
{{ partial "paginator.html" . -}}
{{- partial "paginator.html" . -}}
</div>
{{- else -}}
{{ partial "home/profile.html" . -}}
{{ end -}}
{{ end }}
{{- partial "home/profile.html" . -}}
{{- end -}}
{{- end -}}

View File

@@ -1,6 +1,6 @@
{{ if eq (getenv "HUGO_ENV") "production" | and .IsPage | and (ne .Params.comment false) -}}
<!-- Disqus Comment System-->
{{- if .Site.DisqusShortname -}}
{{- if .Site.Params.disqus.shortname -}}
<div id="disqus_thread"></div>
<script type="text/javascript">
(function() {
@@ -10,7 +10,7 @@
return;
var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
var disqus_shortname = "{{ .Site.DisqusShortname }}";
var disqus_shortname = "{{ .Site.Params.disqus.shortname }}";
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
})();
@@ -92,4 +92,4 @@
data-numposts="{{ .Site.Params.facebook.numPosts }}"
></div>
{{- end -}}
{{- end }}
{{- end }}

View File

@@ -40,17 +40,17 @@
{{ partial "seo.html" . -}}
{{ $res := resources.Get "css/style.scss" | resources.ToCSS | resources.Minify -}}
{{ $res := resources.Get "css/style.scss" | toCSS | minify -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.fontawesome_free_css -}}
{{ .Site.Params.cdn.fontawesome_free_css | safeHTML }}
{{ else -}}
{{ $res := resources.Get "css/lib/fontawesome-free/all.min.css" | resources.Minify -}}
{{ $res = resources.Get "css/lib/fontawesome-free/all.min.css" | minify -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{ end }}
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.animate_css -}}
{{ .Site.Params.cdn.animate_css | safeHTML }}
{{ else -}}
{{ $res := resources.Get "css/lib/animate/animate.min.css" | resources.Minify -}}
{{ $res = resources.Get "css/lib/animate/animate.min.css" | minify -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{ end }}
{{ end }}

View File

@@ -7,7 +7,7 @@
{{ $author = .Site.Author.name }}
{{ end }}
<article class="post-warp">
<article class="warpper">
<h1 class="post-title animated flipInX">{{ .Title }}</h1>
<div class="post-meta">
@@ -39,7 +39,8 @@
{{ with .Params.featured_image }}
<div class="post-featured-image">
<img src=/images/loading.svg data-sizes=auto data-src={{ . }} alt="featured image" class="lazyload">
{{ $res := resources.Get "svg/loading.svg" | minify }}
<img src="{{ $res.RelPermalink }}" data-sizes="auto" data-src="{{ . }}" alt="featured image" class="lazyload">
</div>
{{ end }}
@@ -65,14 +66,8 @@
<div class="post-content">
{{ $content := .Content }}
{{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
{{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `:\(([\w- ]+?)\):` }}
{{ $REout = `<i class="$1 fa-fw"></i>` }}
{{ $REin := `:\(([\w- ]+?)\):` }}
{{ $REout := `<i class="$1 fa-fw"></i>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
@@ -80,15 +75,12 @@
{{ $REin = `<sup>\[return\]</sup>` }}
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(h[123456]) (id=".+?")>` }}
{{ $REin = `<(h[23456]) (id=".+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
{{ $REin = `<(.+) (id="fnref:.+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(li) (id="fn:.+?")>` }}
{{ $REout = `<$1><a class="post-dummy-target" $2></a>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $content | safeHTML }}
</div>

View File

@@ -1,34 +1,62 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ with .Title }}in {{ . }} {{ end }}on {{ .Site.Title }}</description>
<title>
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
</title>
<link>
{{- .Permalink -}}
</link>
<description>
{{- with .Title }}{{ . }} | {{ end }}{{ .Site.Title -}}
</description>
<generator>Hugo -- gohugo.io</generator>
{{ with .Site.LanguageCode }}
<language>{{ . }}</language>
{{ end }}
{{ with .Site.Author.email }}
<managingEditor>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</managingEditor>
<webMaster>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</webMaster>
{{ end }}
{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>
{{ end }}
{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{ end }}
{{- with .Site.LanguageCode -}}
<language>
{{- . -}}
</language>
{{- end -}}
{{- with .Site.Author.email -}}
<managingEditor>
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
</managingEditor>
<webMaster>
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
</webMaster>
{{- end -}}
{{- with .Site.Copyright -}}
<copyright>
{{- . -}}
</copyright>
{{- end -}}
{{- if not .Date.IsZero -}}
<lastBuildDate>
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
</lastBuildDate>
{{- end -}}
<atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
{{ range first 15 (where .Data.Pages "Type" "!=" "home") }}
{{- range first 15 (where .Data.Pages "Type" "!=" "home") -}}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}
<author>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</author>
{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
<title>
{{- .Title -}}
</title>
<link>
{{- .Permalink -}}
</link>
<pubDate>
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
</pubDate>
{{- with .Site.Author.email -}}
<author>
{{- . }}{{ with .Site.Author.name }} ({{ . }}){{ end -}}
</author>
{{- end -}}
<guid>
{{- .Permalink -}}
</guid>
<description>
{{- .Content | html -}}
</description>
</item>
{{ end }}
{{- end -}}
</channel>
</rss>
</rss>

View File

@@ -20,7 +20,7 @@
<!-- fix "<br />" location error which is a bug of Typeit HTML parser -->
{{ $content = replaceRE `<br /></span>` "</span><br />" $content }}
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
<div class="code" id={{ $id }}></div>
<div class="highlight" id={{ $id }}></div>
{{ else }}
{{ $tag := .Get "tag" | default "p" }}
{{ $content = $content | markdownify | chomp }}

View File

@@ -1,22 +1,41 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range (where .Data.Pages "Section" "!=" "gallery") }}
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
>
{{- range (where .Data.Pages "Section" "!=" "gallery") -}}
<url>
<loc>{{ .Permalink }}</loc>
{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>
{{ end }}
{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>
{{ end }}
{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>
{{ end }}
{{ if .IsTranslated }}
{{ range .Translations }}
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>
{{ end }}
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>
{{ end }}
<loc>
{{- .Permalink -}}
</loc>
{{- if not .Lastmod.IsZero -}}
<lastmod>
{{- safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) -}}
</lastmod>
{{- end -}}
{{- with .Sitemap.ChangeFreq -}}
<changefreq>
{{- . -}}
</changefreq>
{{- end -}}
{{- if ge .Sitemap.Priority 0.0 -}}
<priority>
{{- .Sitemap.Priority -}}
</priority>
{{- end -}}
{{- if .IsTranslated -}}
{{- range .Translations -}}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>
{{- end -}}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>
{{- end -}}
</url>
{{ end }}
</urlset>
{{- end -}}
</urlset>

View File

@@ -1,7 +1,7 @@
{{ define "title" }}{{ .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title }}{{ end }}
{{ define "content" }}
<div class="post-warp archive">
<div class="warpper archive">
<h2 class="post-title animated pulse faster">
{{ $taxonomy := .Data.Singular }}
{{ if eq $taxonomy "category" }}

View File

@@ -5,7 +5,7 @@
{{ $terms := .Data.Terms.ByCount }}
{{ $type := .Type }}
<div class="post-warp archive">
<div class="warpper archive">
<h2 class="post-title animated pulse faster">
{{ T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize }}
</h2>