modified navigation for multilingual

This commit is contained in:
somratpro 2020-08-25 09:08:55 +06:00
parent 8499a3bb33
commit 2f8a35c142
2 changed files with 84 additions and 43 deletions

View file

@ -9,45 +9,9 @@ title = "Dot"
disableLanguages = []
# google analytics
googleAnalytics = "" # paste your analytics ID here. (Ex: UA-123-45)
# unsafe html
[markup.goldmark.renderer]
unsafe= true
################################# navigation ################################
[[menu.main]]
name = "Faq"
url = "faq"
weight = 1
[[menu.main]]
name = "contact"
url = "contact"
weight = 2
# Dropdown menu
[[menu.main]]
weight = 3
name = "docs"
hasChildren = true
[[menu.main]]
parent = "docs"
name = "Installation"
url = "installation"
weight = 1
[[menu.main]]
parent = "docs"
name = "Billing and Pricing"
url = "billing-pricing"
weight = 2
[[menu.main]]
parent = "docs"
name = "Features"
url = "features"
weight = 3
unsafe = true
############################# Default Parameters ##########################
@ -95,7 +59,6 @@ link = "#"
languageName = "En"
languageCode = "en-us"
weight = 1
home = "Home"
copyright = "The Hugo Documents are copyright © [gethugothemes](https://gethugothemes.com/) 2020."
# banner
@ -117,12 +80,52 @@ label = "contact us"
link = "contact"
################## english navigation #################
[[Languages.en.menu.main]]
name = "Home"
url = "/"
weight = 1
[[Languages.en.menu.main]]
name = "Faq"
url = "faq"
weight = 2
[[Languages.en.menu.main]]
name = "contact"
url = "contact"
weight = 3
# Dropdown menu
[[Languages.en.menu.main]]
weight = 4
name = "docs"
hasChildren = true
[[Languages.en.menu.main]]
parent = "docs"
name = "Installation"
url = "installation"
weight = 1
[[Languages.en.menu.main]]
parent = "docs"
name = "Billing and Pricing"
url = "billing-pricing"
weight = 2
[[Languages.en.menu.main]]
parent = "docs"
name = "Features"
url = "features"
weight = 3
################################### Franch Language ######################
[Languages.fr]
languageName = "Fr"
languageCode = "fr-fr"
weight = 2
home = "Accueil"
copyright = "Les documents Hugo sont sous copyright © [gethugothemes](https://gethugothemes.com/) 2020."
# banner
@ -141,4 +144,45 @@ content = "Contactez-nous pour plus de détails sur les services supplémentaire
[Languages.fr.params.cta.button]
enable = true
label = "Contactez nous"
link = "contact"
link = "contact"
################## french navigation #################
[[Languages.fr.menu.main]]
name = "Accueil"
url = "/"
weight = 1
[[Languages.fr.menu.main]]
name = "Faq"
url = "faq"
weight = 2
[[Languages.fr.menu.main]]
name = "contact"
url = "contact"
weight = 3
# Dropdown menu
[[Languages.fr.menu.main]]
weight = 4
name = "docs"
hasChildren = true
[[Languages.fr.menu.main]]
parent = "docs"
name = "Installation"
url = "installation"
weight = 1
[[Languages.fr.menu.main]]
parent = "docs"
name = "Billing and Pricing"
url = "billing-pricing"
weight = 2
[[Languages.fr.menu.main]]
parent = "docs"
name = "Features"
url = "features"
weight = 3

View file

@ -21,9 +21,6 @@
<div class="collapse navbar-collapse text-center" id="navigation">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link text-dark" href="{{ site.BaseURL | relLangURL }}">{{ site.Params.home }}</a>
</li>
{{ range site.Menus.main }}
{{ if .HasChildren }}
<li class="nav-item dropdown">