Merge branch 'hugo-toha:main' into dev-config-recent-posts

This commit is contained in:
donfiguerres 2021-08-14 16:01:01 +08:00 committed by GitHub
commit 053286ebdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 422 additions and 193 deletions

View file

@ -17,7 +17,7 @@ categories:
- 'feature'
- 'enhancement'
- title: 'New Translations'
- title: 'Translations'
label: 'translation'
- title: 'Bug Fixes'

View file

@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v2.3.4
- name: Setup Node
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: "15.x"

View file

@ -10,4 +10,4 @@ jobs:
# checkout to latest commit
- uses: actions/checkout@master
# run markdown linter
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.12
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13

View file

@ -30,7 +30,7 @@ other = "ইমেইল নোটিফিকেশান এর মাধ্
other = "ইমেইল প্রবেশ করান"
[newsletter_warning]
other = "আমরা আপনার ইমেল অন্য কারও সাথে শেয়ার করব না।"
other = "আপনার ইমেইল ঠিকানা প্রবেশের মাধমে আপনি এই ওয়েবসাইটের নিউজ লেটার পেতে সম্মত হচ্ছেন।"
[submit]
other = "জমা দিন"

View file

@ -33,7 +33,7 @@ other = "Mit dem Newsletter auf dem neuesten Stand bleiben"
other = "E-Mail Adresse eingeben"
[newsletter_warning]
other = "Wir geben deine E-Mail Adresse nicht an Dritte weiter."
other = "Mit der Eingabe Ihrer E-Mail-Adresse erklären Sie sich damit einverstanden, den Newsletter dieser Website zu erhalten."
[submit]
other = "Absenden"

View file

@ -33,7 +33,7 @@ other = "Stay up to date with email notification"
other = "Enter email"
[newsletter_warning]
other = "We'll never share your email with anyone else."
other = "By entering your email address, you agree to receive the newsletter of this website."
[submit]
other = "Submit"

View file

@ -33,7 +33,7 @@ other = "Subscribirse"
other = "Ingrese email"
[newsletter_warning]
other = "Jamás compartiremos tus datos con alguién mas"
other = "Al ingresar su dirección de correo electrónico, acepta recibir el boletín de este sitio web."
[submit]
other = "Enviar"

View file

@ -3,7 +3,7 @@
other = "Accueil"
[posts]
other = "Des postes"
other = "Articles"
[toc_heading]
other = "Table des matières"
@ -33,7 +33,7 @@ other = "Restez à jour par e-mail"
other = "Entrez une adresse e-mail"
[newsletter_warning]
other = "Nous ne partagerons jamais votre courriel avec quelqu'un d'autre."
other = "En renseignant votre adresse e-mail, vous acceptez de recevoir la newsletter de ce site."
[submit]
other = "Envoyer"
@ -89,8 +89,8 @@ other = "Montrer moins"
# [comments_by]
# other = "comments powered by"
# [read]
# other = "Read"
[read]
other = "Lire"
# [project_star]
# other = "Star"

View file

@ -33,7 +33,7 @@ other = "ईमेल अधिसूचना से अवगत रहें"
other = "ईमेल दर्ज करें"
[newsletter_warning]
other = "हम आपके ईमेल को कभी भी किसी और के साथ साझा नहीं करेंगे"
other = "अपना ईमेल पता दर्ज करके, आप इस वेबसाइट का न्यूज़लेटर प्राप्त करने के लिए सहमत होते हैं।"
[submit]
other = "जमा करें"

View file

@ -33,7 +33,7 @@ other = "Ingin selalu update dengan notifikasi email"
other = "Masukkan email"
[newsletter_warning]
other = "Kami tidak pernah berbagi data email dengan siapapun."
other = "Dengan memasukkan alamat email Anda, Anda setuju untuk menerima buletin situs web ini."
[submit]
other = "Kirim"

View file

@ -33,7 +33,7 @@ other = "Resta aggiornato con la notifica di email"
other = "Inserisci l'email"
[newsletter_warning]
other = "Non condivideremo l'email con altri."
other = "Inserendo il tuo indirizzo email, accetti di ricevere la newsletter di questo sito."
[submit]
other = "Invia"

View file

@ -30,7 +30,7 @@ other = "メールで最新情報を受け取る"
other = "ここにメールアドレスを入力"
[newsletter_warning]
other = "ご入力いただいたメールアドレスが他人に開示されることは決してございません。"
other = "メールアドレスを入力すると、このウェブサイトのニュースレターを受け取ることに同意したことになります。"
[submit]
other = "登録"

View file

@ -33,7 +33,7 @@ other = "이메일 알림으로 최신 상태를 유지해보세요"
other = "이메일을 입력하세요"
[newsletter_warning]
other = "이메일을 다른 목적으로 사용하지 않습니다."
other = "이메일 주소를 입력하면이 웹 사이트의 뉴스 레터 수신에 동의하는 것입니다."
[submit]
other = "제출"

View file

@ -32,7 +32,7 @@ other = "Mit dem Newsletter auf dem neuesten Stand bleiben"
other = "E-Mail-Adresse eingeben"
[newsletter_warning]
other = "Wir werden Ihre E-Mail-Adresse nicht an Dritte weitergeben."
other = "Door uw e-mailadres in te voeren, gaat u akkoord met het ontvangen van de nieuwsbrief van deze website."
[submit]
other = "Absenden"

View file

@ -33,7 +33,7 @@ other = "Подпишитесь на уведомления, чтобы не п
other = "Введите email"
[newsletter_warning]
other = "Ваши данные в безопасности"
other = "Вводя свой адрес электронной почты, вы соглашаетесь получать информационный бюллетень этого веб-сайта."
[submit]
other = "Подтвердить"

View file

@ -33,7 +33,7 @@ other = "Nhận email cập nhật thông tin"
other = "Nhập email"
[newsletter_warning]
other = "Chúng tôi sẽ không bao giờ chia sẻ email của bạn."
other = "Bằng cách nhập địa chỉ email của bạn, bạn đồng ý nhận bản tin của trang web này."
[submit]
other = "Gửi"

View file

@ -33,7 +33,7 @@ other = "通过电子邮件接收最新信息"
other = "填入 E-mail"
[newsletter_warning]
other = "我们绝不会与任何人共享您的电子邮件。"
other = "输入您的电子邮件地址,即表示您同意接收本网站的时事通讯"
[submit]
other = "提交"
@ -77,29 +77,29 @@ other = "查看更多"
[show_less]
other = "显示较少"
# [responsibilities]
# other = "Responsibilities:"
[responsibilities]
other = "职责:"
# [present]
# other = "Present"
[present]
other = "至今"
# [comments_javascript]
# other = "Please enable JavaScript to view the"
[comments_javascript]
other = "请启用 JavaScript 以查看"
# [comments_by]
# other = "comments powered by"
[comments_by]
other = "评论支持 by"
# [read]
# other = "Read"
[read]
other = "阅读"
# [project_star]
# other = "Star"
[project_star]
other = "Star"
# [project_details]
# other = "Details"
[project_details]
other = "详情"
# [err_404]
# other = "The page you are looking for is not there yet."
[err_404]
other = "您查找的页面已私奔。"
[more]
other = "更多的"
@ -111,4 +111,4 @@ other = "查看证书"
other = "笔记"
[disclaimer_text]
other = "责任通知"
other = "免责声明"

114
i18n/zh-tw.toml Normal file
View file

@ -0,0 +1,114 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "首頁"
[posts]
other = "文章"
[toc_heading]
other = "目錄"
[at]
other = "at"
[resume]
other = "履歷"
[navigation]
other = "導覽列"
[contact_me]
other = "聯絡方式:"
[email]
other = "信箱"
[phone]
other = "電話"
[newsletter_text]
other = "通過電子郵件接收最新消息"
[newsletter_input_placeholder]
other = "在此輸入您的電子郵件地址"
[newsletter_warning]
other = "輸入您的電子郵件地址,即表示您同意接受本網站的最新消息"
[submit]
other = "提交"
[hugoAttributionText]
other = "Powered by"
[prev]
other = "上一篇"
[next]
other = "下一篇"
[improve_this_page]
other = "改善此頁面"
[out_of]
other = "/"
[publications]
other = "出版"
[taken_courses]
other = "修習課程"
[course_name]
other = "課程名稱"
[total_credit]
other = "總分"
[obtained_credit]
other = "獲得學分"
[extracurricular_activities]
other = "課外活動"
[show_more]
other = "查看更多"
[show_less]
other = "顯示較少"
# [responsibilities]
# other = "Responsibilities:"
# [present]
# other = "Present"
# [comments_javascript]
# other = "Please enable JavaScript to view the"
# [comments_by]
# other = "comments powered by"
# [read]
# other = "Read"
# [project_star]
# other = "Star"
# [project_details]
# other = "Details"
# [err_404]
# other = "The page you are looking for is not there yet."
[more]
other = "更多的"
[view_certificate]
other = "查看證書"
[notes]
other = "筆記"
[disclaimer_text]
other = "免責聲明"

View file

@ -4,13 +4,20 @@
<title>{{ .Page.Title }}</title>
<!------ ADD COMMON HEADERS -------->
{{- partial "header.html" . -}}
{{ template "_internal/opengraph.html" . }}
<!------ ADD PAGE SPECIFIC HEADERS ------->
{{ block "header" . }} {{ end }}
<!-- ADD GOOGLE ANALYTICS IF ENABLED -->
{{ if site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
<!-- Google Analytics v3 ID -->
{{ if hasPrefix site.GoogleAnalytics "UA-"}}
{{ template "_internal/google_analytics_async.html" . }}
{{ else }}
<!-- Google Analytics v4 ID -->
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ end }}
</head>

View file

@ -1,6 +1,9 @@
{{ define "header" }}
<link rel="stylesheet" href="{{ "/css/layouts/list.css" | relURL }}">
<link rel="stylesheet" href="{{ "/css/navigators/sidebar.css" | relURL}}">
<!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
{{ end }}
{{ define "navbar" }}

View file

@ -1,6 +1,9 @@
{{ define "header" }}
<link rel="stylesheet" href="{{ "/css/layouts/list.css" | relURL }}">
<link rel="stylesheet" href="{{ "/css/navigators/sidebar.css" | relURL}}">
<!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
{{ end }}
{{ define "navbar" }}

View file

@ -6,6 +6,9 @@
/>
<link rel="stylesheet" href="{{ "/css/layouts/single.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/navigators/sidebar.css" | relURL }}">
<!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
{{ end }}
{{ define "navbar" }}

View file

@ -13,6 +13,7 @@
<!-- import common headers -->
{{- partial "header.html" . -}}
{{- partial "opengraph.html" . -}}
<!-- import index page specific headers -->
<link rel="stylesheet" href="{{ "/css/sections/home.css" | relURL }}"/>
@ -25,9 +26,18 @@
<link rel="stylesheet" href="{{ "/css/sections/achievements.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/accomplishments.css" | relURL }}"/>
<!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
<!-- Add Google Analytics if enabled in configuration -->
{{ if site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
<!-- Google Analytics v3 ID -->
{{ if hasPrefix site.GoogleAnalytics "UA-"}}
{{ template "_internal/google_analytics_async.html" . }}
{{ else }}
<!-- Google Analytics v4 ID -->
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ end }}
</head>
<body data-spy="scroll" data-target="#top-navbar" data-offset="100">

View file

@ -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 }}

View file

@ -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 }}" />

View file

@ -137,7 +137,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 }}

View file

@ -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,7 +5,6 @@
<!-- ============ 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 }}"/>
@ -30,7 +14,16 @@
<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}}

View file

@ -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 }}

View 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}}

View file

@ -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>

View file

@ -7,11 +7,11 @@
{{ $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 +20,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 +49,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
@ -119,6 +125,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>

View file

@ -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>

View 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 }}">

View file

@ -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">

View file

@ -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>

81
package-lock.json generated
View file

