Editing code with my formatting

This commit is contained in:
Sharwin24 2024-12-27 14:10:06 -08:00
parent caae7b85b7
commit aa2d0606ce
9 changed files with 503 additions and 283 deletions

View file

@ -1,9 +1,9 @@
let theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'light'
let theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'dark'
if (theme === 'system') {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
theme = 'dark'
} else {
theme = 'light'
theme = 'dark'
}
}
document.documentElement.setAttribute('data-theme', theme)

View file

@ -23,7 +23,7 @@ window.addEventListener('load', async () => {
function getPreferredColorScheme() {
const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;
return isDarkMode ? "dark" : "light";
return isDarkMode ? "dark" : "dark";
}
function setScheme(newScheme) {

View file

@ -0,0 +1,18 @@
---
title: "Sample Paper"
date: 2020-06-08T08:06:25+06:00
description: Introduction to Sample Post
menu:
sidebar:
name: Introduction
identifier: introduction
weight: 10
tags: ["Basic", "Multi-lingual"]
categories: ["Basic"]
---
Greeting! This is an introduction post. This post tests the followings:
- Hero image is in the same directory as the post.
- This post should be at top of the sidebar.
- Post author should be the same as specified in `author.yaml` file.

View file

@ -0,0 +1,104 @@
# section information
section:
name: Education
id: education
template: sections/education.html # Use "sections/education-alt.html for alternate template.
enable: true
weight: 2
showOnNavbar: true
# Can optionally hide the title in sections
# hideTitle: true
degrees:
- name: Ph.D in Quantum Cryptography
icon: fa-microscope
timeframe: 2016-2020
institution:
name: ABC University of Technology
url: "#"
logo: /images/sections/education/tech_college.png
# Can optionally show a different logo for dark theme
# darkLogo: /images/sections/education/tech_college.png
grade: #(optional)
scale: CGPA
achieved: 3.6
outOf: 4
publications: #(optional)
- title: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
url: "#"
- title: Fusce eu augue ut odio porttitor pulvinar.
url: "#"
- title: Nullam vitae orci tincidunt purus viverra pulvinar.
url: "#"
- name: B.Sc. in Computer Science & Engineering
icon: fa-graduation-cap
timeframe: 2012-2016
institution:
name: University of XYZ
url: "#"
logo: /images/sections/education/university.jpg
# Can optionally show a different logo for dark theme
# darkLogo: /images/sections/education/university.jpg
grade: #(optional)
scale: CGPA
achieved: 3.5
outOf: 4
takenCourses: #(optional)
# if true, the courses will be rendered as a table otherwise it will render as a list and the grades will be hidden.
showGrades: true
collapseAfter: 3
courses:
- name: Data Structures and Algorithm
achieved: 3.75
outOf: 4
- name: Network Security
achieved: 3.80
outOf: 4
- name: Operating System
achieved: 3.5
outOf: 4
- name: Artificial Intelligent
achieved: 3.75
outOf: 4
publications: #(optional)
- title: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
url: "#"
- title: Fusce eu augue ut odio porttitor pulvinar.
url: "#"
extracurricularActivities: #(optional)
- In vitae facilisis est, eget porta sem.
- Vestibulum consectetur lorem justo, at laoreet lorem feugiat et.
- Duis sed massa feugiat, ornare justo et, aliquam est.
- Pellentesque ut fringilla magna.
custonSections: #(optional)
- name: Thesis
content: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- name: Supervisor
content: Fusce eu augue ut odio porttitor pulvinar.
- name: Higher Secondary School Certificate
icon: fa-university
timeframe: 2010-2012
institution:
name: MST College of Science
url: "#"
logo: /images/sections/education/science_college.png
# Can optionally show a different logo for dark theme
# darkLogo: /images/sections/education/science_college.png
grade: #(optional)
scale: GPA
achieved: 5
outOf: 5
extracurricularActivities: #(optional)
- In vitae facilisis est, eget porta sem.
- Vestibulum consectetur lorem justo, at laoreet lorem feugiat et.
- Duis sed massa feugiat, ornare justo et, aliquam est.
- Pellentesque ut fringilla magna.
- name: Secondary School Certificate
icon: fa-school
timeframe: 2005-2010
institution:
name: JK School of Science
grade: #(optional)
scale: GPA
achieved: 4.5
outOf: 5

View file

@ -0,0 +1,73 @@
# section information
section:
name: Work Experience
id: experiences
enable: true
weight: 1
showOnNavbar: true
# Can optionally hide the title in sections
# hideTitle: true
# Your experiences
experiences:
- company:
name: Example Co.
url: "https://www.example.com"
location: Dhaka Branch
logo: /images/sections/experiences/company1.jpg
# Can optionally show a different logo for dark theme
# darkLogo: /images/sections/experiences/company1.jpg
# company overview
overview: Example Co. is a widely recognized company for cloud-native development. It builds tools for Kubernetes.
positions:
- designation: Senior Software Engineer
start: Nov 2019
# don't provide end date if you are currently working there. It will be replaced by "Present"
# end: Dec 2020
# give some points about what was your responsibilities at the company.
responsibilities:
- Design and develop XYZ tool for ABC task
- Design, develop and manage disaster recovery tool [Xtool](https://www.example.com) that backup Kubernetes volumes, databases, and cluster's resource definition.
- Lead backend team.
- designation: Junior Software Engineer
start: Nov 2017
end: Oct 2019
responsibilities:
- Implement and test xyz feature for abc tool.
- Support client for abc tool.
- Learn k,d,w technology for xyz.
- company:
name: PreExample Co.
url: "https://www.example.com"
location: Nowhere
logo: /images/sections/experiences/company2.jpg
# Can optionally show a different logo for dark theme
# darkLogo: /images/sections/experiences/company2.jpg
overview: PreExample Co. is a gateway company to enter into Example co. So, nothing special here.
positions:
- designation: Software Engineer
start: March 2016
end: May 2017
responsibilities:
- Write lots of example codes.
- Read lots of examples.
- See lots of example videos.
- company:
name: Intern Counting Company (ICC).
url: "https://www.example.com"
location: Intern Land
logo: /images/sections/experiences/company3.jpg
# Can optionally show a different logo for dark theme
# darkLogo: /images/sections/experiences/company3.jpg
overview: Intern counting Company (ICC) is responsible for counting worldwide intern Engineers.
positions:
- designation: Intern
start: Jun 2015
end: Jan 2016
responsibilities:
- Count lost of interns.
- Count more interns.
- Count me as an intern.

View file

@ -0,0 +1,38 @@
# section information
section:
name: Projects
id: projects
enable: true
weight: 0
showOnNavbar: true
# Can optionally hide the title in sections
hideTitle: false
# filter buttons
buttons:
- name: All
filter: "all"
- name: Professional
filter: "professional"
- name: Academic
filter: "academic"
- name: Hobby
filter: "hobby"
# your projects
projects:
- name: Kubernetes
logo: /images/sections/projects/kubernetes.png
role: Contributor
timeline: "March 2018 - Present"
repo: https://github.com/kubernetes/kubernetes # If your project is a public repo on GitHub, then provide this link. it will show star count.
#url: "" # If your project is not a public repo but it has a website or any external details url then provide it here. don't provide "repo" and "url" simultaneously.
summary: Production-Grade Container Scheduling and Management.
tags: ["professional", "kubernetes", "cloud"]
- name: A sample academic paper
role: Team Lead
timeline: "Jan 2017 - Nov 2017"
url: "https://www.example.com"
summary: Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente eius reprehenderit animi suscipit autem eligendi esse amet aliquid error eum. Accusantium distinctio soluta aliquid quas placeat modi suscipit eligendi nisi.
tags: ["academic","iot"]

View file

@ -1,72 +1,75 @@
<!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 }}
<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" . -}}
<!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}}
{{ with resources.Get "scripts/core/theme-scheme.js" | fingerprint }}
<script integrity="{{.Data.Integrity}}">
{ { .Content | safeJS } }
</script>
{{ end }}
</head>
<body data-bs-spy="scroll" data-bs-target="#top-navbar" data-bs-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-primary"}}
{{ 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 }}
<meta name="description" content="{{ $siteDescription }}" />
<!-- import common headers -->
{{- partial "header.html" . -}}
{{- partial "opengraph.html" . -}}
<!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}}
{{ with resources.Get "scripts/core/theme-scheme.js" | fingerprint }}
<script integrity="{{.Data.Integrity}}">
{{ .Content | safeJS }}
</script>
{{ end }}
</head>
<body data-bs-spy="scroll" data-bs-target="#top-navbar" data-bs-offset="100">
</div>
<!--- alter background color for next section --->
{{ if eq $background "bg-primary" }}
{{ $background = "bg-secondary" }}
{{ else }}
{{ $background = "bg-primary" }}
{{end}}
{{ end }}
{{ end }}
{{ end }}
<!--- NAVBAR ------------------------->
{{- partial "navigators/navbar.html" . -}}
<!--- ADD FOOTER ----------------------->
{{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
{{- partial $footerTemplate . -}}
<!--- ADD HOME SECTION ---------------->
{{- partial "sections/home.html" . -}}
<!--- ADD COMMON SCRIPTS --------------->
{{ partial "scripts.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 }}
<!------ ADD SUPPORT LINKS -------->
{{- partial "misc/support.html" . -}}
{{ if $sections }}
{{ $background:= "bg-primary"}}
{{ 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-primary" }}
{{ $background = "bg-secondary" }}
{{ else }}
{{ $background = "bg-primary" }}
{{end}}
{{ end }}
{{ end }}
{{ end }}
</body>
<!--- 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>
</html>

View file

@ -1,217 +1,200 @@
{{/* variables for enabling/disabling parts of the footer */}}
{{ $footerEnabled := site.Params.footer.enable | default true }}
{{ $navigationEnabled := site.Params.footer.navigation.enable | default true }}
{{/* variables for enabling/disabling parts of the footer */}}
{{ $footerEnabled := site.Params.footer.enable | default true }}
{{ $navigationEnabled := site.Params.footer.navigation.enable | default true }}
{{ $customMenusEnabled := site.Params.footer.navigation.customMenus | default true }}
{{ $contactMeEnabled := site.Params.footer.contactMe.enable | default true }}
{{ $newsletterEnabled := site.Params.footer.newsletter.enable | default true }}
{{ $contactMeEnabled := site.Params.footer.contactMe.enable | default true }}
{{ $newsletterEnabled := site.Params.footer.newsletter.enable | default true }}
{{ $credentialsEnabled := site.Params.footer.credentials.enable | default true }}
{{ $disclaimerEnabled := site.Params.footer.disclaimer.enable | default false }}
{{ $disclaimerEnabled := site.Params.footer.disclaimer.enable | default false }}
{{/* Keep backward compatibility for the newsletter function */}}
{{/* Keep backward compatibility for the newsletter function */}}
{{ if site.Params.newsletter }}
{{ if site.Params.newsletter.enable }}
{{ $newsletterEnabled = true }}
{{ else }}
{{ $newsletterEnabled = false }}
{{ end }}
{{ if site.Params.newsletter.enable }}
{{ $newsletterEnabled = true }}
{{ else }}
{{ $newsletterEnabled = false }}
{{ end }}
{{ end }}
{{ if $footerEnabled }}
{{ $author:= site.Data.author }}
{{ if (index site.Data site.Language.Lang).author }}
{{ $author = (index site.Data site.Language.Lang).author }}
{{ end }}
{{ $author:= site.Data.author }}
{{ if (index site.Data site.Language.Lang).author }}
{{ $author = (index site.Data site.Language.Lang).author }}
{{ end }}
{{ $sections:= site.Data.sections }}
{{ if (index site.Data site.Language.Lang).sections }}
{{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }}
{{ $sections:= site.Data.sections }}
{{ if (index site.Data site.Language.Lang).sections }}
{{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }}
{{ $customMenus := site.Params.customMenus }}
{{ if (index site.Data site.Language.Lang).site.customMenus }}
{{ $customMenus = (index site.Data site.Language.Lang).site.customMenus }}
{{ end }}
{{ $customMenus := site.Params.customMenus }}
{{ if (index site.Data site.Language.Lang).site.customMenus }}
{{ $customMenus = (index site.Data site.Language.Lang).site.customMenus }}
{{ end }}
{{ $copyrightNotice := now.Format "2006" | printf "© %s Copyright."}}
{{ if (index site.Data site.Language.Lang).site }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.copyright }}
{{ $copyrightNotice = $siteConfig.copyright }}
{{ end }}
{{ end }}
{{ $copyrightNotice := now.Format "2006" | printf "© %s Copyright."}}
{{ if (index site.Data site.Language.Lang).site }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.copyright }}
{{ $copyrightNotice = $siteConfig.copyright }}
{{ end }}
{{ end }}
{{ $disclaimer := "" }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.disclaimer }}
{{ $disclaimer = $siteConfig.disclaimer }}
{{ end }}
{{ $disclaimer := "" }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.disclaimer }}
{{ $disclaimer = $siteConfig.disclaimer }}
{{ end }}
{{/* footer logos */}}
{{ $themeLogo := "/images/theme-logo.png" }}
{{ $hugoLogo := "/images/hugo-logo.svg" }}
{{/* footer logos */}}
{{ $themeLogo := "/images/theme-logo.png" }}
{{ $hugoLogo := "/images/hugo-logo.svg" }}
{{/* resize the logos. don't resize svg because it is not supported */}}
{{ $themeLogo:= resources.Get $themeLogo}}
{{ if and $themeLogo (ne $themeLogo.MediaType.SubType "svg") }}
{{ $themeLogo = $themeLogo.Resize "32x" }}
{{ end }}
{{ $themeLogo = $themeLogo.RelPermalink}}
{{/* resize the logos. don't resize svg because it is not supported */}}
{{ $themeLogo:= resources.Get $themeLogo}}
{{ if and $themeLogo (ne $themeLogo.MediaType.SubType "svg") }}
{{ $themeLogo = $themeLogo.Resize "32x" }}
{{ end }}
{{ $themeLogo = $themeLogo.RelPermalink}}
{{ $hugoLogo:= resources.Get $hugoLogo}}
{{ if and $hugoLogo (ne $hugoLogo.MediaType.SubType "svg")}}
{{ $hugoLogo = $hugoLogo.Resize "32x" }}
{{ end }}
{{ $hugoLogo = $hugoLogo.RelPermalink}}
{{ $hugoLogo:= resources.Get $hugoLogo}}
{{ if and $hugoLogo (ne $hugoLogo.MediaType.SubType "svg")}}
{{ $hugoLogo = $hugoLogo.Resize "32x" }}
{{ end }}
{{ $hugoLogo = $hugoLogo.RelPermalink}}
<footer id="footer" class="container-fluid text-center align-content-center footer pb-2">
<div class="container pt-5">
<div class="row text-start">
{{ if $navigationEnabled }}
<div class="col-md-4 col-sm-12">
<h5>{{ i18n "navigation" }}</h5>
{{ if $sections }}
<ul>
{{- range sort $sections "section.weight" }}
{{ if and (.section.enable) (.section.showOnNavbar)}}
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ "" | absLangURL }}#{{ $sectionID }}">{{ .section.name }}</a>
</li>
{{ end }}
{{- end }}
{{ if $customMenusEnabled }}
{{ range $customMenus }}
{{ if .showOnFooter }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ .url }}">{{ .name }}</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
<footer id="footer" class="container-fluid text-center align-content-center footer pb-2">
<div class="container pt-5">
<div class="row text-start">
{{ if $navigationEnabled }}
<div class="col-md-4 col-sm-12">
<h5>{{ i18n "navigation" }}</h5>
{{ if $sections }}
<ul>
{{- range sort $sections "section.weight" }}
{{ if and (.section.enable) (.section.showOnNavbar)}}
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
</div>
<li class="nav-item">
<a class="smooth-scroll" href="{{ "" | absLangURL }}#{{ $sectionID }}">{{ .section.name }}</a>
</li>
{{ end }}
{{- end }}
{{ if $customMenusEnabled }}
{{ range $customMenus }}
{{ if .showOnFooter }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ .url }}">{{ .name }}</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
{{ end }}
{{ if (and $contactMeEnabled $author) }}
<div class="col-md-4 col-sm-12">
<h5>{{ i18n "contact_me" }}</h5>
<ul>
{{ range $key,$value:= $author.contactInfo }}
{{ 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 if (eq $key "researchgate") }}
<li><a href={{ printf "https://www.researchgate.net/profile/%s" $value }} target="_blank" rel="noopener">
<span><i class="fab fa-researchgate"></i></span> <span>{{ $author.name }}</span>
</a></li>
{{ else if reflect.IsMap $value }}
<li>
{{ if (and (isset $value "url") (isset $value "icon"))}}
<a href={{ $value.url }} target="_blank" rel="noopener">
<span><i class={{ printf "fab fa-%s" $value.icon }}></i></span> <span>{{ $value.text }}</span>
</a>
{{ else if isset $value "icon" }}
<span><i class={{ printf "fab fa-%s" $value.icon }}></i></span> <span>{{ $value.text }}</span>
{{ else }}
<a href={{ $value.url }} target="_blank" rel="noopener">
<span>{{ title $key }}: </span> <span>{{ $value.text }}</span>
</a>
{{ end }}
</li>
{{ else }}
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
<!-------------- Newsletter --------------->
{{ if $newsletterEnabled }}
{{ $provider := site.Params.footer.newsletter.provider }}
<div class="col-md-4 col-sm-12">
<p>{{ i18n "newsletter_text" }}</p>
{{ if and (eq $provider "mailchimp") site.Params.footer.newsletter.mailchimpURL }} <!-- mailchimp -->
<form
action="{{ site.Params.footer.newsletter.mailchimpURL }}"
method="post"
id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form"
class="validate"
target="_blank"
novalidate >
<div class="form-group">
<input
type="email"
class="form-control"
id="mce-EMAIL"
name="EMAIL"
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>
</div>
{{ end }}
{{ if (and $contactMeEnabled $author) }}
<div class="col-md-4 col-sm-12">
<h5>{{ i18n "contact_me" }}</h5>
<ul>
{{ range $key,$value:= $author.contactInfo }}
{{ 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 if (eq $key "researchgate") }}
<li><a href={{ printf "https://www.researchgate.net/profile/%s" $value }} target="_blank" rel="noopener">
<span><i class="fab fa-researchgate"></i></span> <span>{{ $author.name }}</span>
</a></li>
{{ else if reflect.IsMap $value }}
<li>
{{ if (and (isset $value "url") (isset $value "icon"))}}
<a href={{ $value.url }} target="_blank" rel="noopener">
<span><i class={{ printf "fab fa-%s" $value.icon }}></i></span> <span>{{ $value.text }}</span>
</a>
{{ else if isset $value "icon" }}
<span><i class={{ printf "fab fa-%s" $value.icon }}></i></span> <span>{{ $value.text }}</span>
{{ else }}
<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>
<a href={{ $value.url }} target="_blank" rel="noopener">
<span>{{ title $key }}: </span> <span>{{ $value.text }}</span>
</a>
{{ end }}
</li>
{{ else }}
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
<!-------------- Newsletter --------------->
{{ if $newsletterEnabled }}
{{ $provider := site.Params.footer.newsletter.provider }}
<div class="col-md-4 col-sm-12">
<p>{{ i18n "newsletter_text" }}</p>
{{ if and (eq $provider "mailchimp") site.Params.footer.newsletter.mailchimpURL }} <!-- mailchimp -->
<form action="{{ site.Params.footer.newsletter.mailchimpURL }}" method="post" id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div class="form-group">
<input type="email" class="form-control" id="mce-EMAIL" name="EMAIL" 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>
{{ else }}
<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>
{{ end }}
</div>
{{ if and $disclaimerEnabled $disclaimer}}
<hr />
<div class="container">
<p id="disclaimer"><strong>{{ i18n "disclaimer_text" }}:</strong> {{ $disclaimer | markdownify }}</p>
</div>
{{ end }}
{{ if $credentialsEnabled }}
<hr />
<div class="container">
<div class="row text-start">
<div class="col-md-4">
<a id="theme" href="https://github.com/hugo-toha/toha" target="_blank" rel="noopener">
<img src="{{ $themeLogo }}" alt="Toha Theme Logo">
Toha
</a>
</div>
<div class="col-md-4 text-center">{{ $copyrightNotice | markdownify }}</div>
<div class="col-md-4 text-end">
<a id="hugo" href="https://gohugo.io/" target="_blank" rel="noopener">{{ i18n "hugoAttributionText" }}
<img
src="{{ $hugoLogo }}"
alt="Hugo Logo"
height="18"
/>
</a>
</div>
</div>
{{ if and $disclaimerEnabled $disclaimer}}
<hr />
<div class="container">
<p id="disclaimer"><strong>{{ i18n "disclaimer_text" }}:</strong> {{ $disclaimer | markdownify }}</p>
</div>
{{ end }}
{{ if $credentialsEnabled }}
<hr />
<div class="container">
<div class="row text-start">
<div class="col-md-4">
<a id="theme" href="https://github.com/hugo-toha/toha" target="_blank" rel="noopener">
<img src="{{ $themeLogo }}" alt="Toha Theme Logo">
Toha
</a>
</div>
<div class="col-md-4 text-center">{{ $copyrightNotice | markdownify }}</div>
<div class="col-md-4 text-end">
<a id="hugo" href="https://gohugo.io/" target="_blank" rel="noopener">{{ i18n "hugoAttributionText" }}
<img src="{{ $hugoLogo }}" alt="Hugo Logo" height="18" />
</a>
</div>
</div>
{{ end }}
</footer>
{{end}}
</div>
{{ end }}
</footer>
{{end}}

