Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zwbetz-gh/vanilla-bootstrap-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Betz <zwbetz@gmail.com>2019-01-16 01:09:44 +0300
committerZachary Betz <zwbetz@gmail.com>2019-01-16 01:09:44 +0300
commit5ab7bc751b278cff12aa7bf4a688a55d2ad50c68 (patch)
tree48939f6388fbc794283b3718eb163a65983432cc /layouts
parent67678904ece9a750c9bcb41631e114bf51c3683b (diff)
Refactor theme to use new Hugo v0.53 vars
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/terms.html2
-rw-r--r--layouts/index.html4
-rw-r--r--layouts/partials/date-and-tags.html2
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/google-analytics-async.html4
-rw-r--r--layouts/partials/head.html6
-rw-r--r--layouts/partials/nav.html4
-rw-r--r--layouts/partials/script.html2
-rw-r--r--layouts/partials/style.html2
9 files changed, 14 insertions, 14 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index db79fae..d95c218 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -6,7 +6,7 @@
{{ range $key, $value := .Data.Terms.ByCount }}
{{ $name := .Name }}
{{ $count := .Count }}
- {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
+ {{ with site.GetPage (printf "/%s/%s" $type $name) }}
<p>
<a class="btn btn-outline-dark font-125" href="{{ .Permalink }}">
<span class="badge badge-dark">{{ $count }}</span> {{ $name }}
diff --git a/layouts/index.html b/layouts/index.html
index 820e32e..4893b66 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,8 +1,8 @@
{{ define "main" }}
<div id="home-jumbotron" class="jumbotron text-center">
- <h1>{{ .Site.Title }}</h1>
- <p class="font-125">{{ .Site.Params.homeText | markdownify }}</p>
+ <h1>{{ site.Title }}</h1>
+ <p class="font-125">{{ site.Params.homeText | markdownify }}</p>
</div>
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/date-and-tags.html b/layouts/partials/date-and-tags.html
index 1d6b1c2..5adf746 100644
--- a/layouts/partials/date-and-tags.html
+++ b/layouts/partials/date-and-tags.html
@@ -1,5 +1,5 @@
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
-{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
+{{ $dateFormat := site.Params.dateFormat | default "Jan 2, 2006" }}
<i data-feather="calendar"></i> <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
{{ with .Params.tags }}
<br>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index df6a059..88d7bd7 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,5 +1,5 @@
<footer id="footer" class="mt-auto text-center text-muted">
<div class="container">
- {{ .Site.Params.footerText | markdownify }}
+ {{ site.Params.footerText | markdownify }}
</div>
</footer> \ No newline at end of file
diff --git a/layouts/partials/google-analytics-async.html b/layouts/partials/google-analytics-async.html
index ecc2767..1323909 100644
--- a/layouts/partials/google-analytics-async.html
+++ b/layouts/partials/google-analytics-async.html
@@ -1,5 +1,5 @@
-{{ if not .Site.IsServer }}
- {{ with .Site.GoogleAnalytics }}
+{{ if not site.IsServer }}
+ {{ with site.GoogleAnalytics }}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ . }}', 'auto');
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e0acf56..52878dc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,11 +1,11 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- {{ .Hugo.Generator }}
+ {{ hugo.Generator }}
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}">
- {{ $title := print .Title " | " .Site.Title }}
+ {{ $title := print .Title " | " site.Title }}
{{ if .IsHome }}
- {{ $title = .Site.Title }}
+ {{ $title = site.Title }}
{{ end }}
<title>{{ $title }}</title>
{{ partial "style.html" . }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 9ca3c7c..68deb99 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,8 +1,8 @@
<div id="nav-border" class="container">
<nav id="nav" class="nav justify-content-center">
- {{ $showActiveNav := .Site.Params.showActiveNav }}
+ {{ $showActiveNav := site.Params.showActiveNav }}
{{ $currentPage := . }}
- {{ range .Site.Menus.main }}
+ {{ range site.Menus.main }}
{{ $active := "" }}
{{ if eq $showActiveNav true }}
{{ $isMenu := or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
diff --git a/layouts/partials/script.html b/layouts/partials/script.html
index 58af2a4..89e74e5 100644
--- a/layouts/partials/script.html
+++ b/layouts/partials/script.html
@@ -3,7 +3,7 @@
feather.replace()
</script>
-{{ if eq .Site.Params.includeBootstrapJs true }}
+{{ if eq site.Params.includeBootstrapJs true }}
<script src="{{ "js/jquery-3.3.1.slim.min.js" | absURL }}"></script>
<script src="{{ "js/bootstrap.bundle.min.js" | absURL }}"></script>
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/style.html b/layouts/partials/style.html
index a892b2f..e094a5a 100644
--- a/layouts/partials/style.html
+++ b/layouts/partials/style.html
@@ -1,6 +1,6 @@
<style>
.container {
- max-width: {{ .Site.Params.containerMaxWidth | default "700px" | safeCSS }};
+ max-width: {{ site.Params.containerMaxWidth | default "700px" | safeCSS }};
}
#nav a {
font-weight: bold;