1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00

layouts: retab after addition of modelines

Done in vim using `gg=G` and then `:retab`.
This commit is contained in:
Alan Orth 2016-11-24 14:39:39 +02:00
parent 663f3db2a0
commit b52fac69b1
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
8 changed files with 132 additions and 132 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Lang }}"> <html lang="{{ .Lang }}">
<head> <head>
{{ partial "head-meta.html" . }} {{ partial "head-meta.html" . }}
<base href="{{ .Site.BaseURL }}"> <base href="{{ .Site.BaseURL }}">
@ -27,61 +27,61 @@
{{ partial "head-custom.html" . }} {{ partial "head-custom.html" . }}
</head> </head>
<body> <body>
<div class="blog-masthead"> <div class="blog-masthead">
<div class="container"> <div class="container">
<nav class="nav blog-nav"> <nav class="nav blog-nav">
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a> <a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
{{ if .Site.Params.custom_navbar }} {{ if .Site.Params.custom_navbar }}
{{ range .Site.Menus.navbar }} {{ range .Site.Menus.navbar }}
<a class="nav-link" href="{{.URL | absURL }}">{{ .Name }}</a> <a class="nav-link" href="{{.URL | absURL }}">{{ .Name }}</a>
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ range where .Site.Pages "Type" "!=" "post" }} {{ range where .Site.Pages "Type" "!=" "post" }}
<a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a> <a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}
</nav> </nav>
</div>
</div> </div>
</div>
<header class="blog-header"> <header class="blog-header">
<div class="container">
<h1 class="blog-title"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
{{ if .Site.Params.description }}<p class="lead blog-description">{{ .Site.Params.description | markdownify }}</p>{{ end }}
</div>
</header>
<div class="container"> <div class="container">
<h1 class="blog-title"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1> <div class="row">
{{ if .Site.Params.description }}<p class="lead blog-description">{{ .Site.Params.description | markdownify }}</p>{{ end }} <div class="col-sm-8 blog-main">
</div>
</header>
<div class="container"> {{ block "main" . }}
<div class="row"> <!-- The part of the page that begins to differ between templates -->
<div class="col-sm-8 blog-main"> {{ end }}
{{ block "main" . }} </div> {{ "<!-- /.blog-main -->" | safeHTML }}
<!-- The part of the page that begins to differ between templates -->
{{ end }}
</div> {{ "<!-- /.blog-main -->" | safeHTML }} {{ partial "sidebar.html" . }}
{{ partial "sidebar.html" . }} </div> {{ "<!-- /.row -->" | safeHTML }}
</div> {{ "<!-- /.container -->" | safeHTML }}
</div> {{ "<!-- /.row -->" | safeHTML }} <footer class="blog-footer">
</div> {{ "<!-- /.container -->" | safeHTML }} <p>
<footer class="blog-footer">
<p>
{{ if .Site.Copyright }} {{ if .Site.Copyright }}
{{ .Site.Copyright | markdownify }} {{ .Site.Copyright | markdownify }}
{{ else }} {{ else }}
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>. Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
{{ end }} {{ end }}
</p> </p>
<p> <p>
<a href="#">Back to top</a> <a href="#">Back to top</a>
</p> </p>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -1,26 +1,26 @@
{{ define "main" }} {{ define "main" }}
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ .Render "summary" }} {{ .Render "summary" }}
{{ end }} {{ end }}
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<nav class="blog-pagination"> <nav class="blog-pagination">
{{ if and (.Paginator.HasPrev) (.Paginator.HasNext) }} {{ if and (.Paginator.HasPrev) (.Paginator.HasNext) }}
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "paginatorPrevious" }}</a> <a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "paginatorPrevious" }}</a>
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "paginatorNext" }}</a> <a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "paginatorNext" }}</a>
{{ end }}
{{ if and (.Paginator.HasPrev) (not .Paginator.HasNext) }}
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "paginatorPrevious" }}</a>
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">{{ i18n "paginatorNext" }}</a>
{{ end }}
{{ if and (not .Paginator.HasPrev) (.Paginator.HasNext) }}
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">{{ i18n "paginatorPrevious" }}</a>
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "paginatorNext" }}</a>
{{ end }}
</nav>
{{ end }} {{ end }}
{{ if and (.Paginator.HasPrev) (not .Paginator.HasNext) }}
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "paginatorPrevious" }}</a>
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">{{ i18n "paginatorNext" }}</a>
{{ end }}
{{ if and (not .Paginator.HasPrev) (.Paginator.HasNext) }}
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">{{ i18n "paginatorPrevious" }}</a>
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "paginatorNext" }}</a>
{{ end }}
</nav>
{{ end }}
{{ end }} {{ end }}

