<!DOCTYPE html>
<html lang="en">
  <head>
    <title>{{- .Site.Title -}}</title>
    <!-- import common headers -->
    {{- partial "header.html" . -}}

    <!-- import index page specific headers -->
    <link rel="stylesheet" href="/assets/css/home.css" />
    <link rel="stylesheet" href="/assets/css/about.css" />
    <link rel="stylesheet" href="/assets/css/skills.css" />
    <link rel="stylesheet" href="/assets/css/experiences.css" />
    <link rel="stylesheet" href="/assets/css/projects.css" />
    <link rel="stylesheet" href="/assets/css/recent-posts.css" />
    <link rel="stylesheet" href="/assets/css/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 "navbar.html" . -}}

    <!--- ADD HOME SECTION ---------------->
    {{- partial "home.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" . -}}

    <!--- 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>
  </body>
</html>
