fixed hugo depricated issues

This commit is contained in:
somrat 2019-06-15 11:48:38 +06:00
parent 24fcdf79d6
commit 3f41c9d0b9
5 changed files with 36 additions and 36 deletions

View file

@ -1,5 +1,5 @@
baseURL = "gethugothemes.com" baseURL = "gethugothemes.com"
theme = "dot" theme = "dot-hugo-documentation-theme"
[params] [params]
@ -28,41 +28,41 @@ whiteColor = "#ffffff"
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
weight = 2 weight = 2
name = "Faq" name = "Faq"
url = "/faq" url = "faq"
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
weight = 2 weight = 2
name = "contact" name = "contact"
url = "/contact" url = "contact"
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
weight = 2 weight = 2
name = "pages" name = "pages"
url = "/pages" url = "pages"
hasChildren = true hasChildren = true
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
parent = "pages" parent = "pages"
name = "Elements" name = "Elements"
URL = "/elements" url = "elements"
weight = 1 weight = 1
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
parent = "pages" parent = "pages"
name = "Installation" name = "Installation"
URL = "/installation" url = "installation"
weight = 2 weight = 2
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
parent = "pages" parent = "pages"
name = "Billing and Pricing" name = "Billing and Pricing"
URL = "/billing-pricing" url = "billing-pricing"
weight = 3 weight = 3
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
parent = "pages" parent = "pages"
name = "Features" name = "Features"
URL = "/features" url = "features"
weight = 4 weight = 4
@ -85,7 +85,7 @@ whiteColor = "#ffffff"
title = "Didn't find an answer to your question?" title = "Didn't find an answer to your question?"
description = "Musce libero nunc, dignissim quis turpis quis, semper vehicula dolor. Suspendisse tincidunt consequat quam." description = "Musce libero nunc, dignissim quis turpis quis, semper vehicula dolor. Suspendisse tincidunt consequat quam."
btnText = "contact us" btnText = "contact us"
btnURL = "/contact" btnURL = "contact"
# contact # contact
[Languages.en.params.contact] [Languages.en.params.contact]
@ -95,19 +95,19 @@ whiteColor = "#ffffff"
# footer social icon # footer social icon
[[Languages.en.socialIcon]] [[Languages.en.socialIcon]]
icon = "ti-facebook" icon = "ti-facebook"
URL = "/#" linkURL = "#"
[[Languages.en.socialIcon]] [[Languages.en.socialIcon]]
icon = "ti-twitter-alt" icon = "ti-twitter-alt"
URL = "/#" linkURL = "#"
[[Languages.en.socialIcon]] [[Languages.en.socialIcon]]
icon = "ti-vimeo-alt" icon = "ti-vimeo-alt"
URL = "/#" linkURL = "#"
[[Languages.en.socialIcon]] [[Languages.en.socialIcon]]
icon = "ti-instagram" icon = "ti-instagram"
URL = "/#" linkURL = "#"
@ -130,12 +130,12 @@ whiteColor = "#ffffff"
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
weight = 2 weight = 2
name = "Faq" name = "Faq"
url = "/fr/faq" url = "fr/faq"
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
weight = 2 weight = 2
name = "contact" name = "contact"
url = "/fr/contact" url = "fr/contact"
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
weight = 2 weight = 2
@ -145,25 +145,25 @@ whiteColor = "#ffffff"
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
parent = "pages" parent = "pages"
name = "Elements" name = "Elements"
URL = "/elements" url = "elements"
weight = 1 weight = 1
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
parent = "les sujets" parent = "les sujets"
name = "Commencer" name = "Commencer"
URL = "/fr/installation" url = "fr/installation"
weight = 2 weight = 2
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
parent = "les sujets" parent = "les sujets"
name = "Compte et facturation" name = "Compte et facturation"
URL = "/fr/billing-pricing" url = "fr/billing-pricing"
weight = 3 weight = 3
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
parent = "les sujets" parent = "les sujets"
name = "Dépannage" name = "Dépannage"
URL = "/fr/features" url = "fr/features"
weight = 4 weight = 4
# banner # banner
@ -193,16 +193,16 @@ whiteColor = "#ffffff"
# footer social icon # footer social icon
[[Languages.fr.socialIcon]] [[Languages.fr.socialIcon]]
icon = "ti-facebook" icon = "ti-facebook"
URL = "/#" linkURL = "#"
[[Languages.fr.socialIcon]] [[Languages.fr.socialIcon]]
icon = "ti-twitter-alt" icon = "ti-twitter-alt"
URL = "/#" linkURL = "#"
[[Languages.fr.socialIcon]] [[Languages.fr.socialIcon]]
icon = "ti-vimeo-alt" icon = "ti-vimeo-alt"
URL = "/#" linkURL = "#"
[[Languages.fr.socialIcon]] [[Languages.fr.socialIcon]]
icon = "ti-instagram" icon = "ti-instagram"
URL = "/#" linkURL = "#"

View file

