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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicky <vicky@vickylai.com>2018-08-21 22:50:49 +0300
committerVicky <vicky@vickylai.com>2018-08-21 22:50:49 +0300
commitff59834c3fba0b7be1fd56b7899932c469e5b509 (patch)
tree593f09fda2f3c1a6bba11cef2fcfb753dce2cb21 /layouts
parenta6f92dcc262bd37cd305f92e82a3af85d62bb392 (diff)
parentcd62f47de153fed203c9dc96dc304962c51ee4ef (diff)
Merge branch 'next_gen' of https://github.com/Hanzei/hugo-theme-introduction into Hanzei-next_gen
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/terms.html2
-rw-r--r--layouts/index.html18
-rw-r--r--layouts/partials/footer/scripts.html4
-rw-r--r--layouts/partials/head/css.html6
-rw-r--r--layouts/partials/js/owlCarousel.html5
-rw-r--r--layouts/partials/nav.html10
7 files changed, 23 insertions, 24 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 0e3d569..0345ff8 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,7 +12,7 @@
{{ end }}
</head>
<body>
- <section class="section" id="top">
+ <section id="top" class="section">
<!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn | default true }} fade-in one {{ end }}">
{{ block "title" . }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 08760a0..c070bfe 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -2,7 +2,7 @@
<div class="container">
<div class="section tags-list">
{{- range $key, $value:= .Data.Terms -}}
- <a class="tag-cloud" href="{{ "/" | absLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">{{ $key }}&nbsp;({{ $value.Count }})</a>
+ <a class="tag-cloud" href="{{ "/" | absLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">{{ $key }}&nbsp;({{ $value.Count }})</a>
{{- end -}}
</div>
</div>
diff --git a/layouts/index.html b/layouts/index.html
index e192241..6bb259f 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -8,7 +8,7 @@
{{ partial "css/owlCarousel.html" . }}
</head>
<body>
- <div id="top">
+ <section id="top" class="section">
{{ with .Site.GetPage "/home" }}
<div class="hero is-{{ .Site.Params.home.introHeight | default "large" }}">
<!-- Super sweet Hero body title -->
@@ -73,9 +73,9 @@
{{ end }}
<!-- Now for some cool projects -->
{{ partial "home/projects.html" . }}
- <!-- Let's show some blog posts -->
+ <!-- Let`s show some blog posts -->
{{ partial "home/blog.html" . }}
- <!-- Let's chat, shall we? -->
+ <!-- Let`s chat, shall we? -->
{{ with .Resources.GetMatch "contact.md" }}
<div class="section" id="{{ .File.TranslationBaseName }}">
<div class="container has-text-centered">
@@ -84,7 +84,7 @@
{{ .Content }}
</div>
{{ if .Site.Params.home.localTime }}
- <p>{{ i18n "index_currentTime" . }} <span id='time'></span>.</p>
+ <p>{{ i18n "index_currentTime" . }} <span id="time"></span>.</p>
{{ end }}
{{ with .Site.Params.email }}
<h3 class="subtitle is-3 has-text-centered top-pad">
@@ -103,16 +103,16 @@
{{ partial "footer/text.html" . }}
</div>
- </div>
+ </section>
<!-- End of fade in three section -->
{{ partial "footer/scripts.html" . }}
{{ partial "js/owlCarousel.html" . }}
{{ if .Site.Params.home.localTime }}
- {{ $momentjs := resources.Get "vendor/momentjs/moment.min.js" }}
- {{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }}
- {{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
- {{ $initMomentjs := resources.Get "js/initMoment.js" | resources.ExecuteAsTemplate "js/initMoment.tmp.js" . }}
+ {{ $momentjs := resources.Get "/vendor/momentjs/moment.min.js" }}
+ {{ $momentTimezone := resources.Get "/vendor/momentjs/moment-timezone.min.js" }}
+ {{ $momentTimezoneWithData := resources.Get "/vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
+ {{ $initMomentjs := resources.Get "/js/initMoment.js" | resources.ExecuteAsTemplate "js/initMoment.tmp.js" . }}
{{ $bundleMoment := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "/js/bundleMoment.js" | fingerprint }}
<script src="{{ $bundleMoment.Permalink }}" integrity="{{ $bundleMoment.Data.Integrity }}"></script>
{{ end }}
diff --git a/layouts/partials/footer/scripts.html b/layouts/partials/footer/scripts.html
index e3533d4..77fa926 100644
--- a/layouts/partials/footer/scripts.html
+++ b/layouts/partials/footer/scripts.html
@@ -1,5 +1,5 @@
-{{ $jQuery := resources.Get "vendor/jquery/jquery-3.3.1.min.js" }}
-{{ $index := resources.Get "js/index.js" | minify }}
+{{ $jQuery := resources.Get "/vendor/jquery/jquery-3.3.1.min.js" }}
+{{ $index := resources.Get "/js/index.js" | minify }}
{{ $scripts := slice $jQuery $index | resources.Concat "/js/bundle.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html
index 0079b5f..0b3f461 100644
--- a/layouts/partials/head/css.html
+++ b/layouts/partials/head/css.html
@@ -1,11 +1,11 @@
-{{ $bundleRaw := resources.Get "sass/style.sass" | resources.ExecuteAsTemplate "style/main.tmp.css" . }}
+{{ $bundleRaw := resources.Get "/sass/style.sass" | resources.ExecuteAsTemplate "/css/main.tmp.css" . }}
{{ if .Site.IsServer }}
-{{ $cssOpts := (dict "targetPath" "styles/main.css" "enableSourceMap" true ) }}
+{{ $cssOpts := (dict "targetPath" "/css/main.css" "enableSourceMap" true ) }}
{{ $bundle := $bundleRaw | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $bundle.Permalink }}" media="screen">
{{ else }}
-{{ $cssOpts := (dict "targetPath" "styles/main.css" ) }}
+{{ $cssOpts := (dict "targetPath" "/css/main.css" ) }}
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
{{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
<link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" media="screen">
diff --git a/layouts/partials/js/owlCarousel.html b/layouts/partials/js/owlCarousel.html
index 34fb45e..5ffb506 100644
--- a/layouts/partials/js/owlCarousel.html
+++ b/layouts/partials/js/owlCarousel.html
@@ -1,5 +1,4 @@
-{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.js" }}
-{{ $initOwlCarousel := resources.Get "js/initOwlCarousel.js" | minify }}
+{{ $owlCarousel := resources.Get "/vendor/owlCarousel/owl.carousel.min.js" }}
+{{ $initOwlCarousel := resources.Get "/js/initOwlCarousel.js" | minify }}
{{ $bundleOwlCarousel := slice $owlCarousel $initOwlCarousel | resources.Concat "/js/bundleOwlCarousel.js" | fingerprint }}
-
<script src="{{ $bundleOwlCarousel.Permalink }}" integrity="{{ $bundleOwlCarousel.Data.Integrity }}"></script>
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index ba0f13e..60680cc 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -43,7 +43,7 @@
{{ with .Site.GetPage "/home" }}
{{ range sort (.Resources.ByType "page") "Params.weight" }}
{{ if ne .Name "contact.md" }}
- <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | absLangURL }}{{ end }}">{{ .Title }}</a>
+ <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | absLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}
{{ end }}
@@ -88,17 +88,17 @@
{{ with .Site.GetPage "/home" }}
{{ with .Resources.GetMatch "contact.md" }}
- <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | absLangURL }}{{ end }}">{{ .Title }}</a>
+ <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | absLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}
- {{ if gt (len $.Site.Home.AllTranslations.ByWeight) 1 }}
{{ range $.Site.Home.AllTranslations.ByWeight }}
- <a class="navbar-item" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
+ {{ if ne .Language.LanguageName $.Language.LanguageName }}
+ <a class="navbar-item" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
{{ end }}
{{ end }}
- {{ if and .Site.Params.showRSSButton .Site.RSSLink }}
+ {{ if and .Site.Params.showRSSButton .Site.RSSLink }}
<a class="navbar-item" href="{{ .Site.RSSLink }}"><i class="fas fa-rss"></i></a>
{{ end }}
{{ end }}