View file

@ -1,31 +1,32 @@
{{/* variables for enabling/disabling various features */}}
{{ $darkEnabled := true }}
{{/* variables for enabling/disabling various features */}}
{{ $darkEnabled := true }}
{{ $lightEnabled := true }}
{{ if site.Params.features.theme.enable }}
{{ $darkEnabled = site.Params.features.theme.services.dark | default true }}
{{ $lightEnabled = site.Params.features.theme.services.light | default true }}
{{ $darkEnabled = site.Params.features.theme.services.dark | default true }}
{{ $lightEnabled = site.Params.features.theme.services.light | default true }}
{{ end }}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="themeSelector" role="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img id="navbar-theme-icon-svg" class="theme-icon" src="{{ "icons/moon-svgrepo-com.svg" | relURL }}" width=20 alt="Dark Theme">
</a>
<div id="themeMenu" class="dropdown-menu dropdown-menu-icons-only" aria-labelledby="themeSelector">
{{ if $lightEnabled }}
<a class="dropdown-item nav-link" href="#" data-scheme="light">
<img class="theme-icon" src="{{ "icons/sun-svgrepo-com.svg" | relURL }}" width=20 alt="Light Theme">
<a class="nav-link dropdown-toggle" href="#" id="themeSelector" role="button" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<img id="navbar-theme-icon-svg" class="theme-icon" src="{{ " icons/moon-svgrepo-com.svg" | relURL }}" width=20
alt="Dark Theme">
</a>
{{ end }}
{{ if $darkEnabled }}
<a class="dropdown-item nav-link" href="#" data-scheme="dark">
<img class="theme-icon" src="{{ "icons/moon-svgrepo-com.svg" | relURL }}" width=20 alt="Dark Theme">
</a>
{{ end }}
{{ if and $lightEnabled $darkEnabled }}
<a class="dropdown-item nav-link" href="#" data-scheme="system">
<img class="theme-icon" src="{{ "icons/computer-svgrepo-com.svg" | relURL }}" width=20 alt="System Theme">
</a>
{{ end }}
</div>
</li>
<div id="themeMenu" class="dropdown-menu dropdown-menu-icons-only" aria-labelledby="themeSelector">
{{ if $lightEnabled }}
<a class="dropdown-item nav-link" href="#" data-scheme="light">
<img class="theme-icon" src="{{ " icons/sun-svgrepo-com.svg" | relURL }}" width=20 alt="Light Theme">
</a>
{{ end }}
{{ if $darkEnabled }}
<a class="dropdown-item nav-link" href="#" data-scheme="dark">
<img class="theme-icon" src="{{ " icons/moon-svgrepo-com.svg" | relURL }}" width=20 alt="Dark Theme">
</a>
{{ end }}
{{ if and $lightEnabled $darkEnabled }}
<a class="dropdown-item nav-link" href="#" data-scheme="system">
<img class="theme-icon" src="{{ " icons/computer-svgrepo-com.svg" | relURL }}" width=20 alt="System Theme">
</a>
{{ end }}
</div>
</li>