mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-17 09:47:05 +01:00
layouts: retab after addition of modelines
Done in vim using `gg=G` and then `:retab`.
This commit is contained in:
parent
663f3db2a0
commit
b52fac69b1
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Lang }}">
|
||||
|
||||
<head>
|
||||
<head>
|
||||
{{ partial "head-meta.html" . }}
|
||||
|
||||
<base href="{{ .Site.BaseURL }}">
|
||||
@ -27,61 +27,61 @@
|
||||
{{ partial "head-custom.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
|
||||
<div class="blog-masthead">
|
||||
<div class="container">
|
||||
<nav class="nav blog-nav">
|
||||
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
|
||||
{{ if .Site.Params.custom_navbar }}
|
||||
<div class="blog-masthead">
|
||||
<div class="container">
|
||||
<nav class="nav blog-nav">
|
||||
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
|
||||
{{ if .Site.Params.custom_navbar }}
|
||||
{{ range .Site.Menus.navbar }}
|
||||
<a class="nav-link" href="{{.URL | absURL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ else }}
|
||||
{{ range where .Site.Pages "Type" "!=" "post" }}
|
||||
<a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</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">
|
||||
<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="row">
|
||||
<div class="col-sm-8 blog-main">
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 blog-main">
|
||||
{{ block "main" . }}
|
||||
<!-- The part of the page that begins to differ between templates -->
|
||||
{{ end }}
|
||||
|
||||
{{ block "main" . }}
|
||||
<!-- The part of the page that begins to differ between templates -->
|
||||
{{ end }}
|
||||
</div> {{ "<!-- /.blog-main -->" | safeHTML }}
|
||||
|
||||
</div> {{ "<!-- /.blog-main -->" | safeHTML }}
|
||||
{{ partial "sidebar.html" . }}
|
||||
|
||||
{{ partial "sidebar.html" . }}
|
||||
</div> {{ "<!-- /.row -->" | safeHTML }}
|
||||
</div> {{ "<!-- /.container -->" | safeHTML }}
|
||||
|
||||
</div> {{ "<!-- /.row -->" | safeHTML }}
|
||||
</div> {{ "<!-- /.container -->" | safeHTML }}
|
||||
|
||||
<footer class="blog-footer">
|
||||
<p>
|
||||
<footer class="blog-footer">
|
||||
<p>
|
||||
{{ if .Site.Copyright }}
|
||||
{{ .Site.Copyright | markdownify }}
|
||||
{{ 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>.
|
||||
{{ end }}
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<a href="#">Back to top</a>
|
||||
</p>
|
||||
</footer>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<nav class="blog-pagination">
|
||||
{{ 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.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>
|
||||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<nav class="blog-pagination">
|
||||
{{ 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.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 }}
|
||||
|
||||
|
@ -2,31 +2,31 @@
|
||||
{{ define "main" }}
|
||||
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
|
||||
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<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>
|
||||
</header>
|
||||
{{ .Content }}
|
||||
<article class="blog-post">
|
||||
<header>
|
||||
<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>
|
||||
</header>
|
||||
{{ .Content }}
|
||||
|
||||
{{ if .IsTranslated }}
|
||||
<h4>{{ i18n "translations" }}</h4>
|
||||
<ul>
|
||||
{{ range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if not .Site.Params.sharingicons.hide }}
|
||||
{{ partial "sharing-icons.html" . }}
|
||||
{{ end }}
|
||||
</article> <!-- /.blog-post -->
|
||||
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ if .IsTranslated }}
|
||||
<h4>{{ i18n "translations" }}</h4>
|
||||
<ul>
|
||||
{{ range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if not .Site.Params.sharingicons.hide }}
|
||||
{{ partial "sharing-icons.html" . }}
|
||||
{{ end }}
|
||||
</article> <!-- /.blog-post -->
|
||||
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
@ -3,24 +3,24 @@
|
||||
|
||||
<script>
|
||||
window.addEventListener("load", function(){
|
||||
window.cookieconsent.initialise({
|
||||
"palette": {
|
||||
"popup": {
|
||||
"background": "#428bca",
|
||||
"text": "#ffffff"
|
||||
window.cookieconsent.initialise({
|
||||
"palette": {
|
||||
"popup": {
|
||||
"background": "#428bca",
|
||||
"text": "#ffffff"
|
||||
},
|
||||
"button": {
|
||||
"background": "#f71559"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"background": "#f71559"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"message": '{{ i18n "cookieMessage" }}',
|
||||
"dismiss": '{{ i18n "cookieDismiss" }}',
|
||||
"link": '{{ i18n "cookieLink" }}',
|
||||
"href": "{{ .Site.Params.cookie_consent_info_url | absURL}}"
|
||||
},
|
||||
"position": "bottom-right"
|
||||
})});
|
||||
"content": {
|
||||
"message": '{{ i18n "cookieMessage" }}',
|
||||
"dismiss": '{{ i18n "cookieDismiss" }}',
|
||||
"link": '{{ i18n "cookieLink" }}',
|
||||
"href": "{{ .Site.Params.cookie_consent_info_url | absURL}}"
|
||||
},
|
||||
"position": "bottom-right"
|
||||
})});
|
||||
</script>
|
||||
|
||||
{{- /* vim: set ts=2 sw=2 et: */}}
|
||||
|
@ -2,15 +2,15 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<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 }}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<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 }}
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/schema.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/schema.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
{{ if .Site.Params.google_verify_meta }}
|
||||
<meta name="google-site-verification" content="{{ .Site.Params.google_verify_meta }}" />
|
||||
{{ end }}
|
||||
{{ if .Site.Params.google_verify_meta }}
|
||||
<meta name="google-site-verification" content="{{ .Site.Params.google_verify_meta }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.bing_verify_meta }}
|
||||
<meta name="msvalidate.01" content="{{ .Site.Params.bing_verify_meta }}" />
|
||||
{{ end }}
|
||||
{{ if .Site.Params.bing_verify_meta }}
|
||||
<meta name="msvalidate.01" content="{{ .Site.Params.bing_verify_meta }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.yandex_verify_meta }}
|
||||
<meta name="yandex-verification" content="{{ .Site.Params.yandex_verify_meta }}" />
|
||||
{{ end }}
|
||||
{{ if .Site.Params.yandex_verify_meta }}
|
||||
<meta name="yandex-verification" content="{{ .Site.Params.yandex_verify_meta }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ .Hugo.Generator }}
|
||||
{{ .Hugo.Generator }}
|
||||
|
||||
{{- /* vim: set ts=2 sw=2 et: */}}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{{ if .Params.categories }}
|
||||
<i class="fa fa-folder" aria-hidden="true"></i> {{ 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> {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" rel="category tag">{{ . }}</a>{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
<i class="fa fa-tag" aria-hidden="true"></i> {{ 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> {{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}, {{ end }}<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" rel="tag">{{ . }}</a>{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- /* vim: set ts=2 sw=2 et: */}}
|
||||
|
@ -1,14 +1,14 @@
|
||||
<hr>
|
||||
<footer>
|
||||
<header>
|
||||
<h4>{{ i18n "share" }}</h4>
|
||||
</header>
|
||||
<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.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&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 }}
|
||||
</nav>
|
||||
</footer>
|
||||
<hr>
|
||||
<footer>
|
||||
<header>
|
||||
<h4>{{ i18n "share" }}</h4>
|
||||
</header>
|
||||
<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.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&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 }}
|
||||
</nav>
|
||||
</footer>
|
||||
|
||||
{{- /* vim: set ts=2 sw=2 et: */}}
|
||||
|
Loading…
Reference in New Issue
Block a user