Make home page sections dynamic and configurable (#14)

* Make home page sections dynamic and configurable

* Fix navbar issue when no section is configured + fix next-prev navigator

* Update exampleSite

* Fix next-prev navigator

* Make navbar brand URL context aware
This commit is contained in:
Md. Emruz Hossain 2020-06-30 01:54:28 +06:00 committed by GitHub
parent 8f99f05a98
commit e2d376215a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 455 additions and 363 deletions

View file

@ -19,30 +19,31 @@
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
</head>
<body data-spy="scroll" data-target="#top-navbar" data-offset="50">
<body data-spy="scroll" data-target="#top-navbar" data-offset="100">
<!--- NAVBAR ------------------------->
{{- partial "navbar.html" . -}}
<!--- ADD HOME SECTION ---------------->
{{- partial "home.html" . -}}
<!--- ADD ABOUT SECTION --------------->
{{- partial "about.html" . -}}
<!--- ADD SKILLS SECTION -------------->
{{- partial "skills.html" . -}}
<!--- ADD EXPERIENCE SECTION ----------->
{{- partial "experiences.html" . -}}
<!--- ADD PROJECT SECTION -------------->
{{- partial "projects.html" . -}}
<!--- ADD RECENT-POSTS SECTION --------->
{{- partial "recent-posts.html" . -}}
<!--- ADD ACHIEVEMENT SECTION ---------->
{{- partial "achievements.html" . -}}
<!--- ADD OPTIONAL SECTIONS ----------->
{{ if .Site.Data.sections }}
{{ $background:= "bg-white"}}
{{ range sort .Site.Data.sections "section.weight" }}
{{ if .section.enable }}
<div class="container-fluid section-holder d-flex {{ $background }}">
{{- partial (printf "%s.html" (replace (lower .section.name) " " "-")) . -}}
</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" . -}}