forked from TrueCloudLab/dot-hugo
modified search engine and some minor bug
This commit is contained in:
parent
fd82c626be
commit
ab258d9732
5 changed files with 51 additions and 57 deletions
|
@ -1,29 +1,55 @@
|
||||||
baseURL = "https://gethugothemes.com/"
|
################################# Default configuration ###################
|
||||||
|
# provide your domain here
|
||||||
|
baseURL = "https://examplesite.com/"
|
||||||
|
# theme
|
||||||
theme = "dot"
|
theme = "dot"
|
||||||
|
# site title
|
||||||
|
title = "Dot"
|
||||||
|
# disable language switch selection box
|
||||||
|
disableLanguageSwitchingButton = true
|
||||||
|
|
||||||
|
############################# Default Parameters ##########################
|
||||||
|
[params]
|
||||||
|
# logo is for all page
|
||||||
|
logo = ""
|
||||||
|
# logo white is for homepage logo, you can use colorful logo too...
|
||||||
|
logoWhite = ""
|
||||||
|
# when logo is empty, it will shown your site title
|
||||||
|
|
||||||
# customize color
|
# customize color
|
||||||
[params]
|
|
||||||
primaryColor = "#02007e"
|
primaryColor = "#02007e"
|
||||||
secondaryColor = "#f9f9f9"
|
secondaryColor = "#f9f9f9"
|
||||||
textColor = "#636363"
|
textColor = "#636363"
|
||||||
textColorDark = "#242738"
|
textColorDark = "#242738"
|
||||||
whiteColor = "#ffffff"
|
whiteColor = "#ffffff"
|
||||||
disableLanguageSwitchingButton = false
|
|
||||||
|
|
||||||
|
############################## social links ##############################
|
||||||
|
[[params.social]]
|
||||||
|
icon = "ti-facebook" # themify icon pack : https://themify.me/themify-icons
|
||||||
|
link = "#"
|
||||||
|
|
||||||
|
[[params.social]]
|
||||||
|
icon = "ti-twitter-alt" # themify icon pack : https://themify.me/themify-icons
|
||||||
|
link = "#"
|
||||||
|
|
||||||
|
[[params.social]]
|
||||||
|
icon = "ti-vimeo-alt" # themify icon pack : https://themify.me/themify-icons
|
||||||
|
link = "#"
|
||||||
|
|
||||||
|
[[params.social]]
|
||||||
|
icon = "ti-linkedin" # themify icon pack : https://themify.me/themify-icons
|
||||||
|
link = "#"
|
||||||
|
|
||||||
|
|
||||||
|
################################# language ################################
|
||||||
[Languages]
|
[Languages]
|
||||||
|
|
||||||
# English Language
|
################################ English Language ######################
|
||||||
[Languages.en]
|
[Languages.en]
|
||||||
languageName = "En"
|
languageName = "En"
|
||||||
weight = 1
|
|
||||||
languageCode = "en-us"
|
languageCode = "en-us"
|
||||||
title = "Dot"
|
weight = 1
|
||||||
dateFormat = "2 January 2006"
|
|
||||||
home = "Home"
|
home = "Home"
|
||||||
# logo is for all page
|
|
||||||
logo = ""
|
|
||||||
# logo white is for homepage logo, you can use colorful logo too...
|
|
||||||
logoWhite = ""
|
|
||||||
copyright = "The Hugo Documents are copyright © [gethugothemes](https://gethugothemes.com/) 2019."
|
copyright = "The Hugo Documents are copyright © [gethugothemes](https://gethugothemes.com/) 2019."
|
||||||
|
|
||||||
# navigation
|
# navigation
|
||||||
|
@ -91,36 +117,16 @@ disableLanguageSwitchingButton = false
|
||||||
title = "Got Any Questions"
|
title = "Got Any Questions"
|
||||||
content = "Submit the form and confirm your email address at <a class='text-primary' href='https://formspree.io/'>Formspree</a> Then add the following lines to contact page YAML Front Matter."
|
content = "Submit the form and confirm your email address at <a class='text-primary' href='https://formspree.io/'>Formspree</a> Then add the following lines to contact page YAML Front Matter."
|
||||||
|
|
||||||
# footer social icon
|
|
||||||
[[Languages.en.socialIcon]]
|
|
||||||
icon = "ti-facebook"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
[[Languages.en.socialIcon]]
|
|
||||||
icon = "ti-twitter-alt"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
[[Languages.en.socialIcon]]
|
|
||||||
icon = "ti-vimeo-alt"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
[[Languages.en.socialIcon]]
|
|
||||||
icon = "ti-instagram"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################### Franch Language ######################
|
||||||
# Franch Language
|
|
||||||
[Languages.fr]
|
[Languages.fr]
|
||||||
languageName = "Fr"
|
languageName = "Fr"
|
||||||
weight = 1
|
|
||||||
languageCode = "fr-fr"
|
languageCode = "fr-fr"
|
||||||
title = "Dot"
|
weight = 2
|
||||||
dateFormat = "2 January 2006"
|
|
||||||
home = "Aidez-moi"
|
home = "Aidez-moi"
|
||||||
logo = "Dot"
|
|
||||||
copyright = "Les documents Hugo sont sous copyright © gethugothemes 2019."
|
copyright = "Les documents Hugo sont sous copyright © gethugothemes 2019."
|
||||||
|
|
||||||
# navigation
|
# navigation
|
||||||
|
@ -182,21 +188,4 @@ disableLanguageSwitchingButton = false
|
||||||
# contact
|
# contact
|
||||||
[Languages.fr.params.contact]
|
[Languages.fr.params.contact]
|
||||||
title = "Vous avez des questions"
|
title = "Vous avez des questions"
|
||||||
content = "Envoyez le formulaire et confirmez votre adresse e-mail à l'adresse <a class='text-primary' href='https://formspree.io/'>Formspree</a> Ajoutez ensuite les lignes suivantes pour contacter la page YAML Front Matter."
|
content = "Envoyez le formulaire et confirmez votre adresse e-mail à l'adresse <a class='text-primary' href='https://formspree.io/'>Formspree</a> Ajoutez ensuite les lignes suivantes pour contacter la page YAML Front Matter."
|
||||||
|
|
||||||
# footer social icon
|
|
||||||
[[Languages.fr.socialIcon]]
|
|
||||||
icon = "ti-facebook"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
[[Languages.fr.socialIcon]]
|
|
||||||
icon = "ti-twitter-alt"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
[[Languages.fr.socialIcon]]
|
|
||||||
icon = "ti-vimeo-alt"
|
|
||||||
linkURL = "#"
|
|
||||||
|
|
||||||
[[Languages.fr.socialIcon]]
|
|
||||||
icon = "ti-instagram"
|
|
||||||
linkURL = "#"
|
|
|
@ -6,11 +6,15 @@
|
||||||
<p class="text-white mb-4">{{ .Site.Params.banner.description }}</p>
|
<p class="text-white mb-4">{{ .Site.Params.banner.description }}</p>
|
||||||
<div class="position-relative">
|
<div class="position-relative">
|
||||||
<input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}">
|
<input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}">
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
|
{{ $currentNode := . }}
|
||||||
|
{{ $currentNode.Scratch.Set "pages" .Site.Pages }}
|
||||||
|
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
var projects = [
|
var projects = [
|
||||||
{{ range .Data.Pages }}
|
{{ range $pages }}
|
||||||
{
|
{
|
||||||
value: "{{ .Title }}",
|
value: "{{ .Title }}",
|
||||||
label: "{{ .Title }}",
|
label: "{{ .Title }}",
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
<ul class="list-styled">
|
<ul class="list-styled">
|
||||||
{{ $currentNode := . }}
|
{{ $currentNode := . }}
|
||||||
{{ $showvisitedlinks := .Site.Params.showVisitedLinks }}
|
{{ $showvisitedlinks := .Site.Params.showVisitedLinks }}
|
||||||
<a class="d-block h4 back-btn" href="{{ .Site.BaseURL }}{{ .Language.LanguageName | lower }}">{{ i18n "Back-home"}}</a>
|
<a class="d-block h4 back-btn"
|
||||||
|
href="{{ .Site.BaseURL }}{{ .Language.LanguageName | lower }}">{{ i18n "Back-home"}}</a>
|
||||||
{{range .Site.Home.Sections.ByWeight}}
|
{{range .Site.Home.Sections.ByWeight}}
|
||||||
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
|
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -81,7 +82,7 @@
|
||||||
{{safeHTML .Params.head}}
|
{{safeHTML .Params.head}}
|
||||||
<li data-nav-id="{{.URL | absURL}}" title="{{.Title}}" class="sidelist
|
<li data-nav-id="{{.URL | absURL}}" title="{{.Title}}" class="sidelist
|
||||||
{{if .IsAncestor $currentNode }}parent{{end}}
|
{{if .IsAncestor $currentNode }}parent{{end}}
|
||||||
{{if eq .File.UniqueID $currentNode.File.UniqueID}}active{{end}}
|
{{with .File}} {{if eq .UniqueID $currentNode.UniqueID}}active{{end}} {{ end }}
|
||||||
{{if .Params.alwaysopen}}parent{{end}}">
|
{{if .Params.alwaysopen}}parent{{end}}">
|
||||||
<a href="{{.RelPermalink}}">
|
<a href="{{.RelPermalink}}">
|
||||||
{{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
|
{{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
</div>
|
</div>
|
||||||
<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.social }}
|
||||||
<li class="list-inline-item"><a class="text-color d-inline-block p-2" href="{{ .linkURL }}"><i class="{{ .icon }}"></i></a></li>
|
<li class="list-inline-item"><a class="text-color d-inline-block p-2" href="{{ .link | safeURL }}"><i class="{{ .icon }}"></i></a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
--text-color:{{ .Site.Params.textColor }};
|
--text-color:{{ .Site.Params.textColor }};
|
||||||
--text-color-dark:{{ .Site.Params.textColorDark }};
|
--text-color-dark:{{ .Site.Params.textColorDark }};
|
||||||
--white-color:{{ .Site.Params.whiteColor }};
|
--white-color:{{ .Site.Params.whiteColor }};
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{{ "<!-- Main Stylesheet -->" | safeHTML }}
|
{{ "<!-- Main Stylesheet -->" | safeHTML }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue