diff options
author | Huabing Zhao <zhaohuabing@gmail.com> | 2019-07-26 11:29:59 +0300 |
---|---|---|
committer | Huabing Zhao <zhaohuabing@gmail.com> | 2019-07-26 11:30:07 +0300 |
commit | ef2aef8d68829295a6f3f80f06b71d40cc809bba (patch) | |
tree | 9d555e4aa03cca5d98780da10db62bdba50f1211 | |
parent | c93ea6d2cfaf41f76bb49510c55643ea984e8990 (diff) |
Remove warning messages
Solve issue https://github.com/zhaohuabing/hugo-theme-cleanwhite/issues/55
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
-rw-r--r-- | layouts/_default/section.html | 59 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 2 | ||||
-rw-r--r-- | layouts/taxonomy/terms.html | 59 |
4 files changed, 120 insertions, 2 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..8fd7c68 --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,59 @@ +{{ define "main" }} +<!-- Post Content --> +<article> + <div class="container"> + <div class="row"> + <!-- Post Container --> + <div class=" + col-lg-8 col-lg-offset-2 + col-md-10 col-md-offset-1 + post-container"> + + {{ .Content }} + {{ partial "comments.html" . }} + + </div> + <!-- Sidebar Container --> + <div class=" + col-lg-8 col-lg-offset-2 + col-md-10 col-md-offset-1 + sidebar-container"> + + <!-- Featured Tags --> + {{ if .Site.Params.featured_tags }} + <section> + <hr class="hidden-sm hidden-xs"> + <h5><a href="/tags/">FEATURED TAGS</a></h5> + <div class="tags"> + {{ $featured_condition_size := .Site.Params.featured_condition_size }} + {{ range $name, $taxonomy := .Site.Taxonomies.tags }} + {{ if gt (len $taxonomy.Pages) $featured_condition_size }} + <a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}"> + {{ $name }} + </a> + {{ end }} + {{ end }} + </div> + </section> + {{ end }} + + <!-- Friends Blog --> + {{ if .Site.Params.friends }} + <section> + <hr> + <h5>FRIENDS</h5> + <ul class="list-inline"> + {{ range .Site.Params.friend_link }} + <li><a target="_blank" href="{{.href}}">{{.title}}</a></li> + {{ end }} + </ul> + </section> + {{ end }} + </div> + </div> + </div> +</article> + +{{ end }} + + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1f32147..e736f6f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,7 +6,7 @@ <ul class="list-inline text-center"> {{ if .Site.Params.social.rss }} <li> - <a href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title | default "" }}" > + <a href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}' rel="alternate" type="application/rss+xml" title="{{ .Site.Title | default "" }}" > <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-rss fa-stack-1x fa-inverse"></i> diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index f7a4846..5758a5f 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -42,7 +42,7 @@ <ul class="list-inline"> {{ if .Site.Params.social.rss }} <li> - <a href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title | default "" }}" > + <a href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}' rel="alternate" type="application/rss+xml" title="{{ .Site.Title | default "" }}" > <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-rss fa-stack-1x fa-inverse"></i> diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html new file mode 100644 index 0000000..8fd7c68 --- /dev/null +++ b/layouts/taxonomy/terms.html @@ -0,0 +1,59 @@ +{{ define "main" }} +<!-- Post Content --> +<article> + <div class="container"> + <div class="row"> + <!-- Post Container --> + <div class=" + col-lg-8 col-lg-offset-2 + col-md-10 col-md-offset-1 + post-container"> + + {{ .Content }} + {{ partial "comments.html" . }} + + </div> + <!-- Sidebar Container --> + <div class=" + col-lg-8 col-lg-offset-2 + col-md-10 col-md-offset-1 + sidebar-container"> + + <!-- Featured Tags --> + {{ if .Site.Params.featured_tags }} + <section> + <hr class="hidden-sm hidden-xs"> + <h5><a href="/tags/">FEATURED TAGS</a></h5> + <div class="tags"> + {{ $featured_condition_size := .Site.Params.featured_condition_size }} + {{ range $name, $taxonomy := .Site.Taxonomies.tags }} + {{ if gt (len $taxonomy.Pages) $featured_condition_size }} + <a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}"> + {{ $name }} + </a> + {{ end }} + {{ end }} + </div> + </section> + {{ end }} + + <!-- Friends Blog --> + {{ if .Site.Params.friends }} + <section> + <hr> + <h5>FRIENDS</h5> + <ul class="list-inline"> + {{ range .Site.Params.friend_link }} + <li><a target="_blank" href="{{.href}}">{{.title}}</a></li> + {{ end }} + </ul> + </section> + {{ end }} + </div> + </div> + </div> +</article> + +{{ end }} + + |