hugo-toha/layouts/index.html
Hugo MARTIN 46b21e028c
Translations and i18n (#60)
* Managing i18n

* Fix absolute path

* Config files

* Home link manage langage

* Fixing footer i18n

* Implemented i18n on newsletter

* Implemented two languages in example

* Removed old section directory

* Using yaml in data to organize home summary

* Fully working for old versions without i18n

* Integrating language menu CSS

* Fix language dropdown CSS

* Refactor translation codes

* Remove duplicate code

* Fix URL issues

* Move customMenus and other site related config into data section

* Fix error during language toggle

* Only show the available translation for the posts

* Handle navbar brand URL properly

* Fix responsiveness

Co-authored-by: Hugo MARTIN <hugo.martin.69@gmail.com>
Co-authored-by: hossainemruz <emruz@appscode.com>
2020-10-03 09:59:28 +06:00

70 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{- .Site.Title -}}</title>
<meta name="description" content="{{ .Site.Params.description }}" />
<!-- import common headers -->
{{- partial "header.html" . -}}
<!-- import index page specific headers -->
<link rel="stylesheet" href="/assets/css/sections/home.css" />
<link rel="stylesheet" href="/assets/css/sections/about.css" />
<link rel="stylesheet" href="/assets/css/sections/skills.css" />
<link rel="stylesheet" href="/assets/css/sections/experiences.css" />
<link rel="stylesheet" href="/assets/css/sections/projects.css" />
<link rel="stylesheet" href="/assets/css/sections/recent-posts.css" />
<link rel="stylesheet" href="/assets/css/sections/achievements.css" />
<!-- Add Google Analytics if enabled in configuration -->
{{ if .Site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
</head>
<body data-spy="scroll" data-target="#top-navbar" data-offset="100">
<!--- NAVBAR ------------------------->
{{- partial "navigators/navbar.html" . -}}
<!--- ADD HOME SECTION ---------------->
{{- partial "sections/home.html" . -}}
<!--- ADD OPTIONAL SECTIONS ----------->
{{ $sections:= .Site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }}
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
{{ end }}
{{ if $sections }}
{{ $background:= "bg-white"}}
{{ range sort $sections "section.weight" }}
{{ if .section.enable }}
<div class="container-fluid section-holder d-flex {{ $background }}">
{{ if .section.template }}
{{- partial .section.template . -}}
{{ else }}
{{- partial (printf "sections/%s.html" (replace (lower .section.name) " " "-")) . -}}
{{ end }}
</div>
<!--- alter background color for next section --->
{{ if eq $background "bg-white" }}
{{ $background = "bg-dimmed" }}
{{ else }}
{{ $background = "bg-white" }}
{{end}}
{{ end }}
{{ end }}
{{ end }}
<!--- ADD FOOTER ----------------------->
{{- partial "footer.html" . -}}
<!--- ADD COMMON SCRIPTS --------------->
{{ partial "scripts.html" . }}
<!--- ADD INDEX PAGE SPECIFIC SCRIPTS -->
<script src="/assets/js/itype.min.js"></script>
<script src="/assets/js/github-button.js"></script>
<script src="/assets/js/home.js"></script>
<script src="/assets/js/jquery.filterizr.min.js"></script>
</body>
</html>