Merged main.
This commit is contained in:
commit
106642ab1a
79 changed files with 1786 additions and 899 deletions
|
@ -11,7 +11,10 @@
|
|||
|
||||
{{ $logoImage:= resources.Get .logo}}
|
||||
{{ if $logoImage }}
|
||||
{{ $logoImage := $logoImage.Fit "24x24" }}
|
||||
{{/* svg don't support "Fit" operation */}}
|
||||
{{ if ne $logoImage.MediaType.SubType "svg" }}
|
||||
{{ $logoImage = $logoImage.Fit "24x24" }}
|
||||
{{ end }}
|
||||
|
||||
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||
{{ end }}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
{{/* svg don't support "Fit" operation */}}
|
||||
{{ if ne $logoImage.MediaType.SubType "svg" }}
|
||||
{{ $logoImage := $logoImage.Fit "24x24" }}
|
||||
{{ $logoImage = $logoImage.Fit "24x24" }}
|
||||
{{ end }}
|
||||
|
||||
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
{{ $disqusShortName := site.DisqusShortname }}
|
||||
{{ if site.Params.features.comment.disqus.shortName }}
|
||||
{{ $disqusShortName = site.Params.features.comment.disqus.shortName }}
|
||||
{{ end }}
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
|
@ -8,7 +13,7 @@
|
|||
var dsq = document.createElement("script");
|
||||
dsq.type = "text/javascript";
|
||||
dsq.async = true;
|
||||
var disqus_shortname = "{{ site.DisqusShortname }}";
|
||||
var disqus_shortname = "{{ $disqusShortName }}";
|
||||
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
|
||||
(
|
||||
document.getElementsByTagName("head")[0] ||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
{{ $disclaimer := "" }}
|
||||
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
|
||||
{{ if $siteConfig.disclaimer }}
|
||||
{{ if $siteConfig.disclaimer }}
|
||||
{{ $disclaimer = $siteConfig.disclaimer }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
<li class="nav-item">
|
||||
<a class="smooth-scroll" href="/#{{ $sectionID }}">{{ .section.name }}</a>
|
||||
<a class="smooth-scroll" href="{{ "" | absLangURL }}#{{ $sectionID }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
@ -86,7 +86,23 @@
|
|||
<h5>{{ i18n "contact_me" }}</h5>
|
||||
<ul>
|
||||
{{ range $key,$value:= $author.contactInfo }}
|
||||
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
|
||||
{{ if (eq $key "email") }}
|
||||
<li><a href={{ printf "mailto:%s" $value }} target="_blank" rel="noopener">
|
||||
<span><i class="fas fa-envelope"></i></span> <span>{{ $value }}</span>
|
||||
</a></li>
|
||||
{{ else if (eq $key "phone") }}
|
||||
<li><span><i class="fas fa-phone-alt"></i></span> <span>{{ $value }}</span></li>
|
||||
{{ else if (eq $key "linkedin") }}
|
||||
<li><a href={{ printf "https://www.linkedin.com/in/%s" $value }} target="_blank" rel="noopener">
|
||||
<span><i class="fab fa-linkedin"></i></span> <span>{{ $author.name }}</span>
|
||||
</a></li>
|
||||
{{ else if (eq $key "github") }}
|
||||
<li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener">
|
||||
<span><i class="fab fa-github"></i></span> <span>{{ $value }}</span>
|
||||
</a></li>
|
||||
{{ else }}
|
||||
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -121,13 +137,14 @@
|
|||
<button type="submit" class="btn btn-info">{{ i18n "submit" }}</button>
|
||||
</form>
|
||||
{{ else }}
|
||||
<!-- a dummy form -->
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="{{ i18n "newsletter_input_placeholder" }}"/>
|
||||
<small id="emailHelp" class="form-text text-muted">{{ i18n "newsletter_warning" }}</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info">{{ i18n "submit" }}</button>
|
||||
<form method='post' action='https://blogtrottr.com'>
|
||||
<div class="form-group">
|
||||
<input type='email' class="form-control" name='btr_email' placeholder="{{ i18n "newsletter_input_placeholder" }}"/><br />
|
||||
<input type='hidden' name='btr_url' value='{{ "" | absLangURL }}index.xml' />
|
||||
<input type='hidden' name='schedule_type' value='1' />
|
||||
<small id="emailHelp" class="form-text text-muted">{{ i18n "newsletter_warning" }}</small>
|
||||
<button type="submit" class="btn btn-info"> {{ i18n "submit" }} </button>
|
||||
</div>
|
||||
</form>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -137,7 +154,7 @@
|
|||
{{ if and $disclaimerEnabled $disclaimer}}
|
||||
<hr />
|
||||
<div class="container">
|
||||
<p id="disclaimer"><strong>{{ i18n "disclaimer_text" }}:</strong> {{ $disclaimer }}</p>
|
||||
<p id="disclaimer"><strong>{{ i18n "disclaimer_text" }}:</strong> {{ $disclaimer | markdownify }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if $credentialsEnabled }}
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
{{/* default favicon */}}
|
||||
{{ $favicon := "/images/favicon.png" }}
|
||||
|
||||
{{/* if favicon is provided in the config, then use that */}}
|
||||
{{ if site.Params.logo.favicon }}
|
||||
{{ $favicon = site.Params.logo.favicon }}
|
||||
{{ end }}
|
||||
|
||||
{{/* resize the favicon. don't resize svg because it is not supported */}}
|
||||
{{ $favicon := resources.Get $favicon }}
|
||||
{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }}
|
||||
{{ $favicon = $favicon.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $favicon = $favicon.RelPermalink}}
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
|
@ -20,17 +5,26 @@
|
|||
<!-- ============ import common css ========== -->
|
||||
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/layouts/main.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/navigators/navbar.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/plyr.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/flag-icon.min.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/katex.min.css" | relURL }}">
|
||||
|
||||
<!--=================== cdn ==============================-->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
|
||||
|
||||
<!--================= fab-icon =========================-->
|
||||
<link rel="icon" type="image/png" href="{{ $favicon }}" />
|
||||
{{/* add favicon only if the site author has provided the the favicon */}}
|
||||
{{ if site.Params.logo.favicon }}
|
||||
{{ $favicon := site.Params.logo.favicon }}
|
||||
|
||||
<!--================= custom style overrides =========================-->
|
||||
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
|
||||
{{/* resize the favicon. don't resize svg because it is not supported */}}
|
||||
{{ $favicon = resources.Get $favicon }}
|
||||
{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }}
|
||||
{{ $favicon = $favicon.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $favicon = $favicon.RelPermalink}}
|
||||
|
||||
<link rel="icon" type="image/png" href="{{ $favicon }}" />
|
||||
{{end}}
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* apply image processing. don't use "Fit" in svg because its not supported */}}
|
||||
{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}}
|
||||
{{ $authorImage:= resources.Get $authorImage}}
|
||||
{{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }}
|
||||
{{ $authorImage := $authorImage.Fit "120x120" }}
|
||||
|
||||
{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }}
|
||||
{{ $authorImage = $authorImage.Fit "120x120" }}
|
||||
{{ end }}
|
||||
|
||||
{{/* return the author image link */}}
|
||||
{{ return $authorImage.RelPermalink }}
|
||||
|
||||
|
|
10
layouts/partials/helpers/get-pages.html
Normal file
10
layouts/partials/helpers/get-pages.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ $pages:= slice}}
|
||||
{{ range . }}
|
||||
{{ if .HasChildren }}
|
||||
{{ $nestedPages:=partial "helpers/get-pages.html" .Children }}
|
||||
{{ $pages = $pages | append $nestedPages }}
|
||||
{{ else }}
|
||||
{{ $pages = $pages | append .Page }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return $pages}}
|
|
@ -2,7 +2,7 @@
|
|||
{{ if eq .type "certification" }}
|
||||
{{/* Verifiable certificate badge from https://www.credly.com */}}
|
||||
<div class="">
|
||||
<a href="{{ .url }}" target="_blank" >
|
||||
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer">
|
||||
<img src="{{ .badge }}" alt="{{ .name }}" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
<div class="dropdown languageSelector">
|
||||
<a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/16.png" alt="{{ $countryCode }}">
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ site.Language.LanguageName }}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range .Translations }}
|
||||
<a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}">
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/24.png" alt="{{ $countryCode }}">
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ .Language.LanguageName }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,28 +1,31 @@
|
|||
{{/* default logos */}}
|
||||
{{ $mainLogo := "/images/main-logo.png" }}
|
||||
{{ $invertedLogo := "/images/inverted-logo.png" }}
|
||||
{{/* by default, don't use any logo */}}
|
||||
{{ $mainLogo := "" }}
|
||||
{{ $invertedLogo := "" }}
|
||||
|
||||
{{/* if custom logo has been provided in the config file, then use them */}}
|
||||
{{/* if custom logo has been provided, use them */}}
|
||||
{{ if site.Params.logo.main }}
|
||||
{{ $mainLogo = site.Params.logo.main }}
|
||||
{{ end }}
|
||||
|
||||
{{ if site.Params.logo.inverted }}
|
||||
{{ $invertedLogo = site.Params.logo.inverted }}
|
||||
{{ end }}
|
||||
|
||||
{{/* resize the logos. don't resize svg because it is not supported */}}
|
||||
{{ $mainLogo := resources.Get $mainLogo}}
|
||||
{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }}
|
||||
{{ $mainLogo = $mainLogo.Resize "42x" }}
|
||||
{{ if $mainLogo }}
|
||||
{{ $mainLogo = resources.Get $mainLogo}}
|
||||
{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }}
|
||||
{{ $mainLogo = $mainLogo.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $mainLogo = $mainLogo.RelPermalink}}
|
||||
{{ end }}
|
||||
{{ $mainLogo = $mainLogo.RelPermalink}}
|
||||
|
||||
{{ $invertedLogo := resources.Get $invertedLogo}}
|
||||
{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg") }}
|
||||
{{ $invertedLogo = $invertedLogo.Resize "42x" }}
|
||||
{{ if $invertedLogo }}
|
||||
{{ $invertedLogo = resources.Get $invertedLogo}}
|
||||
{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}}
|
||||
{{ $invertedLogo = $invertedLogo.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $invertedLogo = $invertedLogo.RelPermalink}}
|
||||
{{ end }}
|
||||
{{ $invertedLogo = $invertedLogo.RelPermalink}}
|
||||
|
||||
<nav class="navbar navbar-expand-xl top-navbar final-navbar shadow">
|
||||
<div class="container">
|
||||
|
@ -30,7 +33,9 @@
|
|||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
|
||||
<img src="{{ $mainLogo }}" alt="Logo">
|
||||
{{ if $mainLogo }}
|
||||
<img src="{{ $mainLogo }}" alt="Logo">
|
||||
{{ end }}
|
||||
{{- site.Title -}}
|
||||
</a>
|
||||
<button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()">
|
||||
|
@ -46,6 +51,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Store the logo information in a hidden img for the JS -->
|
||||
<img src="{{ $mainLogo }}" class="d-none" id="main-logo" alt="Logo">
|
||||
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo">
|
||||
{{ if $mainLogo }}
|
||||
<img src="{{ $mainLogo }}" class="d-none" id="main-logo" alt="Logo">
|
||||
{{ end }}
|
||||
{{ if $invertedLogo }}
|
||||
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo">
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
{{/* variables for enabling/disabling various features */}}
|
||||
{{ $blogEnabled := site.Params.features.blog.enable | default false }}
|
||||
{{ $notesEnabled := site.Params.features.notes.enable | default false }}
|
||||
{{ $maxVisibleSections := site.Params.topNavbar.maxVisibleSections | default 5 }}
|
||||
|
||||
{{/* keep backward compatibility for blog post */}}
|
||||
{{ if site.Params.enableBlogPost }}
|
||||
{{ $blogEnabled = true }}
|
||||
{{ end }}
|
||||
|
||||
{{/* default logos */}}
|
||||
{{ $mainLogo := "/images/main-logo.png" }}
|
||||
{{ $invertedLogo := "/images/inverted-logo.png" }}
|
||||
{{/* by default, don't use any logo */}}
|
||||
{{ $mainLogo := "" }}
|
||||
{{ $invertedLogo := "" }}
|
||||
|
||||
{{/* if custom logo is used, them */}}
|
||||
{{/* if custom logo has been provided, use them */}}
|
||||
{{ if site.Params.logo.main }}
|
||||
{{ $mainLogo = site.Params.logo.main }}
|
||||
{{ end }}
|
||||
|
@ -20,17 +21,21 @@
|
|||
{{ end }}
|
||||
|
||||
{{/* resize the logos. don't resize svg because it is not supported */}}
|
||||
{{ $mainLogo := resources.Get $mainLogo}}
|
||||
{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }}
|
||||
{{ $mainLogo = $mainLogo.Resize "42x" }}
|
||||
{{ if $mainLogo }}
|
||||
{{ $mainLogo = resources.Get $mainLogo}}
|
||||
{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }}
|
||||
{{ $mainLogo = $mainLogo.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $mainLogo = $mainLogo.RelPermalink}}
|
||||
{{ end }}
|
||||
{{ $mainLogo = $mainLogo.RelPermalink}}
|
||||
|
||||
{{ $invertedLogo := resources.Get $invertedLogo}}
|
||||
{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}}
|
||||
{{ $invertedLogo = $invertedLogo.Resize "42x" }}
|
||||
{{ if $invertedLogo }}
|
||||
{{ $invertedLogo = resources.Get $invertedLogo}}
|
||||
{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}}
|
||||
{{ $invertedLogo = $invertedLogo.Resize "42x" }}
|
||||
{{ end }}
|
||||
{{ $invertedLogo = $invertedLogo.RelPermalink}}
|
||||
{{ end }}
|
||||
{{ $invertedLogo = $invertedLogo.RelPermalink}}
|
||||
|
||||
{{ $customMenus := site.Params.customMenus }}
|
||||
{{ if (index site.Data site.Language.Lang).site.customMenus }}
|
||||
|
@ -45,7 +50,9 @@
|
|||
<nav class="navbar navbar-expand-xl top-navbar initial-navbar" id="top-navbar">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
|
||||
<img src="{{ $invertedLogo }}" id="logo" alt="Logo">
|
||||
{{ if $invertedLogo }}
|
||||
<img src="{{ $invertedLogo }}" id="logo" alt="Logo">
|
||||
{{ end }}
|
||||
{{- site.Title -}}
|
||||
</a>
|
||||
<button
|
||||
|
@ -65,18 +72,18 @@
|
|||
<a class="nav-link" href="#home">{{ i18n "home" }}</a>
|
||||
</li>
|
||||
{{ if $sections }}
|
||||
{{ $sectionCount := 0}}
|
||||
{{ $sectionCount := 1 }}
|
||||
{{ range sort $sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar)}}
|
||||
{{ $sectionCount = add $sectionCount 1}}
|
||||
{{ if le $sectionCount 5 }}
|
||||
{{ if le $sectionCount $maxVisibleSections }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#{{ partial "helpers/get-section-id.html" . }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ if gt $sectionCount 5 }}
|
||||
{{ if gt $sectionCount $maxVisibleSections }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{i18n "more" }}</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
|
@ -84,7 +91,7 @@
|
|||
{{ range sort $sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar) }}
|
||||
{{ $sectionCount = add $sectionCount 1}}
|
||||
{{ if gt $sectionCount 5 }}
|
||||
{{ if gt $sectionCount $maxVisibleSections }}
|
||||
<a class="dropdown-item" href="#{{ partial "helpers/get-section-id.html" . }}">{{ .section.name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -122,6 +129,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Store the logo information in a hidden img for the JS -->
|
||||
<img src="{{ $mainLogo }}" class="d-none" id="main-logo" alt="Logo">
|
||||
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo">
|
||||
{{ if $mainLogo }}
|
||||
<img src="{{ $mainLogo }}" class="d-none" id="main-logo" alt="Logo">
|
||||
{{ end }}
|
||||
{{ if $invertedLogo }}
|
||||
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo">
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
|
|
@ -1,33 +1,43 @@
|
|||
{{ $curPage := . }}
|
||||
{{ $prevPage := "" }}
|
||||
{{ $nextPage := "" }}
|
||||
|
||||
<!-- List all the pages. It uses the sidebar menu to discover the page order. -->
|
||||
{{ $pages := slice }}
|
||||
|
||||
{{ if isset site.Menus "sidebar" }}
|
||||
{{ $pages = partial "helpers/get-pages.html" site.Menus.sidebar }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Now, find the current page index in the pages list. Then, find previous page and next page. -->
|
||||
{{ $idx := 0 }}
|
||||
{{ range $pages }}
|
||||
{{ if eq .RelPermalink $curPage.RelPermalink }}
|
||||
{{ $prevPage = index $pages (sub $idx 1) }}
|
||||
{{ $nextPage = index $pages (add $idx 1) }}
|
||||
{{ end }}
|
||||
{{ $idx = add $idx 1 }}
|
||||
{{ end }}
|
||||
|
||||
<div class="row next-prev-navigator">
|
||||
{{ $currentPage := . }}
|
||||
{{ range (where site.RegularPages.ByDate "Type" "in" site.Params.mainSections )}}
|
||||
{{ if eq .RelPermalink $currentPage.RelPermalink }}
|
||||
{{ if .Next }}
|
||||
{{ if (in site.Params.mainSections .Next.Type) }}
|
||||
<div class="col-md-6 previous-article">
|
||||
<a href="{{.Next.RelPermalink}}" title="{{ .Next.Title }}" class="btn btn-outline-info">
|
||||
<div><i class="fas fa-chevron-circle-left"></i> {{ i18n "prev" }}</div>
|
||||
<div class="next-prev-text">{{ .Next.Title }}</div>
|
||||
{{ if $prevPage }}
|
||||
<div class="col-md-6 previous-article">
|
||||
<a href="{{ $prevPage.RelPermalink }}" title="{{ $prevPage.Title }}" class="btn btn-outline-info">
|
||||
<div><i class="fas fa-chevron-circle-left"></i> {{ i18n "prev" }}</div>
|
||||
<div class="next-prev-text">{{ $prevPage.Title }}</div>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if $nextPage }}
|
||||
{{ $columnWidth:="col-md-12" }}
|
||||
{{ if $prevPage }}
|
||||
{{ $columnWidth = "col-md-6" }}
|
||||
{{ end}}
|
||||
<div class="{{ $columnWidth }} next-article">
|
||||
<a href="{{ $nextPage.RelPermalink }}" title="{{ $nextPage.Title }}" class="btn btn-outline-info">
|
||||
<div>{{ i18n "next" }} <i class="fas fa-chevron-circle-right"></i></div>
|
||||
<div class="next-prev-text">{{ $nextPage.Title }}</div>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Prev }}
|
||||
{{ if (in site.Params.mainSections .Prev.Type) }}
|
||||
{{ $columnWidth:="col-md-12" }}
|
||||
{{ if .Next }}
|
||||
{{ if (in site.Params.mainSections .Next.Type) }}
|
||||
{{ $columnWidth = "col-md-6" }}
|
||||
{{ end }}
|
||||
{{ end}}
|
||||
<div class="{{ $columnWidth }} next-article">
|
||||
<a href="{{ .Prev.RelPermalink }}" title="{{ .Prev.Title }}" class="btn btn-outline-info">
|
||||
<div>{{ i18n "next" }} <i class="fas fa-chevron-circle-right"></i></div>
|
||||
<div class="next-prev-text">{{ .Prev.Title }}</div>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
16
layouts/partials/navigators/taxonomies.html
Normal file
16
layouts/partials/navigators/taxonomies.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ $context := .context }}
|
||||
{{ $taxo := .taxo }}
|
||||
{{ $class:= "" }}
|
||||
{{ if isset $context.Site.Taxonomies ( lower $taxo ) }}
|
||||
{{ $taxonomy := index $context.Site.Taxonomies ( lower $taxo ) }}
|
||||
{{ if (gt (len $taxonomy) 0)}}
|
||||
{{ range $taxonomy }}
|
||||
{{if eq $context.Title .Page.Title}}
|
||||
{{ $class = "active" }}
|
||||
{{else}}
|
||||
{{$class = ""}}
|
||||
{{end}}
|
||||
<li><a class="taxonomy-term {{ $class }}" href="{{ .Page.Permalink }}" data-taxonomy-term="{{ urlize .Page.Title }}"><span class="taxonomy-label">{{ .Page.Title }}</span></a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
12
layouts/partials/opengraph.html
Normal file
12
layouts/partials/opengraph.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ $title := (index site.Data site.Language.Lang).site.openGraph.title | default site.Title }}
|
||||
{{ $type := (index site.Data site.Language.Lang).site.openGraph.type | default "website" }}
|
||||
{{ $description := (index site.Data site.Language.Lang).site.openGraph.description | default (index site.Data site.Language.Lang).site.description }}
|
||||
{{ $image := (index site.Data site.Language.Lang).site.openGraph.image | default (index site.Data site.Language.Lang).author.image }}
|
||||
{{ $url := (index site.Data site.Language.Lang).site.openGraph.url | default site.BaseURL }}
|
||||
|
||||
<!-- ============ open graph tags ========== -->
|
||||
<meta property="og:title" content="{{ $title }}"/>
|
||||
<meta property="og:type" content="{{ $type }}"/>
|
||||
<meta property="og:description" content="{{ $description }}"/>
|
||||
<meta property="og:image" content="{{ $image | absURL }}">
|
||||
<meta property="og:url" content="{{ $url }}">
|
|
@ -6,5 +6,8 @@
|
|||
<script type="text/javascript" src="{{ "/js/plyr.js" | relURL }}"></script>
|
||||
<script type="text/javascript" src="{{ "/js/main.js" | relURL }}"></script>
|
||||
|
||||
<script type="text/javascript" defer src="{{ "/js/katex.min.js" | relURL }}"></script>
|
||||
<script type="text/javascript" defer src="{{ "/js/auto-render.min.js" | relURL }}" onload="renderMathInElement(document.body);"></script>
|
||||
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/darkreader@4.9.34/darkreader.js"></script>
|
||||
<script type="text/javascript" src="{{ "/js/darkmode.js" | relURL }}"></script>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<div class="container anchor p-lg-5 about-section" id="{{ $sectionID }}">
|
||||
<div class="row pt-sm-2 pt-md-4 align-self-center">
|
||||
<!-- summary -->
|
||||
<div class="col-sm-6">
|
||||
<!-- takes up full section width if no badges/soft skills are specified -->
|
||||
{{ if or (.softSkills) (.badges) }} <div class="col-sm-6"> {{ else }} <div class="col-sm-12"> {{ end }}
|
||||
<h3 class="p-1">{{ $author.name }}</h3>
|
||||
{{ if .designation }}
|
||||
<h5 class="p-1">
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 accomplishments-section" id="{{ $sectionID }}">
|
||||
<div class="container-fluid anchor pb-5 accomplishments-section">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
<h1 class="text-center">
|
||||
<span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
|
||||
<div class="container">
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 achievements-section" id="{{ $sectionID }}">
|
||||
<div class="container-fluid anchor pb-5 achievements-section">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
<h1 class="text-center">
|
||||
<span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
<div class="container">
|
||||
<div class="row" id="gallery">
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
{{ if .takenCourses }}
|
||||
{{ $collapseAfter := .takenCourses.collapseAfter | default 2 }}
|
||||
<div class="taken-courses">
|
||||
<h6 class="text-muted">{{ i18n "taken_courses" }}</h6>
|
||||
{{ if .takenCourses.showGrades }}
|
||||
|
@ -65,7 +66,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{{ range $index,$course := .takenCourses.courses }}
|
||||
<tr class="course {{ if gt $index 1 }}hidden-course{{ end}}">
|
||||
<tr class="course {{ if ge $index $collapseAfter }}hidden-course{{ end}}">
|
||||
<td>{{ $course.name }}</td>
|
||||
{{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }}
|
||||
<td>{{ $course.achieved }}</td>
|
||||
|
@ -76,11 +77,11 @@
|
|||
{{ else }}
|
||||
<ul>
|
||||
{{ range $index,$course := .takenCourses.courses }}
|
||||
<li class="course {{ if gt $index 1 }}hidden-course{{ end}}">{{ $course.name }}</li>
|
||||
<li class="course {{ if ge $index $collapseAfter }}hidden-course{{ end}}">{{ $course.name }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if gt (len .takenCourses.courses) 2 }}
|
||||
{{ if gt (len .takenCourses.courses) $collapseAfter }}
|
||||
<button type="button" class="btn btn-link show-more-btn pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
|
||||
onclick="toggleCourseVisibility(this);" id="show-more-btn" aria-label="{{ i18n "show_more"}}">{{ i18n "show_more"}}</button>
|
||||
<button type="button" class="btn btn-link show-more-btn hidden pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 education-section" id="{{ $sectionID }}">
|
||||
<div class="container-fluid anchor pb-5 education-section">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
<h1 class="text-center">
|
||||
<span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
|
||||
<div class="container">
|
||||
|
@ -53,19 +54,20 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
{{ if .takenCourses }}
|
||||
{{ $collapseAfter := .takenCourses.collapseAfter | default 2 }}
|
||||
<div class="taken-courses">
|
||||
<h6 class="text-muted">{{ i18n "taken_courses"}}</h6>
|
||||
{{ if .takenCourses.showGrades }}
|
||||
{{ $hideScale := .takenCourses.hideScale }}
|
||||
<table>
|
||||
<thead>
|
||||
<th>{{ i18n "course_name"}}</th>
|
||||
<th class="course-name-header">{{ i18n "course_name"}}</th>
|
||||
{{ if not $hideScale }}<th>{{ i18n "total_credit"}}</th>{{ end }}
|
||||
<th>{{ i18n "obtained_credit"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $index,$course := .takenCourses.courses }}
|
||||
<tr class="course {{ if gt $index 1 }}hidden-course{{ end}}">
|
||||
<tr class="course {{ if ge $index $collapseAfter }}hidden-course{{ end}}">
|
||||
<td>{{ $course.name }}</td>
|
||||
{{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }}
|
||||
<td>{{ $course.achieved }}</td>
|
||||
|
@ -76,11 +78,11 @@
|
|||
{{ else }}
|
||||
<ul>
|
||||
{{ range $index,$course := .takenCourses.courses }}
|
||||
<li class="course {{ if gt $index 1 }}hidden-course{{ end}}">{{ $course.name }}</li>
|
||||
<li class="course {{ if ge $index $collapseAfter }}hidden-course{{ end}}">{{ $course.name }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if gt (len .takenCourses.courses ) 2 }}
|
||||
{{ if gt (len .takenCourses.courses ) $collapseAfter }}
|
||||
<button type="button" class="btn btn-link show-more-btn pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
|
||||
onclick="toggleCourseVisibility(this);" id="show-more-btn">{{ i18n "show_more"}}</button>
|
||||
<button type="button" class="btn btn-link show-more-btn hidden pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 experiences-section" id="{{ $sectionID }}">
|
||||
<div class="container-fluid anchor pb-5 experiences-section">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
<h1 class="text-center">
|
||||
<span id="{{ $sectionID }}"></span>{{ .section.name }}
|
||||
</h1>
|
||||
{{ end }}
|
||||
|
||||
<div class="container timeline text-justify">
|
||||
|
@ -27,4 +29,4 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -26,8 +26,11 @@
|
|||
{{ $authorImage = $author.image }}
|
||||
{{ end }}
|
||||
{{ $authorImage := resources.Get $authorImage }}
|
||||
{{ $authorImage := $authorImage.Fit "148x148" }}
|
||||
|
||||
{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}}
|
||||
{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }}
|
||||
{{ $authorImage = $authorImage.Fit "148x148" }}
|
||||
{{ end }}
|
||||
{{/* get file that matches the filename as specified as src="" in shortcode */}}
|
||||
{{ $src := resources.Get $backgroundImage }}
|
||||
|
||||
|
@ -110,6 +113,9 @@
|
|||
alt="Author Image"
|
||||
/>
|
||||
<h1 class="greeting"> {{ $author.greeting }} {{ $name }}</h1>
|
||||
{{ if $author.subtitle }}
|
||||
<h2 class="greeting-subtitle">{{ $author.subtitle }}</h2>
|
||||
{{ end }}
|
||||
<div class="typing-carousel">
|
||||
<span id="ityped" class="ityped"></span>
|
||||
<span class="ityped-cursor"></span>
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
{{ $numShow = .section.numShow }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 recent-posts-section" id="{{ $sectionID }}">
|
||||
|
||||
<div class="container-fluid anchor pb-5 recent-posts-section">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
<h1 class="text-center">
|
||||
<span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
<div class="container">
|
||||
<div class="row" id="recent-post-cards">
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 skills-section" id="{{ $sectionID }}">
|
||||
<div class="container-fluid anchor pb-5 skills-section">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
<h1 class="text-center">
|
||||
<span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
<div class="container d-flex-block">
|
||||
<div class="row" id="primary-skills">
|
||||
|
|
22
layouts/partials/utteranc.html
Normal file
22
layouts/partials/utteranc.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{ $repo := site.Params.features.comment.utteranc.repo }}
|
||||
{{ $issueTerm := site.Params.features.comment.utteranc.issueTerm }}
|
||||
{{ $theme := site.Params.features.comment.utteranc.theme }}
|
||||
|
||||
<div id="utteranc_thread"></div>
|
||||
<div id="comments" class="comments">
|
||||
<div id="comments-container"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var utterances = document.createElement('script');
|
||||
utterances.type = 'text/javascript';
|
||||
utterances.async = true;
|
||||
utterances.setAttribute('repo','{{ $repo }}')
|
||||
utterances.setAttribute('issue-term','{{ $issueTerm }}')
|
||||
utterances.setAttribute('theme','{{ $theme }}')
|
||||
utterances.crossorigin = 'anonymous';
|
||||
utterances.src = 'https://utteranc.es/client.js';
|
||||
|
||||
document.getElementById('comments-container').appendChild(utterances);
|
||||
})();
|
||||
</script>
|
17
layouts/partials/valine.html
Normal file
17
layouts/partials/valine.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!-- valine -->
|
||||
<div id="vcomments"></div>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
appId: "{{ .valine.appId }}",
|
||||
appKey: "{{ .valine.appKey }}",
|
||||
avatar: "{{ .valine.avatar }}",
|
||||
placeholder: "{{ .valine.placeholder }}",
|
||||
visitor: "{{ .valine.visitor }}",
|
||||
lang: "{{ .valine.lang }}",
|
||||
recordIP: "{{ .valine.recordIP }}",
|
||||
enableQQ: "{{ .valine.enableQQ }}",
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue