diff options
author | Chen Xianmin <xianmin12@gmail.com> | 2018-10-23 13:24:40 +0300 |
---|---|---|
committer | Chen Xianmin <xianmin12@gmail.com> | 2018-10-23 13:24:40 +0300 |
commit | 335d0c2f69149f63a0a7db0252a0628ac5a0c4a1 (patch) | |
tree | 615f3140fbf9d65ee9846c2320855c57e02b95c2 | |
parent | 0624cbba3d682c99eab32de4cbddad44d59d59ea (diff) |
fix: use <time> tag
close #97
-rw-r--r-- | layouts/_default/section.html | 6 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 | ||||
-rw-r--r-- | layouts/_default/taxonomy.html | 6 | ||||
-rw-r--r-- | layouts/_default/terms.html | 8 | ||||
-rw-r--r-- | layouts/post/single.html | 4 | ||||
-rw-r--r-- | layouts/post/summary.html | 4 |
6 files changed, 18 insertions, 14 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html index fea62a4..13dd787 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -22,9 +22,9 @@ {{- end }} <div class="archive-post"> - <span class="archive-post-time"> + <time datetime="{{ .Date.Format "2006-01-02" }}" class="archive-post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} - </span> + </time> <span class="archive-post-title"> <a href="{{ $element.URL }}" class="archive-post-link"> {{ .Title }} @@ -37,4 +37,4 @@ <!-- pagination --> {{ partial "pagination.html" . }} -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a4adc38..db98bd8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,9 +5,9 @@ <h1 class="post-title">{{ .Title }}</h1> {{ partial "post/i18nlist.html" . }} <div class="post-meta"> - <span class="post-time"> + <time datetime="{{ .Date.Format "2006-01-02" }}" class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} - </span> + </time> </div> </header> diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 70b8094..4ce0588 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -17,9 +17,9 @@ {{ range $paginator.Pages }} <div class="archive-post"> - <span class="archive-post-time"> + <time datetime="{{ .Date.Format "2006-01-02" }}" class="archive-post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} - </span> + </time> <span class="archive-post-title"> <a href="{{ .URL }}" class="archive-post-link"> {{ .Title }} @@ -32,4 +32,4 @@ <!-- pagination --> {{ partial "pagination.html" . }} -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index dcd13d0..dc20c58 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -25,9 +25,9 @@ {{ range first 5 $pages }} <div class="archive-post"> - <span class="archive-post-time"> + <time datetime="{{ .Date.Format "2006-01-02" }}" class="archive-post-time"> {{ .Date.Format "2006-01-02" }} - </span> + </time> <span class="archive-post-title"> <a href="{{ .URL }}" class="archive-post-link"> {{ .Title }} @@ -67,8 +67,8 @@ {{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }} {{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }} {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $tagName) }} - <!--Current font size: {{$currentFontSize}}--> - <a href="{{ .Permalink }}" + <!--Current font size: {{$currentFontSize}}--> + <a href="{{ .Permalink }}" style="font-size:{{$currentFontSize}}{{$fontUnit}}">{{ $tagName }}</a> {{ end }} {{ end }} diff --git a/layouts/post/single.html b/layouts/post/single.html index 1e5c6c9..c6d5a37 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -6,7 +6,9 @@ <h1 class="post-title">{{ .Title }}</h1> {{ partial "post/i18nlist.html" . }} <div class="post-meta"> - <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> + <time datetime="{{ .Date.Format "2006-01-02" }}" class="post-time"> + {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} + </time> {{ with .Params.categories -}} <div class="post-category"> {{ range . }} diff --git a/layouts/post/summary.html b/layouts/post/summary.html index bf64af5..f73804c 100644 --- a/layouts/post/summary.html +++ b/layouts/post/summary.html @@ -3,7 +3,9 @@ <h1 class="post-title"><a class="post-link" href="{{ .URL }}">{{ .Title }}</a></h1> {{ partial "post/i18nlist.html" . }} <div class="post-meta"> - <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> + <time datetime="{{ .Date.Format "2006-01-02" }}" class="post-time"> + {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} + </time> {{ with .Params.categories -}} <div class="post-category"> {{ range . }} |