@ -8,8 +8,8 @@
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"autoprefixer": "^10.2.5",
"postcss": "^8.3.0",
"autoprefixer": "^10.3.1",
"postcss": "^8.3.6",
"postcss-cli": "^8.3.1"
}
},
@ -195,15 +195,15 @@
}
},
"node_modules/autoprefixer": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.5.tgz",
"integrity": "sha512-7H4AJZXvSsn62SqZyJCP+1AWwOuoYpUfK6ot9vm0e87XD6mT8lDywc9D9OTJPMULyGcvmIxzTAMeG2Cc+YX+fA==",
"version": "10.3.1",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.3.1.tgz",
"integrity": "sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A==",
"dev": true,
"dependencies": {
"browserslist": "^4.16.3",
"caniuse-lite": "^1.0.30001196",
"browserslist": "^4.16.6",
"caniuse-lite": "^1.0.30001243",
"colorette": "^1.2.2",
"fraction.js": "^4.0.13",
"fraction.js": "^4.1.1",
"normalize-range": "^0.1.2",
"postcss-value-parser": "^4.1.0"
},
@ -212,6 +212,13 @@
},
"engines": {
"node": "^10 || ^12 || >=14"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
"peerDependencies": {
"postcss": "^8.1.0"
}
},
"node_modules/binary-extensions": {
@ -264,10 +271,14 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001228",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz",
"integrity": "sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==",
"dev": true
"version": "1.0.30001243",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001243.tgz",
"integrity": "sha512-vNxw9mkTBtkmLFnJRv/2rhs1yufpDfCkBZexG3Y0xdOH2Z/eE/85E4Dl5j1YUN34nZVsSp6vVRFQRrez9wJMRA==",
"dev": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
}
},
"node_modules/chalk": {
"version": "4.1.1",
@ -453,12 +464,16 @@
}
},
"node_modules/fraction.js": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.0.tgz",
"integrity": "sha512-o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz",
"integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==",
"dev": true,
"engines": {
"node": "*"
},
"funding": {
"type": "patreon",
"url": "https://www.patreon.com/infusion"
}
},
"node_modules/fs-extra": {
@ -834,9 +849,9 @@
}
},
"node_modules/postcss": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.0.tgz",
"integrity": "sha512-+ogXpdAjWGa+fdYY5BQ96V/6tAo+TdSSIMP5huJBIygdWwKtVoB5JWZ7yUd4xZ8r+8Kvvx4nyg/PQ071H4UtcQ==",
"version": "8.3.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz",
"integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==",
"dev": true,
"dependencies": {
"colorette": "^1.2.2",
@ -1272,15 +1287,15 @@
"dev": true
},
"autoprefixer": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.5.tgz",
"integrity": "sha512-7H4AJZXvSsn62SqZyJCP+1AWwOuoYpUfK6ot9vm0e87XD6mT8lDywc9D9OTJPMULyGcvmIxzTAMeG2Cc+YX+fA==",
"version": "10.3.1",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.3.1.tgz",
"integrity": "sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A==",
"dev": true,
"requires": {
"browserslist": "^4.16.3",
"caniuse-lite": "^1.0.30001196",
"browserslist": "^4.16.6",
"caniuse-lite": "^1.0.30001243",
"colorette": "^1.2.2",
"fraction.js": "^4.0.13",
"fraction.js": "^4.1.1",
"normalize-range": "^0.1.2",
"postcss-value-parser": "^4.1.0"
}
@ -1320,9 +1335,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001228",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz",
"integrity": "sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==",
"version": "1.0.30001243",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001243.tgz",
"integrity": "sha512-vNxw9mkTBtkmLFnJRv/2rhs1yufpDfCkBZexG3Y0xdOH2Z/eE/85E4Dl5j1YUN34nZVsSp6vVRFQRrez9wJMRA==",
"dev": true
},
"chalk": {
@ -1477,9 +1492,9 @@
}
},
"fraction.js": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.0.tgz",
"integrity": "sha512-o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz",
"integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==",
"dev": true
},
"fs-extra": {
@ -1770,9 +1785,9 @@
"dev": true
},
"postcss": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.0.tgz",
"integrity": "sha512-+ogXpdAjWGa+fdYY5BQ96V/6tAo+TdSSIMP5huJBIygdWwKtVoB5JWZ7yUd4xZ8r+8Kvvx4nyg/PQ071H4UtcQ==",
"version": "8.3.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz",
"integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==",
"dev": true,
"requires": {
"colorette": "^1.2.2",

View file

@ -17,8 +17,8 @@
},
"homepage": "https://github.com/hossainemruz/toha#readme",
"devDependencies": {
"autoprefixer": "^10.2.5",
"postcss": "^8.3.0",
"autoprefixer": "^10.3.1",
"postcss": "^8.3.6",
"postcss-cli": "^8.3.1"
}
}

View file

