hugo-toha/layouts/index.html
Aaron Qian 02db3d3044
Bundling JS with ESBuild (#702)
* add npm dependencies used in this theme

* implement helper to configure JS and ESBuild

* migrate jquery popper.js bootstrap fontawesome to js bundle

* refactor main.js into smaller pieces, and moved navbar.js to assets

* remove list.js. It adjusts post card height to be the same, but is actually not needed.

* refactored notes.js, search.js, single.js into application.js

* move ityped to js asset, implement experiences horizontal vertical line in css

* align recent post height via css

* migrated home.js and refactored into various sections

* migrated darkMode feature to js bundle

* moved mermaid feature to js bundle

* migrate syntax highlight to js bundle

* migrate katex ( js portion ) to js bundle

* migrate pdf-js to js bundle by delegating to cdn

* set explicit comparisions for feature envvars so js can properly optimize

* removed goat-counter

* more fixes for broken achievements and small bugs

* more bug fixes

* allow configuration of hightlight.js, fix video-player shortcode

* remove jquery all together

* add null handling and fix merge conflicts

Co-authored-by: Aaron Qian <aaron@yeet.io>
2023-01-06 00:42:54 +06:00

82 lines
3.2 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
<head>
<title>{{- .Site.Title -}}</title>
{{ $siteDescription := .Site.Params.description }}
{{ if (index .Site.Data .Site.Language.Lang).site }}
{{ $siteConfig := (index .Site.Data .Site.Language.Lang).site }}
{{ if $siteConfig.description }}
{{ $siteDescription = $siteConfig.description }}
{{ end }}
{{ end }}
<meta name="description" content="{{ $siteDescription }}" />
<!-- import common headers -->
{{- partial "header.html" . -}}
{{- partial "opengraph.html" . -}}
<!-- import index page specific headers -->
<link rel="stylesheet" href="{{ "/css/sections/home.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/about.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/skills.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/experiences.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/education.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/projects.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/recent-posts.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/achievements.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/accomplishments.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/publications.css" | relURL }}"/>
<!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
<!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}}
</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.id) " " "-")) . -}}
{{ 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 ----------------------->
{{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
{{- partial $footerTemplate . -}}
<!--- ADD COMMON SCRIPTS --------------->
{{ partial "scripts.html" . }}
<!------ ADD SUPPORT LINKS -------->
{{- partial "misc/support.html" . -}}
</body>
</html>