View File

@ -2,31 +2,31 @@
{{ define "main" }} {{ define "main" }}
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }} {{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
<article class="blog-post"> <article class="blog-post">
<header> <header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2> <h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p> <p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
</header> </header>
{{ .Content }} {{ .Content }}
{{ if .IsTranslated }} {{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4> <h4>{{ i18n "translations" }}</h4>
<ul> <ul>
{{ range .Translations }} {{ range .Translations }}
<li> <li>
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end }}</a> <a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }}
{{ if not .Site.Params.sharingicons.hide }}
{{ partial "sharing-icons.html" . }}
{{ end }}
</article> <!-- /.blog-post -->
{{ if .Site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ end }} {{ end }}
{{ if not .Site.Params.sharingicons.hide }}
{{ partial "sharing-icons.html" . }}
{{ end }}
</article> <!-- /.blog-post -->
{{ if .Site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ end }}
{{ end }} {{ end }}

View File

@ -3,24 +3,24 @@
<script> <script>
window.addEventListener("load", function(){ window.addEventListener("load", function(){
window.cookieconsent.initialise({ window.cookieconsent.initialise({
"palette": { "palette": {
"popup": { "popup": {
"background": "#428bca", "background": "#428bca",
"text": "#ffffff" "text": "#ffffff"
},
"button": {
"background": "#f71559"
}
}, },
"button": { "content": {
"background": "#f71559" "message": '{{ i18n "cookieMessage" }}',
} "dismiss": '{{ i18n "cookieDismiss" }}',
}, "link": '{{ i18n "cookieLink" }}',
"content": { "href": "{{ .Site.Params.cookie_consent_info_url | absURL}}"
"message": '{{ i18n "cookieMessage" }}', },
"dismiss": '{{ i18n "cookieDismiss" }}', "position": "bottom-right"
"link": '{{ i18n "cookieLink" }}', })});
"href": "{{ .Site.Params.cookie_consent_info_url | absURL}}"
},
"position": "bottom-right"
})});
</script> </script>
{{- /* vim: set ts=2 sw=2 et: */}} {{- /* vim: set ts=2 sw=2 et: */}}

View File

@ -2,15 +2,15 @@
<script type="text/javascript"> <script type="text/javascript">
(function() { (function() {
// Don't ever inject Disqus on localhost--it creates unwanted // Don't ever inject Disqus on localhost--it creates unwanted
// discussions from 'localhost:1313' on your Disqus account... // discussions from 'localhost:1313' on your Disqus account...
if (window.location.hostname == "localhost") if (window.location.hostname == "localhost")
return; return;
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
var disqus_shortname = '{{ .Site.DisqusShortname }}'; var disqus_shortname = '{{ .Site.DisqusShortname }}';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})(); })();
</script> </script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

View File