@ -432,16 +432,29 @@ mark {
code {
padding: 0px;
}
h1 {
font-size: 2.2rem;
}
}
/* iPhoneX, iPhone 6,7,8 */
@media only screen and (max-width: 375px) {
h1 {
font-size: 2rem;
}
}
/* Galaxy S5, Moto G4 */
@media only screen and (max-width: 360px) {
h1 {
font-size: 1.8rem;
}
}
/* iPhone 5 or before */
@media only screen and (max-width: 320px) {
h1 {
font-size: 1.5rem;
}
}

View file

@ -496,11 +496,24 @@
.about-section.container {
max-width: 100%;
}
.circular-progress {
width: 135px;
height: 135px;
}
}
/* Small devices (landscape phones, 576px and up) */
@media only screen and (max-width: 576px) {
.circular-progress {
width: 150px;
height: 150px;
}
.circular-progress .circular-progress-value {
font-size: 1rem;
}
}
/* iPhoneX, iPhone 6,7,8 */
@ -513,4 +526,12 @@
/* iPhone 5 or before */
@media only screen and (max-width: 320px) {
.col-6 {
flex: auto;
max-width: 100%;
}
.social-link {
flex-wrap: wrap;
}
}

View file

@ -36,7 +36,7 @@
}
.education-section .education-info-table tr:first-child .hline {
height: 60%;
height: 65%;
top: auto;
}

View file

@ -45,7 +45,7 @@
margin-bottom: 10px;
}
.home .greeting {
.home .greeting, .home .greeting-subtitle {
color: #f9fafc;
}

View file

@ -19,6 +19,7 @@
.skills-section .card {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
height: 100%;
}
.skills-section .card .card-body {
@ -57,7 +58,7 @@
padding-right: 0;
}
.skills-section .container {
max-width: 100%;
max-width: 95%;
}
}

View file

@ -63,28 +63,6 @@ var projectCards;
}
}
// ==================== Adjust height of the skills card =============
function adjustSkillCardsHeight() {
if (!isMobile) { // no need to adjust height for mobile devices
// primary skills
var skillCards = document.getElementById("primary-skills");
if (skillCards != null) {
var cardElems = skillCards.getElementsByClassName("card");
var maxHeight = 0;
for (let i = 0; i < cardElems.length; i++) {
if (cardElems.item(i).clientHeight > maxHeight) {
maxHeight = cardElems.item(i).clientHeight;
}
}
for (let i = 0; i < cardElems.length; i++) {
cardElems.item(i).setAttribute("style", "min-height: " + maxHeight + "px;");
}
}
}
}
$(window).on("load", function () {
adjustSkillCardsHeight();
});
// ================== Project cards =====================
// Add click action on project category selector buttons
@ -331,13 +309,13 @@ var projectCards;
this.parentElement.classList.toggle("col-sm-12");
if (this.children["SmallImage"].hasAttribute("active")) {
let mainLogo = this.children["LargeImage"].getAttribute("Style");
this.children["LargeImage"].setAttribute("active",true);
this.children["LargeImage"].setAttribute("active", true);
this.children["SmallImage"].removeAttribute("active");
this.setAttribute("Style", mainLogo);
} else {
let mainLogo = this.children["SmallImage"].getAttribute("Style");
this.children["SmallImage"].setAttribute("active",true);
this.children["SmallImage"].setAttribute("active", true);
this.children["LargeImage"].removeAttribute("active");
this.setAttribute("Style", mainLogo);
}

View file

@ -16,8 +16,12 @@
$('#navbar-toggler').addClass('navbar-light');
// get the main logo from hidden img tag
let mainLogo = document.getElementById("main-logo").getAttribute("src");
$('#logo').attr("src", mainLogo);
let mainLogo = document.getElementById("main-logo")
if (mainLogo !== null) {
let logoURL = mainLogo.getAttribute("src");
$('#logo').attr("src", logoURL);
}
} else {
$('#top-navbar').removeClass('final-navbar shadow');
$('#top-navbar').addClass('initial-navbar');
@ -26,8 +30,11 @@
$('#navbar-toggler').addClass('navbar-dark');
// get the inverted logo from hidden img tag
let invertedLogo = document.getElementById("inverted-logo").getAttribute("src");
$('#logo').attr("src", invertedLogo);
let invertedLogo = document.getElementById("inverted-logo")
if (invertedLogo !== null) {
let logoURL = invertedLogo.getAttribute("src");
$('#logo').attr("src", logoURL);
}
}
});