@ -29,7 +29,7 @@
{{ if in .Site.Params.menu_exclusion .Section }} {{ if in .Site.Params.menu_exclusion .Section }}
{{- else -}} {{- else -}}
{{- safeHTML .Params.head -}} {{- safeHTML .Params.head -}}
<li class="{{ if .IsAncestor $currentNode }}parent d-block {{ end }}{{ if eq .UniqueID $currentNode.UniqueID }} active {{ end }}{{ if .Params.alwaysopen }} parent {{ end }}"><a href="{{ .URL }}">{{ .Title }}</a> <li class="{{ if .IsAncestor $currentNode }}parent d-block {{ end }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }} active {{ end }}{{ if .Params.alwaysopen }} parent {{ end }}"><a href="{{ .Permalink }}">{{ .Title }}</a>
{{- $numberOfPages := (add (len .Pages) (len .Sections)) -}} {{- $numberOfPages := (add (len .Pages) (len .Sections)) -}}
{{if ne $numberOfPages 0}} {{if ne $numberOfPages 0}}
<ul class="{{ if .IsAncestor $currentNode }}sub-menu{{ end }}"> <ul class="{{ if .IsAncestor $currentNode }}sub-menu{{ end }}">
@ -44,7 +44,7 @@
{{- end -}} {{- end -}}
{{- else -}} {{- else -}}
{{- if not .Params.Hidden -}} {{- if not .Params.Hidden -}}
<li class="{{ if eq .UniqueID $currentNode.UniqueID }}active{{ end }}"><a href="{{ .URL }}">{{ .Title }}</a></li> <li class="{{ if eq .File.UniqueID $currentNode.File.UniqueID }}active{{ end }}"><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{- end -}} {{- end -}}
{{ end -}} {{ end -}}
{{ end }} {{ end }}
@ -59,10 +59,10 @@
<nav class="pagination mt-3"> <nav class="pagination mt-3">
{{- template "pagination" dict "menu" .Site.Home "currentnode" $currentNode "menu_exclusion" .Site.Params.menu_exclusion -}} {{- template "pagination" dict "menu" .Site.Home "currentnode" $currentNode "menu_exclusion" .Site.Params.menu_exclusion -}}
{{- with ($.Scratch.Get "prevPage") -}} {{- with ($.Scratch.Get "prevPage") -}}
<a class="nav nav-prev" href="{{ .URL }}" title="{{ .Title }}"><i class="ti-arrow-left mr-2"></i>{{ .Title }}</a> <a class="nav nav-prev" href="{{ .Permalink }}" title="{{ .Title }}"><i class="ti-arrow-left mr-2"></i>{{ .Title }}</a>
{{ end -}} {{ end -}}
{{- with ($.Scratch.Get "nextPage") -}} {{- with ($.Scratch.Get "nextPage") -}}
<a class="nav nav-next" href="{{ .URL }}" title="{{ .Title }}">{{ .Title }}<i class="ti-arrow-right ml-2"></i></a> <a class="nav nav-next" href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}<i class="ti-arrow-right ml-2"></i></a>
{{- end }} {{- end }}
</nav> </nav>
@ -70,7 +70,7 @@
{{- $currentNode := .currentnode -}} {{- $currentNode := .currentnode -}}
{{- $menu_exclusion := .menu_exclusion -}} {{- $menu_exclusion := .menu_exclusion -}}
{{- if hasPrefix $currentNode.URL .menu.URL -}} {{- if hasPrefix $currentNode.Permalink .menu.Permalink -}}
{{- $currentNode.Scratch.Set "NextPageOK" "OK" -}} {{- $currentNode.Scratch.Set "NextPageOK" "OK" -}}
{{- if .menu.IsHome -}} {{- if .menu.IsHome -}}
{{- $currentNode.Scratch.Set "prevPage" "" -}} {{- $currentNode.Scratch.Set "prevPage" "" -}}

View file

@ -2,10 +2,10 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 text-center mx-auto"> <div class="col-lg-8 text-center mx-auto">
{{ with .Site.Params.banner.title }} <h1 class="text-white mb-3">{{ . }}</h1> {{ end }} <h1 class="text-white mb-3">{{ .Site.Params.banner.title }}</h1>
{{ with .Site.Params.banner.description }} <p class="text-white mb-4">{{ . }}</p> {{ end }} <p class="text-white mb-4">{{ .Site.Params.banner.description }}</p>
<div class="position-relative"> <div class="position-relative">
{{ with .Site.Params.banner.placeholder }} <input id="search" class="form-control" placeholder="{{ . }}"> {{ end }} <input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}">
<!-- Javascript --> <!-- Javascript -->
<script> <script>
$(function() { $(function() {

View file

@ -8,7 +8,7 @@
<div class="col-md-4 text-md-right text-center"> <div class="col-md-4 text-md-right text-center">
<ul class="list-inline mb-3"> <ul class="list-inline mb-3">
{{ range .Site.Params.socialIcon }} {{ range .Site.Params.socialIcon }}
<li class="list-inline-item"><a class="text-color d-inline-block p-2" href="{{ .URL | absURL}}"><i class="{{ .icon }}"></i></a></li> <li class="list-inline-item"><a class="text-color d-inline-block p-2" href="{{ .linkURL }}"><i class="{{ .icon }}"></i></a></li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>

View file

@ -1,5 +1,5 @@
<nav class="navbar navbar-expand-lg navbar-light"> <nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">{{ .Site.Params.logo }}</a> <a class="navbar-brand" href="{{ .Site.BaseURL }}{{ .Language.LanguageName | lower }}">{{ .Site.Params.logo }}</a>
<button class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navigation" <button class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navigation"
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation"> aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@ -8,7 +8,7 @@
<div class="collapse navbar-collapse text-center" id="navigation"> <div class="collapse navbar-collapse text-center" id="navigation">
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}">{{ .Site.Params.home }}</a> <a class="nav-link text-dark" href="{{ .Site.BaseURL }}{{ .Language.LanguageName | lower }}">{{ .Site.Params.home }}</a>
</li> </li>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if .HasChildren }} {{ if .HasChildren }}
@ -19,13 +19,13 @@
</a> </a>
<div class="dropdown-menu" > <div class="dropdown-menu" >
{{ range .Children }} {{ range .Children }}
<a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a> <a class="dropdown-item" href="{{ .URL | absURL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</div> </div>
</li> </li>
{{ else }} {{ else }}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link text-dark" href="{{ .URL }}">{{ .Name }}</a> <a class="nav-link text-dark" href="{{ .URL | absURL }}">{{ .Name }}</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}