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/partials
parenta6f92dcc262bd37cd305f92e82a3af85d62bb392 (diff)
parentcd62f47de153fed203c9dc96dc304962c51ee4ef (diff)
Merge branch 'next_gen' of https://github.com/Hanzei/hugo-theme-introduction into Hanzei-next_gen
Diffstat (limited to 'layouts/partials')
-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
4 files changed, 12 insertions, 13 deletions
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 }}