@ -1,24 +1,24 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ "<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->" | safeHTML }} {{ "<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->" | safeHTML }}
{{ template "_internal/opengraph.html" . }} {{ template "_internal/opengraph.html" . }}
{{ template "_internal/schema.html" . }} {{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{ if .Site.Params.google_verify_meta }} {{ if .Site.Params.google_verify_meta }}
<meta name="google-site-verification" content="{{ .Site.Params.google_verify_meta }}" /> <meta name="google-site-verification" content="{{ .Site.Params.google_verify_meta }}" />
{{ end }} {{ end }}
{{ if .Site.Params.bing_verify_meta }} {{ if .Site.Params.bing_verify_meta }}
<meta name="msvalidate.01" content="{{ .Site.Params.bing_verify_meta }}" /> <meta name="msvalidate.01" content="{{ .Site.Params.bing_verify_meta }}" />
{{ end }} {{ end }}
{{ if .Site.Params.yandex_verify_meta }} {{ if .Site.Params.yandex_verify_meta }}
<meta name="yandex-verification" content="{{ .Site.Params.yandex_verify_meta }}" /> <meta name="yandex-verification" content="{{ .Site.Params.yandex_verify_meta }}" />
{{ end }} {{ end }}
{{ .Hugo.Generator }} {{ .Hugo.Generator }}
{{- /* vim: set ts=2 sw=2 et: */}} {{- /* vim: set ts=2 sw=2 et: */}}

View File

@ -1,8 +1,8 @@
{{ if .Params.categories }} {{ if .Params.categories }}
<i class="fa fa-folder" aria-hidden="true"></i>&nbsp;{{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" rel="category tag">{{ . }}</a>{{ end }} <i class="fa fa-folder" aria-hidden="true"></i>&nbsp;{{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" rel="category tag">{{ . }}</a>{{ end }}
{{ end }} {{ end }}
{{ if .Params.tags }} {{ if .Params.tags }}
<i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" rel="tag">{{ . }}</a>{{ end }} <i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" rel="tag">{{ . }}</a>{{ end }}
{{ end }} {{ end }}
{{- /* vim: set ts=2 sw=2 et: */}} {{- /* vim: set ts=2 sw=2 et: */}}

View File

@ -1,14 +1,14 @@
<hr> <hr>
<footer> <footer>
<header> <header>
<h4>{{ i18n "share" }}</h4> <h4>{{ i18n "share" }}</h4>
</header> </header>
<nav class="nav nav-inline"> <nav class="nav nav-inline">
{{ if not (eq .Site.Params.sharingicons.facebook false) }}<a class="nav-item" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" title="Share on Facebook"><span class="fa fa-facebook fa-2x" aria-hidden="true"></span></a>{{ end }} {{ if not (eq .Site.Params.sharingicons.facebook false) }}<a class="nav-item" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" title="Share on Facebook"><span class="fa fa-facebook fa-2x" aria-hidden="true"></span></a>{{ end }}
{{ if not (eq .Site.Params.sharingicons.googleplus false) }}<a class="nav-item" href="https://plus.google.com/share?url={{ .Permalink }}" title="Share on Google+"><span class="fa fa-google-plus fa-2x" aria-hidden="true"></span></a>{{ end }} {{ if not (eq .Site.Params.sharingicons.googleplus false) }}<a class="nav-item" href="https://plus.google.com/share?url={{ .Permalink }}" title="Share on Google+"><span class="fa fa-google-plus fa-2x" aria-hidden="true"></span></a>{{ end }}
{{ if not (eq .Site.Params.sharingicons.linkedin false) }}<a class="nav-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ .Permalink }}" title="Share on LinkedIn"><span class="fa fa-linkedin fa-2x" aria-hidden="true"></span></a>{{ end }} {{ if not (eq .Site.Params.sharingicons.linkedin false) }}<a class="nav-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ .Permalink }}" title="Share on LinkedIn"><span class="fa fa-linkedin fa-2x" aria-hidden="true"></span></a>{{ end }}
{{ if not (eq .Site.Params.sharingicons.twitter false) }}<a class="nav-item" href="https://twitter.com/home?status={{ .Permalink }}" title="Tweet this"><span class="fa fa-twitter fa-2x"></span></a>{{ end }} {{ if not (eq .Site.Params.sharingicons.twitter false) }}<a class="nav-item" href="https://twitter.com/home?status={{ .Permalink }}" title="Tweet this"><span class="fa fa-twitter fa-2x"></span></a>{{ end }}
</nav> </nav>
</footer> </footer>
{{- /* vim: set ts=2 sw=2 et: */}} {{- /* vim: set ts=2 sw=2 et: */}}