Compare commits

..

3 commits

Author SHA1 Message Date
Emruz Hossain
7691a4692e
Merge branch 'main' into html-proof 2024-01-01 14:58:37 +06:00
hossainemruz
b22c606137 Ignore # URL
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2024-01-01 13:33:20 +06:00
hossainemruz
0a84f2773a Add HTML proofer action
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2024-01-01 13:33:20 +06:00
126 changed files with 1483 additions and 4798 deletions

View file

@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout to latest commit - name: Checkout to latest commit
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.1.1
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20.x" node-version: "15.x"
- name: Run autoprefixer - name: Run autoprefixer
run: | run: |
@ -21,7 +21,7 @@ jobs:
npm run autoprefixer npm run autoprefixer
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v5
with: with:
branch: autoprefixer branch: autoprefixer
branch-suffix: timestamp branch-suffix: timestamp

View file

@ -39,7 +39,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.1.1
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View file

@ -1,16 +0,0 @@
name: Label Enforcer
# Run action on pull request creation, reopening, or label changes
on:
pull_request:
types: [opened, reopened, labeled, unlabeled]
jobs:
# Ensure that PR has desired labels
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/enforce-label-action@2.2.2
with:
REQUIRED_LABELS_ANY: "automerge,breaking-change,bug-fix,enhancement,feature,translation"
REQUIRED_LABELS_ANY_DESCRIPTION: "The PR must have at least one these labels: ['automerge','breaking-change','bug-fix','enhancement','feature','translation']"

View file

@ -10,6 +10,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Create/Update release draft # Create/Update release draft
- uses: release-drafter/release-drafter@v6.1.0 - uses: release-drafter/release-drafter@v5.25.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -10,18 +10,18 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# checkout to the commit that has been pushed # checkout to the commit that has been pushed
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.1.1
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 18
- name: Install node modules - name: Install node modules
run: npm install run: npm install
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v3.0.0 uses: peaceiris/actions-hugo@v2.6.0
with: with:
hugo-version: 'latest' hugo-version: 'latest'
extended: true extended: true
@ -35,12 +35,12 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.1.1
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 18
- name: Install node modules - name: Install node modules
run: npm install run: npm install
@ -62,7 +62,7 @@ jobs:
NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}} NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}}
- name: Run Lighthouse - name: Run Lighthouse
uses: foo-software/lighthouse-check-action@v12.0.1 uses: foo-software/lighthouse-check-action@v10.0.0
id: lighthouseCheck id: lighthouseCheck
with: with:
accessToken: ${{ secrets.LIGHTHOUSE_TOKEN }} accessToken: ${{ secrets.LIGHTHOUSE_TOKEN }}
@ -73,11 +73,52 @@ jobs:
timeout: 5 timeout: 5
urls: "${{ steps.preview.outputs.url }},${{ steps.preview.outputs.url }}/posts/,${{ steps.preview.outputs.url }}/posts/markdown-sample/,${{ steps.preview.outputs.url }}/posts/shortcodes/" urls: "${{ steps.preview.outputs.url }},${{ steps.preview.outputs.url }}/posts/,${{ steps.preview.outputs.url }}/posts/markdown-sample/,${{ steps.preview.outputs.url }}/posts/shortcodes/"
# Ensure that PR has desired labels
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/enforce-label-action@2.2.2
with:
REQUIRED_LABELS_ANY: "automerge,breaking-change,bug-fix,enhancement,feature,translation"
REQUIRED_LABELS_ANY_DESCRIPTION: "The PR must have at least one these labels: ['automerge','breaking-change','bug-fix','enhancement','feature','translation']"
# Check for any broken links # Check for any broken links
markdown-link-check: markdown-link-check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# checkout to latest commit # checkout to latest commit
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.1.1
# run markdown linter # run markdown linter
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.17 - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
proof-html:
runs-on: ubuntu-latest
steps:
# checkout to the commit that has been pushed
- uses: actions/checkout@v4.1.1
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install node modules
run: npm install
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: 'latest'
extended: true
- name: Build
run: |
cd exampleSite
hugo --minify
# Run HTML Proofer
- uses: anishathalye/proof-html@v2.1.2
with:
directory: exampleSite/public
enforce_https: false
ignore_url: "#"

100
README.md
View file

@ -1,6 +1,3 @@
> [!IMPORTANT]
> If you are migrating from v3 (`git submodule` based) theme to v4 (`hugo modules` based) theme, please read this [migration guide](https://toha-guides.netlify.app/posts/update-v3-to-v4/).
# Toha # Toha
[![Netlify Status](https://api.netlify.com/api/v1/badges/b1b93b02-f278-440b-ae1b-304e9f4c4ab5/deploy-status)](https://app.netlify.com/sites/toha/deploys) [![Netlify Status](https://api.netlify.com/api/v1/badges/b1b93b02-f278-440b-ae1b-304e9f4c4ab5/deploy-status)](https://app.netlify.com/sites/toha/deploys)
@ -38,7 +35,6 @@ A [Hugo](https://gohugo.io/) theme for a personal portfolio with minimalist desi
- counter.dev - counter.dev
- Google Analytics - Google Analytics
- Matomo/Piwik - Matomo/Piwik
- [Umami](https://umami.is/)
- Comment Support - Comment Support
- [Disqus](https://disqus.com/) - [Disqus](https://disqus.com/)
- [Valine](https://valine.js.org/) - [Valine](https://valine.js.org/)
@ -56,7 +52,6 @@ For more details about the features please visit [here](https://toha-guides.netl
- Deutsch - Deutsch
- Español - Español
- 简体中文 - 简体中文
- 繁體中文
- हिन्दी - हिन्दी
- Italiano - Italiano
- 日本語 - 日本語
@ -64,14 +59,11 @@ For more details about the features please visit [here](https://toha-guides.netl
- русский - русский
- suomi - suomi
- Tiếng Việt - Tiếng Việt
- Azerbaijan
- Turkish - Turkish
- Arabic (العربية) - Arabic (العربية)
- Português Europeu - Português Europeu
- Català - Català
- Português Brasileiro - Português Brasileiro
- Nederlands
- Hebrew
To know more about how to translate your site, please visit [here](https://toha-guides.netlify.app/posts/translation/). Follow, the data and post format from this [example site](https://hugo-toha.github.io). To know more about how to translate your site, please visit [here](https://toha-guides.netlify.app/posts/translation/). Follow, the data and post format from this [example site](https://hugo-toha.github.io).
@ -93,7 +85,7 @@ Here are few screenshots from the [example site](https://hugo-toha.github.io).
## Requirements ## Requirements
- Hugo Version 0.128.0 (extended) or higher - Hugo Version 0.118.0 (extended) or higher
- Go language 1.18 or higher (require for hugo modules) - Go language 1.18 or higher (require for hugo modules)
- Node version v18.x or later and npm 8.x or later. - Node version v18.x or later and npm 8.x or later.
@ -113,7 +105,7 @@ hugo mod init github.com/<your username>/<your repo name>
##### 2. Add this theme as your module dependency ##### 2. Add this theme as your module dependency
Now, in your `hugo.yaml` file, add a `module` section. Now, in your `config.yaml` file, add a `module` section.
```yaml ```yaml
# Use Hugo modules to add theme # Use Hugo modules to add theme
@ -122,7 +114,7 @@ module:
- path: github.com/hugo-toha/toha/v4 - path: github.com/hugo-toha/toha/v4
``` ```
Check this sample [hugo.yaml](https://github.com/hugo-toha/hugo-toha.github.io/blob/main/hugo.yaml) for further reference. Check this sample [config.yaml](https://github.com/hugo-toha/hugo-toha.github.io/blob/main/config.yaml) for further reference.
##### 3. Update your module ##### 3. Update your module
@ -193,72 +185,34 @@ For local development, you can make changes in the theme submodule and test the
At first, fork [this repo](https://github.com/hugo-toha/toha). Then, follow the following steps to use the forked theme for local developments, At first, fork [this repo](https://github.com/hugo-toha/toha). Then, follow the following steps to use the forked theme for local developments,
#### Running the forked theme against the example site **Using the forked theme in your own site:**
If you want to run your local development against your own site, follow the following steps:
```bash
# add the original theme as a submodule of your site if you haven't done already
$ git submodule add https://github.com/hugo-toha/toha.git themes/toha
# navigate into the toha theme folder
$ cd themes/toha
# add your own fork as a remote
$ git remote add my-fork https://github.com/<your-github-user>/toha
# create a new branch for your changes
$ git checkout -b my-feature-branch
```
**Using the forked theme in the example site:**
If your want to run your local development against this [example site](https://github.com/hugo-toha/hugo-toha.github.io), follow the following steps: If your want to run your local development against this [example site](https://github.com/hugo-toha/hugo-toha.github.io), follow the following steps:
```bash ```bash
# go to exampleSite directory # clone the example site along with the submodules
$ cd exampleSite $ git clone git@github.com:hugo-toha/hugo-toha.github.io.git --recursive
# install hugo modules # navigate into the toha theme folder
$ hugo mod tidy $ cd themes/toha
# install dependencies # add your own fork as a remote
$ hugo mod npm pack $ git remote add my-fork https://github.com/<your-github-user>/toha
$ npm install # create a new branch for your changes
# run the example site locally $ git checkout -b my-feature-branch
$ hugo server -w
```
Now, you can make change in the theme and they will be reflected immediately on the running site. If you need to change any configuration, you can do that in the `hugo.yaml` file inside `exampleSite` folder. If you need to add any content or data, you can create the respective folder inside `exampleSite` directory and add your desired content or data there.
#### Running the forked theme against your own site
If you want to run your local development against your own site, follow the following steps:
**Replace the theme module:**
Open your site's `go.mod` file and replace the `github.com/hugo-toha/toha/v4` with your forked repo's path. For example, if your forked repo is `github.com/<your-github-user>/toha`, then replace the `github.com/hugo-toha/toha/v4` with `github.com/<your-github-user>/toha/v4`.
```go
module github.com/hugo-toha/hugo-toha.github.io
go 1.19
require github.com/hugo-toha/toha/v4 v4.0.1-0.20231229170427-d3968ca711ef // indirect
replace(
github.com/hugo-toha/toha/v4 => github.com/<your-github-user>/toha/v4 <git branch>
)
```
For interactive development, you can replace the theme with your locally cloned fork. For example, if you have cloned your fork in `/home/my-projects/toha`, then replace the `github.com/hugo-toha/toha/v4` with `/home/my-projects/toha`.
```go
module github.com/hugo-toha/hugo-toha.github.io
go 1.19
require github.com/hugo-toha/toha/v4 v4.0.1-0.20231229170427-d3968ca711ef // indirect
replace(
github.com/hugo-toha/toha/v4 => /home/my-projects/toha
)
```
**Update dependencies:**
```bash
# update hugo modules
$ hugo mod tidy
# install dependencies
$ hugo mod npm pack
$ npm install
```
**Run your site locally:**
```bash
$ hugo server -w
``` ```
From there you can make changes to the source code of the theme while testing with your running Hugo site or the example site. From there you can make changes to the source code of the theme while testing with your running Hugo site or the example site.

View file

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

View file

@ -1,22 +0,0 @@
addCopyButtons(navigator.clipboard)
function addCopyButtons(clipboard) {
document.querySelectorAll('pre > code').forEach(function (codeBlock) {
const button = document.createElement('button')
button.title = "Copy"
button.className = 'copy-code-button btn btn-sm'
button.innerHTML = "<i class='fa-regular fa-copy'></i>"
button.addEventListener('click', function () {
clipboard.writeText(codeBlock.innerText)
})
const pre = codeBlock.parentNode
if (pre.parentNode.classList.contains('highlight')) {
const highlight = pre.parentNode
highlight.parentNode.insertBefore(button, highlight)
} else {
pre.parentNode.insertBefore(button, pre)
}
})
}

View file

@ -1 +0,0 @@
import './copyCode'

View file

@ -39,8 +39,6 @@ window.addEventListener('load', async () => {
// save preference to local storage // save preference to local storage
saveScheme(newScheme) saveScheme(newScheme)
setImages(theme)
} }
setScheme(loadScheme()) setScheme(loadScheme())
@ -52,19 +50,3 @@ window.addEventListener('load', async () => {
}) })
}) })
}) })
function setImages(newScheme) {
const els = Array.from(document.getElementsByClassName('logo-holder'));
for (const el of els) {
const light = el.querySelector('.light-logo');
const dark = el.querySelector('.dark-logo');
if (newScheme === "dark" && dark !== null) {
if (light !== null) light.style.display = 'none'
dark.style.display = 'inline'
}
else {
if (light !== null) light.style.display = 'inline'
if (dark !== null) dark.style.display = 'none'
}
}
}

View file

@ -10,10 +10,6 @@ if (process.env.FEATURE_DARKMODE === '1') {
import('./darkmode') import('./darkmode')
} }
if (process.env.FEATURE_THEME === '1') {
import('./theme')
}
if (process.env.FEATURE_FLOWCHART === '1') { if (process.env.FEATURE_FLOWCHART === '1') {
import('./flowchart') import('./flowchart')
} }
@ -29,7 +25,3 @@ if (process.env.FEATURE_MATH === '1') {
if (process.env.FEATURE_EMBEDPDF === '1') { if (process.env.FEATURE_EMBEDPDF === '1') {
import('./embedpdf') import('./embedpdf')
} }
if (process.env.FEATURE_COPYCODEBUTTON === '1') {
import('./copyCode')
}

View file

@ -1,88 +0,0 @@
import * as params from '@params';
const PERSISTENCE_KEY = 'theme-scheme'
const themeOptions = params.theme || {}
const THEME_DARK = typeof themeOptions.dark === 'undefined' ? true : themeOptions.dark;
const THEME_LIGHT = typeof themeOptions.light === 'undefined' ? true : themeOptions.light;
const THEME_DEFAULT = typeof themeOptions.default === 'undefined' ? "system" : themeOptions.default;
window.addEventListener('load', async () => {
const menu = document.getElementById('themeMenu')
const $icon = document.getElementById('navbar-theme-icon-svg')
if (menu == null || $icon == null) return
const btns = menu.getElementsByTagName('a')
const iconMap = Array.from(btns).reduce((map, btn) => {
const $img = btn.getElementsByTagName('img')[0]
map[btn.dataset.scheme] = $img.src
return map
}, {})
function checkScheme(scheme) {
if (THEME_LIGHT === false) return "dark"
if (THEME_DARK === false) return "light"
return scheme
}
function loadScheme() {
return localStorage.getItem(PERSISTENCE_KEY) || loadDefaultScheme()
}
function loadDefaultScheme() {
return THEME_DEFAULT || "system"
}
function saveScheme(scheme) {
localStorage.setItem(PERSISTENCE_KEY, scheme)
}
function getPreferredColorScheme() {
const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;
return isDarkMode ? "dark" : "light";
}
function setScheme(newScheme) {
let theme = newScheme
if (newScheme === 'system') {
theme = getPreferredColorScheme()
}
// set data-theme attribute on html tag
document.querySelector("html").dataset.theme = theme;
// update icon
$icon.src = iconMap[newScheme]
// save preference to local storage
saveScheme(newScheme)
setImages(theme)
}
const checkedScheme = checkScheme(loadScheme())
setScheme(checkedScheme)
Array.from(menu.getElementsByTagName('a')).forEach((btn) => {
btn.addEventListener('click', () => {
const { scheme } = btn.dataset
setScheme(scheme)
})
})
})
function setImages(newScheme) {
const els = Array.from(document.getElementsByClassName('logo-holder'));
for (const el of els) {
const light = el.querySelector('.light-logo');
const dark = el.querySelector('.dark-logo');
if (newScheme === "dark" && dark !== null) {
if (light !== null) light.style.display = 'none'
dark.style.display = 'inline'
}
else {
if (light !== null) light.style.display = 'inline'
if (dark !== null) dark.style.display = 'none'
}
}
}

View file

@ -7,7 +7,7 @@ window.addEventListener('DOMContentLoaded', () => {
const fuseOptions = { const fuseOptions = {
shouldSort: true, shouldSort: true,
includeMatches: true, includeMatches: true,
threshold: 0.1, threshold: 0.0,
tokenize: true, tokenize: true,
location: 0, location: 0,
distance: 100, distance: 100,
@ -79,13 +79,6 @@ window.addEventListener('DOMContentLoaded', () => {
// pull template from hugo template definition // pull template from hugo template definition
const templateDefinition = document.getElementById('search-result-template').innerHTML const templateDefinition = document.getElementById('search-result-template').innerHTML
// replace values // replace values
function adaptTags() {
const tags = value.item.tags;
let string = '';
if (tags) tags.forEach((t) => {string += '<li class="rounded"><a href="/tags/' + t.toLowerCase() + '/" class="btn btn-sm btn-info">' + t + "</a></li>"});
return string;
}
const output = render(templateDefinition, { const output = render(templateDefinition, {
key, key,
title: value.item.title, title: value.item.title,
@ -93,7 +86,7 @@ window.addEventListener('DOMContentLoaded', () => {
date: value.item.date, date: value.item.date,
summary: value.item.summary, summary: value.item.summary,
link: value.item.permalink, link: value.item.permalink,
tags: adaptTags(), tags: value.item.tags,
categories: value.item.categories, categories: value.item.categories,
snippet snippet
}) })

View file

@ -15,7 +15,7 @@ window.addEventListener('DOMContentLoaded', () => {
} }
} }
// =============== Make TOC Compatible with Bootstrap Scroll Spy ======== // =============== Make TOC Compatible wit Bootstrap Scroll Spy ========
// add "navbar" class to the "nav" element // add "navbar" class to the "nav" element
const toc = document.getElementById('TableOfContents') const toc = document.getElementById('TableOfContents')
if (toc) { if (toc) {

View file

@ -1,6 +1,6 @@
import { getDeviceState } from '../core' import { getDeviceState } from '../core'
function fourColumnRow (gallery, entries, i) { function fourColumRow (gallery, entries, i) {
const entry1 = document.createElement('div') const entry1 = document.createElement('div')
entry1.classList.add('col-lg-6', 'm-0', 'p-0') entry1.classList.add('col-lg-6', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true)) entry1.appendChild(entries[i].cloneNode(true))
@ -140,7 +140,7 @@ function showAchievements () {
if (isLaptop) { if (isLaptop) {
if (i + 4 <= len) { if (i + 4 <= len) {
if (rowNumber % 2) { if (rowNumber % 2) {
fourColumnRow(gallery, entries, i) fourColumRow(gallery, entries, i)
} else { } else {
fourColumnReversedRow(gallery, entries, i) fourColumnReversedRow(gallery, entries, i)
} }

View file

@ -4,5 +4,4 @@ import './sidebar'
import './education' import './education'
import './achievements' import './achievements'
import './projects' import './projects'
import './skills'
import './publications' import './publications'

View file

@ -54,9 +54,8 @@ document.addEventListener('DOMContentLoaded', function () {
const navMain = document.getElementsByClassName('navbar-collapse') const navMain = document.getElementsByClassName('navbar-collapse')
Array.from(navMain).forEach(function (el) { Array.from(navMain).forEach(function (el) {
el.addEventListener('click', function (e) { el.addEventListener('click', function (e) {
if (e.target.tagName === 'A' && !e.target.classList.contains("dropdown-toggle")) { if (e.target.tagName === 'A') {
el.classList.add('collapse') el.classList.add('collapse')
el.classList.remove('show')
} }
}) })
}) })

View file

@ -1,15 +0,0 @@
import Filterizr from 'filterizr'
document.addEventListener('DOMContentLoaded', () => {
// ================== Skill cards =====================
// setup skill filter buttons
const skillCardHolder = document.getElementById('skill-card-holder')
if (skillCardHolder != null && skillCardHolder.children.length !== 0) {
// eslint-disable-next-line no-new
new Filterizr('.filtr-skills', {
layout: 'sameWidth',
controlsSelector: '.skill-filtr-control'
})
}
})

View file

@ -49,15 +49,6 @@
color: get-light-color('muted-text-color'); color: get-light-color('muted-text-color');
} }
.navbar-toggler {
border: none;
&:focus {
border: none;
outline: none !important;
box-shadow: none;
}
}
.tags { .tags {
text-align: left; text-align: left;
padding-top: 0.5em; padding-top: 0.5em;
@ -65,12 +56,14 @@
font-size: 0.5em; font-size: 0.5em;
list-style-type: none; list-style-type: none;
display: inline-block; display: inline-block;
background: get-light-color('accent-color');
margin-left: 0.2em; margin-left: 0.2em;
margin-right: 0.2em; margin-right: 0.2em;
margin-top: 0.6em; margin-top: 0.6em;
margin-bottom: 0.6em; margin-bottom: 0.6em;
} }
a { a {
color: get-light-color('text-over-accent-color');
text-decoration: none !important; text-decoration: none !important;
} }
} }
@ -102,40 +95,6 @@
} }
} }
.copy-code-button {
float: right;
margin-top: 0.5em;
margin-left: -2.6em;
margin-right: 3em;
background-color: get-light-color('text-color') !important;
color: get-light-color('inverse-text-color') !important;
padding: 0.25rem 0.5rem;
line-height: 1.5;
border-radius: 0.2rem;
border: none;
&:hover,
&:focus {
background-color: get-light-color('accent-color') !important;
color: get-light-color('text-over-accent-color') !important;
@include transition();
}
&:focus {
&::before {
content: 'Copied!';
position: absolute;
padding: 0.3em;
border-radius: 0.2em;
margin-left: -5em;
margin-top: -0.2em;
background-color: get-light-color('accent-color') !important;
color: get-light-color('text-over-accent-color') !important;
@include transition();
}
}
}
html[data-theme='dark'] { html[data-theme='dark'] {
.btn-dark { .btn-dark {
background-color: get-dark-color('accent-color') !important; background-color: get-dark-color('accent-color') !important;
@ -184,6 +143,17 @@ html[data-theme='dark'] {
color: get-dark-color('muted-text-color'); color: get-dark-color('muted-text-color');
} }
.tags {
li {
background: get-dark-color('accent-color');
a {
background-color: get-dark-color('bg-card');
border: 1px solid get-dark-color('muted-text-color');
color: get-dark-color('text-over-accent-color');
}
}
}
.icon-button { .icon-button {
background-color: get-dark-color('muted-text-color'); background-color: get-dark-color('muted-text-color');
color: get-dark-color('text-over-accent-color') !important; color: get-dark-color('text-over-accent-color') !important;
@ -203,15 +173,4 @@ html[data-theme='dark'] {
background-color: get-dark-color('hover-over-accent-color') !important; background-color: get-dark-color('hover-over-accent-color') !important;
} }
} }
.copy-code-button {
background-color: get-dark-color('bg-primary') !important;
color: get-dark-color('muted-text-color') !important;
&:hover,
&:focus,
&::before {
background-color: get-dark-color('accent-color') !important;
color: get-dark-color('text-over-accent-color') !important;
}
}
} }

View file

@ -9,11 +9,6 @@
box-shadow: $box-shadow; box-shadow: $box-shadow;
border: 1px solid get-light-color('bg-primary'); border: 1px solid get-light-color('bg-primary');
@include transition(); @include transition();
.card-img-top {
transform: scale(1.2);
object-fit: cover;
@include transition();
}
} }
.card-head { .card-head {
@ -22,17 +17,12 @@
overflow: hidden; overflow: hidden;
} }
.card-title {
font-size: large;
}
.card-body { .card-body {
text-align: left; text-align: justify;
} }
.card-img-top { .card-img-top {
-o-object-fit: cover; object-fit: cover;
object-fit: cover;
@include transition(); @include transition();
} }
@ -60,7 +50,6 @@
.post-card-link { .post-card-link {
text-decoration: none !important; text-decoration: none !important;
color: get-light-color('text-color');
} }
.card { .card {
@ -71,8 +60,7 @@
&:focus { &:focus {
.card-img-top { .card-img-top {
transform: scale(1.2); transform: scale(1.2);
-o-object-fit: cover; object-fit: cover;
object-fit: cover;
@include transition(); @include transition();
} }
} }

View file

@ -46,31 +46,3 @@ html[data-theme='dark'] {
.svg-inverted { .svg-inverted {
filter: invert(1); filter: invert(1);
} }
.logo-holder {
height: 64px;
margin-bottom: 1em;
}
.company-logo {
max-height: 100%;
width: auto;
}
.light-logo {
display: inline;
}
.dark-logo {
display: none;
}
html[data-theme='dark'] {
.light-logo {
display: none;
}
.dark-logo {
display: inline;
}
}

View file

@ -2,24 +2,18 @@ a {
color: get-light-color('accent-color'); color: get-light-color('accent-color');
@include transition(); @include transition();
&:link {
text-decoration: none;
}
&:hover, &:hover,
&:focus { &:focus {
-webkit-text-decoration: get-light-color('hover-over-accent-color') underline; text-decoration: get-light-color('hover-over-accent-color') underline;
text-decoration: get-light-color('hover-over-accent-color') underline;
color: get-light-color('hover-over-accent-color'); color: get-light-color('hover-over-accent-color');
@include transition(); @include transition();
} }
} }
.list-link, .taxonomy-term { .list-link {
text-decoration: none !important; text-decoration: none !important;
color: get-light-color('text-color'); color: get-light-color('text-color');
@include transition(); @include transition();
&.active { &.active {
display: inline; display: inline;
color: get-light-color('accent-color'); color: get-light-color('accent-color');
@ -35,7 +29,6 @@ a {
a.header-anchor { a.header-anchor {
text-decoration: none; text-decoration: none;
color: get-light-color('heading-color'); color: get-light-color('heading-color');
i, i,
svg { svg {
font-size: 10pt; font-size: 10pt;
@ -43,15 +36,12 @@ a.header-anchor {
display: none; display: none;
margin-left: 0.5rem; margin-left: 0.5rem;
} }
&:hover { &:hover {
i, i,
svg { svg {
display: inline-block; display: inline-block;
} }
} }
code { code {
color: get-light-color('inline-code-color'); color: get-light-color('inline-code-color');
} }
@ -64,34 +54,26 @@ a.header-anchor {
html[data-theme='dark'] { html[data-theme='dark'] {
a { a {
color: get-dark-color('accent-color'); color: get-dark-color('accent-color');
&:hover, &:hover,
&:focus { &:focus {
-webkit-text-decoration: get-dark-color('hover-over-accent-color') underline; text-decoration: get-dark-color('hover-over-accent-color') underline;
text-decoration: get-dark-color('hover-over-accent-color') underline;
color: get-dark-color('hover-over-accent-color'); color: get-dark-color('hover-over-accent-color');
} }
} }
.list-link {
.list-link, .taxonomy-term {
color: get-dark-color('text-color'); color: get-dark-color('text-color');
&:hover {
&:hover,
&.active {
color: get-dark-color('accent-color'); color: get-dark-color('accent-color');
} }
} }
a.header-anchor { a.header-anchor {
color: get-dark-color('heading-color'); color: get-dark-color('heading-color');
i, i,
svg { svg {
color: get-dark-color('text-color'); color: get-dark-color('text-color');
} }
code { code {
color: get-dark-color('inline-code-color'); color: get-dark-color('inline-code-color');
} }
} }
} }

View file

@ -96,10 +96,6 @@ html[data-theme='dark'] {
} }
} }
.gist { .gist {
&::-moz-selection{
background: get-dark-color('text-color');
color: get-dark-color('inverse-text-color');
}
&::selection{ &::selection{
background: get-dark-color('text-color'); background: get-dark-color('text-color');
color: get-dark-color('inverse-text-color'); color: get-dark-color('inverse-text-color');

View file

@ -12,7 +12,7 @@ strong {
p { p {
color: get-light-color('text-color'); color: get-light-color('text-color');
text-align: left; text-align: justify;
text-justify: inter-word; text-justify: inter-word;
} }
@ -33,10 +33,6 @@ blockquote {
} }
} }
.text-justify {
text-align: justify;
}
.text-muted { .text-muted {
color: get-light-color('muted-text-color') !important; color: get-light-color('muted-text-color') !important;
} }
@ -76,8 +72,7 @@ html[data-theme='dark'] {
h2, h2,
h3, h3,
h4, h4,
h5, h5 {
h6 {
color: get-dark-color('heading-color'); color: get-dark-color('heading-color');
} }

View file

@ -1,6 +1,6 @@
/* in Hugo, Page kind can be either "section" or "page".*/ // in Hugo, Page kind can be either "section" or "page".
/* if it is section, then it's a page with a list of items, for example /posts*/ // if it is section, then it's a page with a list of items, for example /posts
/* if it is page, then it is a single page.*/ // if it is page, then it is a single page.
body.kind-section, body.kind-section,
body.kind-term, body.kind-term,
body.kind-page { body.kind-page {

View file

@ -53,6 +53,7 @@ body {
ol > ol, ol > ol,
li > ol, li > ol,
li > ul { li > ul {
-webkit-padding-start: 1rem;
padding-inline-start: 1rem; padding-inline-start: 1rem;
} }
} }

View file

@ -184,7 +184,6 @@ body.kind-page {
#scroll-to-top { #scroll-to-top {
position: fixed; position: fixed;
border: none;
bottom: 0rem; bottom: 0rem;
right: 1rem; right: 1rem;
color: get-light-color('accent-color'); color: get-light-color('accent-color');

View file

@ -27,7 +27,6 @@
.navbar-brand { .navbar-brand {
color: get-light-color('heading-color'); color: get-light-color('heading-color');
text-decoration: none !important;
font-weight: 600; font-weight: 600;
img { img {
width: 42px; width: 42px;

View file

@ -1,6 +1,6 @@
/* override this file for custom css */ /* override this file for custom css */
/* you can import bootstrap mixins */ /* you can import boostrap mixins */
// @import 'bootstrap/scss/mixins'; // @import 'bootstrap/scss/mixins';
// Example usage // Example usage
// .some-class { // .some-class {

View file

@ -129,12 +129,6 @@
margin-bottom: 0; margin-bottom: 0;
} }
} }
.custom-section {
.custom-content {
padding-bottom: 0.5em;
}
}
} }
} }
} }
@ -229,11 +223,6 @@ html[data-theme='dark'] {
border-left: 2px solid get-dark-color('accent-color'); border-left: 2px solid get-dark-color('accent-color');
} }
} }
.custom-section {
.custom-content {
color: get-dark-color('text-color');
}
}
} }
} }
} }

View file

@ -32,14 +32,14 @@
&::after { &::after {
content: ''; content: '';
position: relative; position: absolute;
border-left: 3px solid get-light-color('accent-color'); border-left: 3px solid get-light-color('accent-color');
z-index: 1; z-index: 1;
height: 100%; height: 100%;
left: -23px; left: 50%;
} }
&:nth-child(even)::after { &:nth-child(even)::after {
left: -26px; left: calc(50% - 3px) !important;
} }
} }
.horizontal-line { .horizontal-line {
@ -52,7 +52,6 @@
margin: 0; margin: 0;
top: 17px; top: 17px;
position: relative; position: relative;
opacity: 1;
} }
.timeline-side-div { .timeline-side-div {
display: flex; display: flex;
@ -93,16 +92,6 @@
} }
} }
.company-heading {
h5 {
display: inline;
margin-right: 0.25em;
}
p {
display: inline;
}
}
@include media('<=medium') { @include media('<=medium') {
.container { .container {
max-width: 100%; max-width: 100%;

View file

@ -13,8 +13,7 @@
@include transition(); @include transition();
&:hover { &:hover {
margin-left: 5px; margin-left: 5px;
-webkit-text-decoration: get-light-color('muted-text-color') underline; text-decoration: get-light-color('muted-text-color') underline;
text-decoration: get-light-color('muted-text-color') underline;
@include transition(); @include transition();
} }
} }
@ -80,8 +79,7 @@ html[data-theme='dark'] {
a { a {
color: get-dark-color('muted-text-color'); color: get-dark-color('muted-text-color');
&:hover { &:hover {
-webkit-text-decoration: get-dark-color('muted-text-color') underline; text-decoration: get-dark-color('muted-text-color') underline;
text-decoration: get-dark-color('muted-text-color') underline;
} }
} }
@ -97,10 +95,6 @@ html[data-theme='dark'] {
background-color: get-dark-color('bg-primary'); background-color: get-dark-color('bg-primary');
&:focus { &:focus {
background-color: get-dark-color('bg-secondary'); background-color: get-dark-color('bg-secondary');
color: get-dark-color('text-color');
}
&::placeholder {
color: get-dark-color('muted-text-color');
} }
} }

View file

@ -42,4 +42,7 @@
@keyframes spin { @keyframes spin {
to { -webkit-transform: rotate(360deg); } to { -webkit-transform: rotate(360deg); }
} }
@-webkit-keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
} }

View file

@ -35,10 +35,6 @@
.project-card-footer { .project-card-footer {
display: flex; display: flex;
.badge {
margin-left: 0.1em;
margin-right: 0.1em;
}
} }
.project-tags-holder { .project-tags-holder {

View file

@ -24,14 +24,6 @@
float: right !important; float: right !important;
} }
} }
a[href] {
text-decoration: underline; /* Underline only when href is present */
}
a:not([href]) {
text-decoration: none; /* No underline when href is absent */
}
} }
.card-body { .card-body {

View file

@ -1,7 +1,4 @@
module: module:
hugoVersion:
min: "0.146.0"
extended: true
mounts: mounts:
- source: content - source: content
target: content target: content
@ -17,9 +14,9 @@ module:
target: i18n target: i18n
- source: archetypes - source: archetypes
target: archetypes target: archetypes
- source: ../../node_modules/flag-icons/flags - source: ../../node_modules/flag-icon-css/flags
target: static/flags target: static/flags
- source: ../../node_modules/@fontsource/mulish/files - source: ../../node_modules/@fontsource/mulish/files
target: static/files target: static/files
- source: ../../node_modules/katex/dist/fonts - source: ../../node_modules/katex/dist/fonts
target: static/fonts target: static/fonts

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -24,7 +24,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -1,5 +1,5 @@
--- ---
title: "Suchergebnisse" title: "Search Results"
date: 2010-06-08T08:06:25+06:00 date: 2010-06-08T08:06:25+06:00
weight: 999999 weight: 999999
sitemap: sitemap:
@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -26,7 +26,7 @@ Search depends on additional output content type of JSON in config.toml
home = ["HTML", "JSON"] home = ["HTML", "JSON"]
\``` \```
## Searching additional fields ## Searching additional fileds
To search additional fields defined in front matter, you must add it in 2 places. To search additional fields defined in front matter, you must add it in 2 places.

View file

@ -1,6 +1,6 @@
flags: flags:
styles: styles:
- flag-icons/css/flag-icons - flag-icon-css/css/flag-icons
videoplayer: videoplayer:
services: services:

View file

@ -1,3 +1,4 @@
baseURL: http://example.org/ baseURL: http://example.org/
languageCode: en-us languageCode: en-us
title: Example Site title: Example Site
@ -21,7 +22,7 @@ module:
mounts: mounts:
- source: static/files - source: static/files
target: static/files target: static/files
- source: ./node_modules/flag-icons/flags - source: ./node_modules/flag-icon-css/flags
target: static/flags target: static/flags
- source: ./node_modules/@fontsource/mulish/files - source: ./node_modules/@fontsource/mulish/files
target: static/files target: static/files
@ -32,18 +33,14 @@ module:
# For any more details, you can check the official documentation: https://gohugo.io/content-management/multilingual/ # For any more details, you can check the official documentation: https://gohugo.io/content-management/multilingual/
languages: languages:
en: en:
languageCode: en
languageName: English languageName: English
title: "John's Blog"
weight: 1 weight: 1
bn: bn:
languageCode: bn
languageName: বাংলা languageName: বাংলা
title: "জনের ব্লগ" weight: 3
weight: 2
# default language for the content # Force a locale to be use, really useful to develop the application ! Should be commented in production, the "weight" should rocks.
defaultContentLanguage: en # DefaultContentLanguage: bn
# Allow raw html in markdown file # Allow raw html in markdown file
markup: markup:
@ -63,12 +60,6 @@ outputs:
- RSS - RSS
- JSON - JSON
# Configure custom path for RSS feed. Default is "index.xml"
# Ref: https://gohugo.io/templates/output-formats/
outputFormats:
rss:
baseName: rss # default is index
# Enable global emoji support # Enable global emoji support
enableEmoji: true enableEmoji: true
@ -98,20 +89,7 @@ params:
# Enable dark theme # Enable dark theme
darkMode: darkMode:
# [Deprecated] Enable dark theme
# This is a deprecated setting, but has not been removed to maintain backward compatibility
# If `theme` is set, the `darkMode` setting will be discarded.
# darkMode:
# enable: true
# Configure theme color settings
theme:
enable: true enable: true
services:
light: true # enable light theme. default "true"
dark: true # enable dark theme. default "true"
default: system # can be either light, dark or system. default "system"
# Enable and configure portfolio # Enable and configure portfolio
portfolio: portfolio:
@ -120,7 +98,6 @@ params:
# Enable and configure blog posts # Enable and configure blog posts
blog: blog:
enable: true enable: true
showAuthor: true
# Share post on different social media # Share post on different social media
shareButtons: shareButtons:
facebook: true facebook: true
@ -192,16 +169,7 @@ params:
# matomo: # matomo:
# instance: matomo.example.com # instance: matomo.example.com
# siteId: 1 # Or any other number # siteId: 1 # Or any other number
# # Umami
# umami:
# scheme: https
# instance: umami.example.com
# id: <your umami site id>
# # Statcounter
# statcounter:
# project: 1234567890
# invisible: 1
# security: deadbeef
# Enable Support # Enable Support
support: support:
enable: false enable: false
@ -296,15 +264,12 @@ params:
plyr: plyr:
# options doc: https://github.com/sampotts/plyr#options # options doc: https://github.com/sampotts/plyr#options
# fullscreen: true # fullscreen: true
# Enables copy code button
copyCodeButton:
enable: true
# Enable reading time support in post cards and in post pages # Enable reading time support in post cards and in post pages
readingTime: readingTime:
enable: true enable: true
# Provide footer configuration. # Provide footer configuration.
footer: footer:
enable: true enable: true

View file

@ -1,10 +1,10 @@
module github.com/hugo-toha/toha/exampleSite module github.com/hugo-toha/toha/exampleSite
go 1.21 go 1.19
replace github.com/hugo-toha/toha/v4 => ../
require ( require (
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20241018183051-dd13c36f46b4 // indirect github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207 // indirect
github.com/hugo-toha/toha/v4 v4.7.0 // indirect github.com/hugo-toha/toha/v4 v4.0.0-20231113175302-e5230e8c93d8 // indirect
) )
replace github.com/hugo-toha/toha/v4 => ../

View file

@ -1,2 +1,4 @@
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20241018183051-dd13c36f46b4 h1:Yc5SJ5NJx1xu3YO2gQZPeADXqhGdJgUGWiDxgEDuUrQ= github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6 h1:TPFhOZAnuH4wjLIdzimswCRa2qCcc1teKVTatADJU2g=
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20241018183051-dd13c36f46b4/go.mod h1:3N7k1DSQGy5Zn5IVp5nQ3QJ/VWh5dSxXO6stUS7txrg= github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6/go.mod h1:OMMaP9Hh9NsKd41lVIazBQRPa0s6Z57AfJoY3DcCNNY=
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207 h1:T71lEaGpHYpdy8yKM5vaVwm+CJGt8wjHvPgVM+GjCJM=
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207/go.mod h1:aTn1lQX1rbcbfbwNuWHG/L5DPtD+bEzQro49QyFlbEg=

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@
"eslint-plugin-promise": "github.com/hugo-toha/toha/v4", "eslint-plugin-promise": "github.com/hugo-toha/toha/v4",
"feather-icons": "github.com/hugo-toha/toha/v4", "feather-icons": "github.com/hugo-toha/toha/v4",
"filterizr": "github.com/hugo-toha/toha/v4", "filterizr": "github.com/hugo-toha/toha/v4",
"flag-icons": "github.com/hugo-toha/toha/v4", "flag-icon-css": "github.com/hugo-toha/toha/v4",
"fuse.js": "github.com/hugo-toha/toha/v4", "fuse.js": "github.com/hugo-toha/toha/v4",
"highlight.js": "github.com/hugo-toha/toha/v4", "highlight.js": "github.com/hugo-toha/toha/v4",
"imagesloaded": "github.com/hugo-toha/toha/v4", "imagesloaded": "github.com/hugo-toha/toha/v4",
@ -30,11 +30,12 @@
"postcss-cli": "github.com/hugo-toha/toha/v4" "postcss-cli": "github.com/hugo-toha/toha/v4"
} }
}, },
"dependencies": {},
"devDependencies": { "devDependencies": {
"@fontsource/mulish": "4.5.13", "@fontsource/mulish": "4.5.13",
"@fortawesome/fontawesome-free": "^6.6.0", "@fortawesome/fontawesome-free": "^6.2.0",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.13",
"bootstrap": "^5.3.3", "bootstrap": "^4.6.2",
"eslint": "^8.31.0", "eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
"eslint-config-standard": "^17.0.0", "eslint-config-standard": "^17.0.0",
@ -44,19 +45,19 @@
"eslint-plugin-promise": "^6.1.1", "eslint-plugin-promise": "^6.1.1",
"feather-icons": "^4.29.1", "feather-icons": "^4.29.1",
"filterizr": "^2.2.4", "filterizr": "^2.2.4",
"flag-icons": "^7.2.3", "flag-icon-css": "^4.1.7",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
"highlight.js": "^11.6.0", "highlight.js": "^11.6.0",
"imagesloaded": "^5.0.0", "imagesloaded": "^5.0.0",
"include-media": "^1.4.10", "include-media": "^1.4.10",
"ityped": "^1.0.3", "ityped": "^1.0.3",
"katex": "^0.16.11", "katex": "^0.16.3",
"mark.js": "^8.11.1", "mark.js": "^8.11.1",
"mermaid": "^11.6.0", "mermaid": "^9.2.1",
"plyr": "^3.7.2", "plyr": "^3.7.2",
"popper.js": "^1.16.1", "popper.js": "^1.16.1",
"postcss": "^8.4.41", "postcss": "^8.4.21",
"postcss-cli": "^11.0.0" "postcss-cli": "^8.3.1"
}, },
"name": "exampleSite", "name": "exampleSite",
"version": "0.1.0" "version": "0.1.0"

2
go.mod
View file

@ -1,3 +1,3 @@
module github.com/hugo-toha/toha/v4 module github.com/hugo-toha/toha/v4
go 1.21 go 1.19

2
go.sum
View file

@ -1,2 +0,0 @@
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20240730212302-83b19f7bd3b7 h1:RRonNzaf6/Ou9PqfXeKiRywkd+9KY7SVgfGBQXqXshM=
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20240730212302-83b19f7bd3b7/go.mod h1:yWw1t3trnfzv4t1lA9zh5pSsI0+kqqyg58ir8/kt6zk=

View file

@ -1,130 +0,0 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "Əsas Səhifə"
[posts]
other = "Yazılar"
[toc_heading]
other = "Məzmun Cədvəli"
[tags]
other = "Etiketlər"
[categories]
other = "Kateqoriyalar"
[at]
other = ","
[resume]
other = "CV"
[navigation]
other = "Menyu"
[contact_me]
other = "Əlaqə:"
[email]
other = "E-Poçt"
[phone]
other = "Telefon"
[newsletter_text]
other = "Yeni məzmunlardan xəbərdar olmaq üçün E-Poçt ünvanınızı daxil edin."
[newsletter_input_placeholder]
other = "E-Poçt ünvanını daxil edin."
[newsletter_warning]
other = "E-Poçt ünvanınızı daxil etsəniz, bu veb saytın xəbər bülletenini almağı qəbul etmiş olursunuz."
[submit]
other = "Təsdiqlə"
[hugoAttributionText]
other = ""
[prev]
other = "Əvvəlki"
[next]
other = "Sonraki"
[share_on]
other = "Paylaş"
[improve_this_page]
other = "Bu səhifəyə töhfə verin"
[out_of]
other = "/"
[publications]
other = "Akademik Nəşrlər"
[taken_courses]
other = "Keçirilmiş Kurslar"
[course_name]
other = "Kursun Adı"
[total_credit]
other = "Ümumi Kredit"
[obtained_credit]
other = "Qazandırılmış Kredit"
[extracurricular_activities]
other = "Kursdankənar Fəaliyyətlər"
[show_more]
other = "Daha Çox Göstər"
[show_less]
other = "Gizlət"
[responsibilities]
other = "Məsuliyyətlər:"
[present]
other = "Hal-hazırda"
[comments_javascript]
other = "Görmək üçün xahiş edirəm JavaScript-i aktiv edin"
[comments_by]
other = "Şərh edən"
[read]
other = "Oxu"
[project_star]
other = "Ulduz"
[project_details]
other = "Təfərrüatlar"
[err_404]
other = "Axtardığınız səhifə tapılmadı."
[more]
other = "Daha Çox"
[view_certificate]
other = "Sertifikatı Görüntülə"
[notes]
other = "Qeydlər"
[disclaimer_text]
other = "Məsuliyyət İnkarı"
[search]
other = "Axtar"
[minute]
one = "dəqiqə"
other = "dəqiqə"

View file

@ -96,7 +96,7 @@ other = "heute"
other = "Bitte aktiviere JavaScript um die Kommentare zu sehen" other = "Bitte aktiviere JavaScript um die Kommentare zu sehen"
[comments_by] [comments_by]
other = "Kommentare unterstützt von" other = "Kommentare Unterstützt von"
[read] [read]
other = "Lesen" other = "Lesen"
@ -124,7 +124,3 @@ other = "Haftungshinweis"
[search] [search]
other = "Suche" other = "Suche"
[minute]
one = "Minute"
other = "Minuten"

View file

@ -124,7 +124,3 @@ other = "Vastuuilmoitus"
[search] [search]
other = "Haku" other = "Haku"
[minute]
one = "minuutti"
other = "minuuttia"

View file

@ -117,7 +117,7 @@ other = "Suite"
other = "Afficher le certificat" other = "Afficher le certificat"
[notes] [notes]
other = "Notes" other = "Remarques"
[disclaimer_text] [disclaimer_text]
other = "Avis de responsabilité" other = "Avis de responsabilité"
@ -127,4 +127,4 @@ other = "Chercher"
[minute] [minute]
one = "minute" one = "minute"
other = "minutes" other = "minutes"

View file

@ -1,126 +0,0 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "בית"
[posts]
other = "פוסטים"
[toc_heading]
other = "תוכן העניינים"
[tags]
other = "תגים"
[categories]
other = "קטגוריות"
[at]
other = "ב"
[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 = "מופעל ע\"י"
[prev]
other = "הקודם"
[next]
other = "הבא"
[share_on]
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 = "אחריות:"
[present]
other = "נוכחי"
[comments_javascript]
other = "אנא הפעל את JavaScript כדי לראות את"
[comments_by]
other = "תגובות מופעלות ע\"י"
[read]
other = "קרא"
[project_star]
other = "כוכב"
[project_details]
other = "פרטים"
[err_404]
other = "הדף שאתה מחפש אינו קיים עדיין."
[more]
other = "עוד"
[view_certificate]
other = "צפה בתעודה"
[notes]
other = "הערות"
[disclaimer_text]
other = "הבהרת אחריות"
[search]
other = "חיפוש"

View file

@ -93,16 +93,16 @@ other = "Sorumluluklar:"
other = "Halen" other = "Halen"
[comments_javascript] [comments_javascript]
other = "Görüntüleyebilmek için lüften JavaScript etkinleştirin" other = "Görüntüleyebilmek için lüften Javascript etkinleştirin"
[comments_by] [comments_by]
other = "Yorum sağlayıcı" other = "comments powered by"
[read] [read]
other = "Oku" other = "Oku"
[project_star] [project_star]
other = "Yıldız" other = "Star"
[project_details] [project_details]
other = "Detaylar" other = "Detaylar"
@ -124,7 +124,3 @@ other = "Yükümlülük Bildirisi"
[search] [search]
other = "Ara" other = "Ara"
[minute]
one = "dakika"
other = "dakika"

View file

@ -124,7 +124,3 @@ other = "免责声明"
[search] [search]
other = "搜索" other = "搜索"
[minute]
one = "分钟"
other = "分钟"

View file

@ -9,10 +9,10 @@ other = "文章"
other = "目錄" other = "目錄"
[tags] [tags]
other = "標籤" other = "标签"
[categories] [categories]
other = "類別" other = "类别"
[at] [at]
other = "at" other = "at"
@ -42,7 +42,7 @@ other = "在此輸入您的電子郵件地址"
other = "輸入您的電子郵件地址,即表示您同意接受本網站的最新消息" other = "輸入您的電子郵件地址,即表示您同意接受本網站的最新消息"
[submit] [submit]
other = "送出" other = "提交"
[hugoAttributionText] [hugoAttributionText]
other = "Powered by" other = "Powered by"
@ -63,10 +63,10 @@ other = "改善此頁面"
other = "/" other = "/"
[publications] [publications]
other = "著作" other = "出版"
[taken_courses] [taken_courses]
other = "修課內容" other = "修習課程"
[course_name] [course_name]
other = "課程名稱" other = "課程名稱"
@ -123,8 +123,4 @@ other = "筆記"
other = "免責聲明" other = "免責聲明"
[search] [search]
other = "搜尋" other = "搜索"
[minute]
one = "分鐘"
other = "分鐘"

View file

@ -4,20 +4,27 @@
<title>{{ .Page.Title }}</title> <title>{{ .Page.Title }}</title>
<!------ ADD COMMON HEADERS --------> <!------ ADD COMMON HEADERS -------->
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
{{- partial "opengraph.html" . -}} {{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!------ ADD PAGE SPECIFIC HEADERS -------> <!------ ADD PAGE SPECIFIC HEADERS ------->
{{ block "header" . }} {{ end }} {{ block "header" . }} {{ end }}
<!--================= add analytics if enabled =========================--> <!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}} {{- partial "analytics.html" . -}}
{{ with resources.Get "scripts/core/theme-scheme.js" | fingerprint }} <script>
<script integrity="{{.Data.Integrity}}"> theme = localStorage.getItem('darkmode:color-scheme') || 'system';
{{ .Content | safeJS }} if (theme == 'system') {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
theme = 'dark';
} else {
theme = 'light';
}
}
document.documentElement.setAttribute('data-theme', theme);
</script> </script>
{{ end }}
</head> </head>
<body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80"> <body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-spy="scroll" data-target="#TableOfContents" data-offset="80">
<div class="container-fluid bg-secondary wrapper"> <div class="container-fluid bg-secondary wrapper">
<!----- ADD NAVBAR ---------------> <!----- ADD NAVBAR --------------->
{{ block "navbar" . }} {{ end }} {{ block "navbar" . }} {{ end }}

View file

@ -4,7 +4,7 @@
{{ define "sidebar" }} {{ define "sidebar" }}
{{ $homePage:="#" }} {{ $homePage:="#" }}
{{ if hugo.IsMultilingual }} {{ if site.IsMultiLingual }}
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
{{ end }} {{ end }}
@ -32,8 +32,7 @@
<div class="content container-fluid" id="content"> <div class="content container-fluid" id="content">
<div class="container-fluid post-card-holder" id="post-card-holder"> <div class="container-fluid post-card-holder" id="post-card-holder">
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }} {{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}} {{ $paginator := .Paginate $posts 12 }}
{{ $paginator := .Paginate $posts $numShow }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ if .Layout }} {{ if .Layout }}
{{/* ignore the search.md file*/}} {{/* ignore the search.md file*/}}
@ -43,7 +42,7 @@
{{ end }} {{ end }}
</div> </div>
<div class="paginator"> <div class="paginator">
{{ partial "pagination.html" . }} {{ template "_internal/pagination.html" . }}
</div> </div>
</div> </div>
</section> </section>

View file

@ -19,9 +19,9 @@
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }} <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
@ -33,7 +33,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | html }}</description>
</item> </item>

View file

@ -4,7 +4,7 @@
{{ define "sidebar" }} {{ define "sidebar" }}
{{ $homePage:="#" }} {{ $homePage:="#" }}
{{ if hugo.IsMultilingual }} {{ if site.IsMultiLingual }}
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
{{ end }} {{ end }}
@ -28,40 +28,28 @@
{{ end }} {{ end }}
{{ define "content" }} {{ define "content" }}
<script>
document.body.classList.replace('kind-page', 'kind-section');
</script>
<section class="content-section" id="content-section"> <section class="content-section" id="content-section">
<div class="content container-fluid" id="content"> <div class="content container-fluid" id="content">
<div class="container-fluid post-card-holder" id="post-card-holder"> <div class="container-fluid post-card-holder" id="post-card-holder">
<div id="search-results" style="display: flex; flex-wrap: wrap;"> <div id="search-results">
<script id="search-result-template" type="text/x-js-template"> <script id="search-result-template" type="text/x-js-template">
<div class="post-card"> <div class="post-card">
<div class="card"> <a href="${link}" class="post-card-link">
<div class="card" style="min-height: 352px;"><a href="${link}" class="post-card-link">
<div class="card-head"> <div class="card-head">
<a href="${link}" class="post-card-link">
<img class="card-img-top" src="${hero}" alt="Card Heading Image"> <img class="card-img-top" src="${hero}" alt="Card Heading Image">
</a>
</div> </div>
<div class="card-body"> <div class="card-body">
<a href="${link}" class="post-card-link"> <h5 class="card-title">${title}</h5>
<h5 class="card-title">${title}</h5> <p class="card-text post-summary">${summary}</p>
<p class="card-text post-summary">${summary}</p>
</a>
{{ if site.Params.features.tags.on_card }}
<div class="tags">
<ul style="padding-left: 0;">
${tags}
</ul>
</div>
{{ end }}
</div> </div>
<div class="card-footer"> <div class="card-footer">
<span class="float-start">${date}</span> <span class="float-left">${date}</span>
<a href="${link}" class="float-end btn btn-outline-info btn-sm">Read</a> <a href="${link}" class="float-right btn btn-outline-info btn-sm">Read</a>
</div> </div>
</div> </div>
</a>
</div> </div>
</script> </script>

View file

@ -1,8 +1,5 @@
{{ define "header" }} {{ define "header" }}
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Title }}{{ end }}" /> <meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Title }}{{ end }}" />
{{ with .Params.relcanonical }}
<link rel="canonical" href="{{ . | relLangURL }}" itemprop="url" />
{{ end }}
{{ end }} {{ end }}
{{ define "navbar" }} {{ define "navbar" }}
@ -39,26 +36,15 @@
<!--Content Start--> <!--Content Start-->
<div class="page-content"> <div class="page-content">
{{ if site.Params.features.blog.showAuthor | default true }} <div class="author-profile ml-auto align-self-lg-center">
<div class="author-profile ms-auto align-self-lg-center">
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image"> <img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image">
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5> <h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p> <p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
</div> </div>
{{ else }}
<div style="margin-bottom: 80px;"></div>
{{ end }}
<div class="title"> <div class="title">
<h1>{{ .Page.Title }}</h1> <h1>{{ .Page.Title }}</h1>
</div> </div>
{{ if not (site.Params.features.blog.showAuthor | default true) }}
<div class="author-profile ms-auto align-self-lg-center">
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
</div>
{{ end }}
{{ if site.Params.features.tags.enable }} {{ if site.Params.features.tags.enable }}
{{partial "misc/tags.html" .Params.tags }} {{partial "misc/tags.html" .Params.tags }}
{{ end }} {{ end }}
@ -67,7 +53,7 @@
</div> </div>
<!-- Share or Contribute --> <!-- Share or Contribute -->
<div class="row ps-3 pe-3"> <div class="row pl-3 pr-3">
<!--Social Media Share Buttons--> <!--Social Media Share Buttons-->
<div class="col-md-6 share-buttons"> <div class="col-md-6 share-buttons">
{{ if site.Params.features.blog.shareButtons }} {{ if site.Params.features.blog.shareButtons }}
@ -160,15 +146,15 @@
{{ end }} {{ end }}
<!-- Keep backward compatibility with old config.yaml --> <!-- Keep backward compatibility with old config.yaml -->
{{ if .Site.Config.Services.Disqus.Shortname }} {{ if site.DisqusShortname }}
{{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") .Site.Config.Services.Disqus.Shortname) }} {{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") site.DisqusShortname) }}
{{ end }} {{ end }}
</div> </div>
</div> </div>
</div> </div>
<!--scroll back to top--> <!--scroll back to top-->
<a id="scroll-to-top" class="btn" type="button" data-bs-toggle="tooltip" data-bs-placement="left" title="Scroll to top"> <a id="scroll-to-top" class="btn" data-toggle="tooltip" data-placement="left" title="Scroll to top">
<i class="fas fa-chevron-circle-up"></i> <i class="fas fa-chevron-circle-up"></i>
</a> </a>
</section> </section>
@ -178,7 +164,7 @@
<section class="toc-section" id="toc-section"> <section class="toc-section" id="toc-section">
{{ if and site.Params.features.toc.enable ( .Params.enableTOC | default true ) }} {{ if and site.Params.features.toc.enable ( .Params.enableTOC | default true ) }}
<div class="toc-holder"> <div class="toc-holder">
<h5 class="text-center ps-3">{{ i18n "toc_heading" }}</h5> <h5 class="text-center pl-3">{{ i18n "toc_heading" }}</h5>
<hr> <hr>
<div class="toc"> <div class="toc">
{{ .TableOfContents }} {{ .TableOfContents }}

View file

@ -4,7 +4,7 @@
{{ define "sidebar" }} {{ define "sidebar" }}
{{ $homePage:="#" }} {{ $homePage:="#" }}
{{ if hugo.IsMultilingual }} {{ if site.IsMultiLingual }}
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
{{ end }} {{ end }}
@ -33,8 +33,7 @@
<div class="content container-fluid" id="content"> <div class="content container-fluid" id="content">
<div class="container-fluid post-card-holder" id="post-card-holder"> <div class="container-fluid post-card-holder" id="post-card-holder">
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }} {{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}} {{ $paginator := .Paginate $posts 12 }}
{{ $paginator := .Paginate $posts $numShow }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ if .Layout }} {{ if .Layout }}
{{/* ignore the search.md file*/}} {{/* ignore the search.md file*/}}
@ -44,7 +43,7 @@
{{ end }} {{ end }}
</div> </div>
<div class="paginator"> <div class="paginator">
{{ partial "pagination.html" . }} {{ template "_internal/pagination.html" . }}
</div> </div>
</div> </div>
</section> </section>

View file

@ -17,13 +17,19 @@
<!--================= add analytics if enabled =========================--> <!--================= add analytics if enabled =========================-->
{{- partial "analytics.html" . -}} {{- partial "analytics.html" . -}}
{{ with resources.Get "scripts/core/theme-scheme.js" | fingerprint }} <script>
<script integrity="{{.Data.Integrity}}"> theme = localStorage.getItem('darkmode:color-scheme') || 'system';
{{ .Content | safeJS }} if (theme == 'system') {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
theme = 'dark';
} else {
theme = 'light';
}
}
document.documentElement.setAttribute('data-theme', theme);
</script> </script>
{{ end }}
</head> </head>
<body data-bs-spy="scroll" data-bs-target="#top-navbar" data-bs-offset="100"> <body data-spy="scroll" data-target="#top-navbar" data-offset="100">
<!--- NAVBAR -------------------------> <!--- NAVBAR ------------------------->
{{- partial "navigators/navbar.html" . -}} {{- partial "navigators/navbar.html" . -}}

View file

@ -4,7 +4,7 @@
{{ define "sidebar" }} {{ define "sidebar" }}
{{ $homePage:="#" }} {{ $homePage:="#" }}
{{ if hugo.IsMultilingual }} {{ if site.IsMultiLingual }}
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
{{ end }} {{ end }}
@ -41,7 +41,7 @@
{{ end }} {{ end }}
</div> </div>
<div class="paginator"> <div class="paginator">
{{ partial "pagination.html" . }} {{ template "_internal/pagination.html" . }}
</div> </div>
</div> </div>
</section> </section>

View file

@ -4,7 +4,7 @@
{{ define "sidebar" }} {{ define "sidebar" }}
{{ $homePage:="#" }} {{ $homePage:="#" }}
{{ if hugo.IsMultilingual }} {{ if site.IsMultiLingual }}
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
{{ end }} {{ end }}

View file

@ -2,83 +2,60 @@
{{ with site.Params.features.analytics }} {{ with site.Params.features.analytics }}
{{ if or .enable .enabled }} {{ if or .enable .enabled }}
{{ with .services }} {{ with .services }}
<!-- Google Analytics --> <!-- Google Analytics -->
{{ with .google }} {{ with .google }}
{{ partial "google_analytics.html" . }} {{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }}
{{ end }} {{ $analyticsConfig := dict (slice "Site" "GoogleAnalytics") .id }}
{{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }}
{{ end }}
<!-- Counter.dev --> <!-- Counter.dev -->
{{ with .counterDev }} {{ with .counterDev }}
<script src="https://cdn.counter.dev/script.js" <script src="https://cdn.counter.dev/script.js"
data-id="{{ .id }}" data-id="{{ .id }}"
data-utcoffset="1" data-utcoffset="1"
></script> ></script>
{{ end }} {{ end }}
<!-- GoatCounter --> <!-- GoatCounter -->
{{ with .goatCounter }} {{ with .goatCounter }}
{{ with .code }} {{ with .code }}
<script data-goatcounter="https://{{ . }}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script> <script data-goatcounter="https://{{ . }}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
{{ else }} {{ else }}
<script data-goatcounter="https://{{ .instance }}/count" async src="https://{{ .instance }}/count.js"></script> <script data-goatcounter="https://{{ .instance }}/count" async src="https://{{ .instance }}/count.js"></script>
{{ end }} {{ end }}
{{ end }} {{ end }}
<!-- Piwik/Matomo --> <!-- Piwik/Matomo -->
{{ with .matomo }} {{ with .matomo }}
<!-- Matomo --> <!-- Matomo -->
<script> <script>
var _paq = window._paq = window._paq || []; var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function() {
var u="//{{ .instance }}/"; var u="//{{ .instance }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ .siteId }}']); _paq.push(['setSiteId', '{{ .siteId }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})(); })();
</script>
{{ end }}
{{ with .cloudflare }}
<!-- Cloudflare Web Analytics -->
<script defer src='https://static.cloudflareinsights.com/beacon.min.js'
data-cf-beacon='{"token": "{{ .token }}"}'
></script>
<!-- End Cloudflare Web Analytics -->
{{ end }}
{{ with .umami }}
<!-- Umami analytics -->
<script defer src='{{ or .scheme "https" }}://{{ or .instance "analytics.eu.umami.is" }}/script.js' data-website-id="{{ .id }}"></script>
<!-- End Umami analytics -->
{{end}}
{{ with .statcounter }}
<!-- Statcounter analytics -->
<script type="text/javascript" src="https://www.statcounter.com/counter/counter.js" async></script>
<script type="text/javascript">
var sc_project = {{ .project }};
var sc_invisible = {{ .invisible }};
var sc_security = "{{ .security }}";
var scJsHost = (("https:" == document.location.protocol) ?
"https://www.statcounter.com/js/" : "https://www.statcounter.com/js/");
</script> </script>
<noscript> {{ end }}
<div class="statcounter"><a title="web counter" href="https://statcounter.com/" target="_blank"><img
class="statcounter" src="https://c.statcounter.com/{{ .project }}/0/{{ .security }}/{{ .invisible }}/" {{ with .cloudflare }}
alt="web counter" referrerPolicy="no-referrer-when-downgrade"></a></div> <!-- Cloudflare Web Analytics -->
<!-- End of Statcounter Code --> <script defer src='https://static.cloudflareinsights.com/beacon.min.js'
</noscript> data-cf-beacon='{"token": "{{ .token }}"}'
<!-- End Statcounter analytics --> ></script>
{{ end }} <!-- End Cloudflare Web Analytics -->
{{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
<!-- Keep backwards compatibility and consistency with HUGO defaults --> <!-- Keep backwards compatibility and consistency with HUGO defaults -->
{{ if .Site.Config.Services.GoogleAnalytics.ID }} {{ if site.GoogleAnalytics }}
{{ partial "google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ end }} {{ end }}

View file

@ -4,7 +4,7 @@
<h5 class="card-title mb-0">{{ .name }}</h5> <h5 class="card-title mb-0">{{ .name }}</h5>
<div class="sub-title"> <div class="sub-title">
<span><a href="{{ .organization.url }}" title="{{ .organization.name }}" target="_blank" rel="noopener">{{ .organization.name }}</a></span> <span><a href="{{ .organization.url }}" title="{{ .organization.name }}" target="_blank" rel="noopener">{{ .organization.name }}</a></span>
<span class="ms-2">{{ .timeline }}</span> <span class="ml-2">{{ .timeline }}</span>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -12,7 +12,7 @@
</div> </div>
<div class="card-footer"> <div class="card-footer">
{{ if .certificateURL }} {{ if .certificateURL }}
<a class="btn btn-outline-info ms-1 ps-2 mb-2" href="{{ .certificateURL }}" target="_blank" rel="noopener" role="button">{{ i18n "view_certificate"}}</a> <a class="btn btn-outline-info ml-1 pl-2 mb-2" href="{{ .certificateURL }}" target="_blank" rel="noopener" role="button">{{ i18n "view_certificate"}}</a>
{{ end }} {{ end }}
</div> </div>
</div> </div>

View file

@ -1,26 +1,24 @@
<div class="post-card"> <div class="post-card">
<div class="card"> <a href="{{ .RelPermalink | relLangURL }}" class="post-card-link">
<div class="card-head"> <div class="card">
<a href="{{ .RelPermalink | relLangURL }}" class="post-card-link"> <div class="card-head">
<img class="card-img-top" src='{{ partial "helpers/get-hero.html" . }}' alt="Hero Image"> <img class="card-img-top" src='{{ partial "helpers/get-hero.html" . }}' alt="Hero Image">
</a> </div>
</div> <div class="card-body">
<div class="card-body">
<a href="{{ .RelPermalink | relLangURL }}" class="post-card-link">
<h5 class="card-title">{{ .Title }}</h5> <h5 class="card-title">{{ .Title }}</h5>
<p class="card-text post-summary">{{ .Summary | plainify }}</p> <p class="card-text post-summary">{{ .Summary }}</p>
</a> {{ if and site.Params.features.tags.enable site.Params.features.tags.on_card }}
{{ if and site.Params.features.tags.enable site.Params.features.tags.on_card }} {{ partial "misc/tags.html" .Params.tags }}
{{ partial "misc/tags.html" .Params.tags }} {{ end }}
{{ end }} </div>
<div class="card-footer">
<span class="float-left">
{{ .Date | time.Format ":date_full" }}
{{ if site.Params.features.readingTime }} | {{.ReadingTime}} {{ i18n "minute" .ReadingTime }} {{ end }}</span>
<a
href="{{ .RelPermalink | relLangURL }}"
class="float-right btn btn-outline-info btn-sm">{{ i18n "read" }}</a>
</div>
</div> </div>
<div class="card-footer"> </a>
<span class="float-start">
{{ .Date | time.Format ":date_full" }}
{{ if site.Params.features.readingTime }} | {{.ReadingTime}} {{ i18n "minute" .ReadingTime }} {{ end }}</span>
<a
href="{{ .RelPermalink | relLangURL }}"
class="float-end btn btn-outline-info btn-sm">{{ i18n "read" }}</a>
</div>
</div>
</div> </div>

View file

@ -4,48 +4,26 @@
> >
<div class="card mt-1"> <div class="card mt-1">
<div class="card"> <div class="card">
<a href="{{ if .repo }}{{ .repo }}{{ else if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" {{ if or .repo .url }}target="_blank" rel="noopener"{{ end }}> <a class="card-header" href="{{ if .repo }}{{ .repo }}{{ else if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" {{ if or .repo .url }}target="_blank" rel="noopener"{{ end }}>
{{ if .image }} <div>
<div class="card-head"> <div class="d-flex">
{{ $imageImage:= resources.Get .image}} {{ if .logo }}
{{ if $imageImage }}
{{ $logoImage:= resources.Get .logo}}
{{ if $logoImage }}
{{/* svg don't support "Fit" operation */}} {{/* svg don't support "Fit" operation */}}
{{ if ne $imageImage.MediaType.SubType "svg" }} {{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $imageImage = $imageImage.Fit "1000x1000" }} {{ $logoImage = $logoImage.Fit "24x24" }}
{{ end }} {{ end }}
<img class="card-img-top" src="{{ $imageImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
</div>
{{ end }}
<div class="card-header">
<div>
<div class="d-flex">
{{ if .logo }}
{{ if eq (len (findRE ".*/.*" .logo) ) 0 }} <img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
<i style="padding-right: 0.25em" class="{{.logo}} h4"></i> {{ end }}
<h5 class="card-title mb-0">{{ .name }}</h5>
{{ else }} </div>
<div class="sub-title">
{{ $logoImage:= resources.Get .logo}} <span>{{ .role }}</span>
{{ if $logoImage }} <span>{{ .timeline }}</span>
{{/* 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 }}
{{ end }}
{{ end }}
<h5 class="card-title mb-0">{{ .name }}</h5>
</div>
<div class="sub-title">
<span>{{ .role }}</span>
<span>{{ .timeline }}</span>
</div>
</div> </div>
</div> </div>
</a> </a>

View file

@ -11,22 +11,12 @@
<div class="card-header"> <div class="card-header">
<h5 class="card-title mb-0">{{ .title }}</h5> <h5 class="card-title mb-0">{{ .title }}</h5>
<div class="sub-title"> <div class="sub-title">
<span> <span><a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a></span>
{{ if .publishedIn.url }} <span class="ml-2">{{ .publishedIn.date }}</span>
<a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a>
{{ else }}
<a class="">{{ .publishedIn.name }}</a>
{{ end }}
</span>
<span class="ms-2">{{ .publishedIn.date }}</span>
</div> </div>
<div class="authors"> <div class="authors">
{{ range $index,$author:= .authors }} {{ range $index,$author:= .authors }}
{{if .url}} <span class="mr-2"><a class="" href="{{.url}}">{{ .name }}</a></span>
<span class="me-2"><a class="" href="{{.url}}">{{ .name }}</a></span>
{{ else }}
<span class="me-2"><a class="">{{ .name }}</a></span>
{{ end }}
{{ end }} {{ end }}
</div> </div>
</div> </div>
@ -36,16 +26,14 @@
<div class="card-footer"> <div class="card-footer">
<div class="tags"> <div class="tags">
{{ range $index,$tag:= .tags }} {{ range $index,$tag:= .tags }}
<span class="btn badge btn-info ms-1 p-2"> <span class="btn badge btn-info ml-1 p-2">
{{ $tag }} {{ $tag }}
</span> </span>
{{ end }} {{ end }}
</div> </div>
{{ if .paper.url }}
<div class="details-btn"> <div class="details-btn">
<a class="btn btn-outline-info ms-1 ps-2 mb-2" href="{{ .paper.url }}" target="_blank" rel="noopener" role="button">{{ i18n "project_details"}}</a> <a class="btn btn-outline-info ml-1 pl-2 mb-2" href="{{ .paper.url }}" target="_blank" rel="noopener" role="button">{{ i18n "project_details"}}</a>
</div> </div>
{{ end }}
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,6 +1,4 @@
<div class="col-xs-12 col-sm-6 col-lg-4 pt-2 filtr-item" <div class="col-xs-12 col-sm-6 col-lg-4 pt-2">
data-category='all, {{ with .categories }}{{ delimit . ","}}{{ end }}'
>
<a class="text-decoration-none" {{ if .url }}href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"{{ end }}> <a class="text-decoration-none" {{ if .url }}href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"{{ end }}>
<div class="card"> <div class="card">
<div class="card-head d-flex"> <div class="card-head d-flex">
@ -20,7 +18,7 @@
<h5 class="card-title">{{ .name }}</h5> <h5 class="card-title">{{ .name }}</h5>
{{ end }} {{ end }}
</div> </div>
<div class="card-body text-justify pt-1 pb-1"> <div class="card-body">
<p class="card-text">{{ .summary | markdownify }}</p> <p class="card-text">{{ .summary | markdownify }}</p>
</div> </div>
</div> </div>

View file

@ -66,7 +66,7 @@
<footer id="footer" class="container-fluid text-center align-content-center footer pb-2"> <footer id="footer" class="container-fluid text-center align-content-center footer pb-2">
<div class="container pt-5"> <div class="container pt-5">
<div class="row text-start"> <div class="row text-left">
{{ if $navigationEnabled }} {{ if $navigationEnabled }}
<div class="col-md-4 col-sm-12"> <div class="col-md-4 col-sm-12">
<h5>{{ i18n "navigation" }}</h5> <h5>{{ i18n "navigation" }}</h5>
@ -106,9 +106,7 @@
<span><i class="fas fa-envelope"></i></span> <span>{{ $value }}</span> <span><i class="fas fa-envelope"></i></span> <span>{{ $value }}</span>
</a></li> </a></li>
{{ else if (eq $key "phone") }} {{ else if (eq $key "phone") }}
<li><a href={{ printf "tel:%s" $value | safeURL }} target="_blank" rel="noopener"> <li><span><i class="fas fa-phone-alt"></i></span> <span>{{ $value }}</span></li>
<span><i class="fas fa-phone-alt"></i></span> <span>{{ $value }}</span>
</a></li>
{{ else if (eq $key "linkedin") }} {{ else if (eq $key "linkedin") }}
<li><a href={{ printf "https://www.linkedin.com/in/%s" $value }} target="_blank" rel="noopener"> <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> <span><i class="fab fa-linkedin"></i></span> <span>{{ $author.name }}</span>
@ -117,10 +115,6 @@
<li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener"> <li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener">
<span><i class="fab fa-github"></i></span> <span>{{ $value }}</span> <span><i class="fab fa-github"></i></span> <span>{{ $value }}</span>
</a></li> </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 }} {{ else if reflect.IsMap $value }}
<li> <li>
{{ if (and (isset $value "url") (isset $value "icon"))}} {{ if (and (isset $value "url") (isset $value "icon"))}}
@ -195,7 +189,7 @@
{{ if $credentialsEnabled }} {{ if $credentialsEnabled }}
<hr /> <hr />
<div class="container"> <div class="container">
<div class="row text-start"> <div class="row text-left">
<div class="col-md-4"> <div class="col-md-4">
<a id="theme" href="https://github.com/hugo-toha/toha" target="_blank" rel="noopener"> <a id="theme" href="https://github.com/hugo-toha/toha" target="_blank" rel="noopener">
<img src="{{ $themeLogo }}" alt="Toha Theme Logo"> <img src="{{ $themeLogo }}" alt="Toha Theme Logo">
@ -203,7 +197,7 @@
</a> </a>
</div> </div>
<div class="col-md-4 text-center">{{ $copyrightNotice | markdownify }}</div> <div class="col-md-4 text-center">{{ $copyrightNotice | markdownify }}</div>
<div class="col-md-4 text-end"> <div class="col-md-4 text-right">
<a id="hugo" href="https://gohugo.io/" target="_blank" rel="noopener">{{ i18n "hugoAttributionText" }} <a id="hugo" href="https://gohugo.io/" target="_blank" rel="noopener">{{ i18n "hugoAttributionText" }}
<img <img
src="{{ $hugoLogo }}" src="{{ $hugoLogo }}"

View file

@ -1,22 +0,0 @@
{{ if site.Params.features.analytics.enabled }}
{{- with site.Params.features.analytics.services.google.id }}
{{- if strings.HasPrefix (lower .) "ua-" }}
{{- warnf "Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value." }}
{{- else }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
<script>
var doNotTrack = false;
if ({{ site.Params.features.analytics.services.google.respectDoNotTrack }}) {
var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
var doNotTrack = (dnt == "1" || dnt == "yes");
}
if (!doNotTrack) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ . }}');
}
</script>
{{- end }}
{{- end }}
{{- end -}}

View file

@ -18,7 +18,3 @@
<link rel="icon" type="image/png" href="{{ $favicon }}" /> <link rel="icon" type="image/png" href="{{ $favicon }}" />
{{end}} {{end}}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }}

View file

@ -1,7 +1,7 @@
{{/* Uses the top level site's config for a single author across all locales */}} {{/* Uses the top level site's config for a single author across all locales */}}
{{ $authorName:= site.Params.author.name }} {{ $authorName:= site.Params.author.name }}
{{/* Overrides with the locale specific author if provided */}} {{/* Overrides with the locale specifc author if provided */}}
{{ if (index site.Data site.Language.Lang).author }} {{ if (index site.Data site.Language.Lang).author }}
{{ $authorName = (index site.Data site.Language.Lang).author.name }} {{ $authorName = (index site.Data site.Language.Lang).author.name }}
{{ end }} {{ end }}

View file

@ -69,26 +69,15 @@ params:
# id: foo # id: foo
# name: bar # name: bar
# [Deprecated] The `darkMode` feature # The `darkMode` feature
# This is a deprecated setting, but has not been removed to maintain backward compatibility darkmode:
# If `theme` is set, the `darkMode` setting will be discarded.
darkMode:
enable: true enable: true
# The `theme` feature
theme:
enable: true
services:
light: true # enable light theme. default "true"
dark: true # enable dark theme. default "true"
default: system # can be either light, dark or system. default "system"
This helper will convert the above config into the following env vars: This helper will convert the above config into the following env vars:
* `FEATURE_ANALYTICS=1` * `FEATURE_ANALYTICS=1`
* `FEATURE_ANALYTICS_GOOGLE=1` * `FEATURE_ANALYTICS_GOOGLE=1`
* `FEATURE_DARKMODE=1` * `FEATURE_DARKMODE=1`
* `FEATURE_THEME=1`
In JS, you can use it like this: In JS, you can use it like this:

View file

@ -7,5 +7,5 @@
{{- $scss := $template | resources.ExecuteAsTemplate "styles/application.scss" . -}} {{- $scss := $template | resources.ExecuteAsTemplate "styles/application.scss" . -}}
{{/* Bundle application.scss */}} {{/* Bundle application.scss */}}
{{- $bundle := $scss | css.Sass $options | fingerprint -}} {{- $bundle := $scss | resources.ToCSS $options | fingerprint -}}
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" /> <link rel="stylesheet" href="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" />

View file

@ -1,8 +1,8 @@
<div class="tags"> <div class="tags">
<ul style="padding-left: 0;"> <ul style="padding-left: 0;">
{{ range . }} {{ range . }}
{{ $url:= printf "tags/%s/" . }} {{ $url:= printf "tags/%s/" . }}
<li class="rounded"><a href="{{ $url | urlize | relLangURL }}" class="btn btn-sm btn-info">{{ . }}</a></li> <li class="rounded"><a href="{{ $url | urlize | relLangURL }}" class="btn, btn-sm">{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>

View file

@ -1,21 +1,21 @@
{{ $pageURL:= .RelPermalink }} {{ $pageURL:= .RelPermalink }}
{{ if hugo.IsMultilingual }} {{ if site.IsMultiLingual }}
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }} {{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
{{ end }} {{ end }}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ if ne site.Params.features.flags.enable false }} {{ if ne site.Params.features.flags.enable false }}
{{ $countryCode := partial "helpers/country-code.html" . }} {{ $countryCode := partial "helpers/country-code.html" . }}
<span class="fi fi-{{$countryCode}}"></span> <span class="flag-icon flag-icon-{{$countryCode}}"></span>
{{ end }} {{ end }}
{{ site.Language.LanguageName }} {{ site.Language.LanguageName }}
</a> </a>
<div class="dropdown-menu" aria-labelledby="languageSelector"> <div class="dropdown-menu" aria-labelledby="languageSelector">
{{ range site.Home.AllTranslations }} {{ range site.Home.AllTranslations }}
<a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang $.Sites.Default.Language.Lang) "" .Language.Lang) $pageURL }}"> <a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}">
{{ if ne site.Params.features.flags.enable false }} {{ if ne site.Params.features.flags.enable false }}
{{ $countryCode := partial "helpers/country-code.html" . }} {{ $countryCode := partial "helpers/country-code.html" . }}
<span class="fi fi-{{$countryCode}}"></span> <span class="flag-icon flag-icon-{{$countryCode}}"></span>
{{ end }} {{ end }}
{{ .Language.LanguageName }} {{ .Language.LanguageName }}
</a> </a>

View file

@ -1,8 +1,6 @@
{{/* variables for enabling/disabling various features */}} {{/* variables for enabling/disabling various features */}}
{{ $blogEnabled := site.Params.features.blog.enable | default false }} {{ $blogEnabled := site.Params.features.blog.enable | default false }}
{{ $blogTitle := site.Params.features.blog.title | default (i18n "posts") }}
{{ $notesEnabled := site.Params.features.notes.enable | default false }} {{ $notesEnabled := site.Params.features.notes.enable | default false }}
{{ $notesTitle := site.Params.features.notes.title | default (i18n "notes") }}
{{ $maxVisibleSections := site.Params.topNavbar.maxVisibleSections | default 5 }} {{ $maxVisibleSections := site.Params.topNavbar.maxVisibleSections | default 5 }}
{{/* keep backward compatibility for blog post */}} {{/* keep backward compatibility for blog post */}}
@ -13,7 +11,6 @@
{{/* by default, don't use any logo */}} {{/* by default, don't use any logo */}}
{{ $mainLogo := "" }} {{ $mainLogo := "" }}
{{ $invertedLogo := "" }} {{ $invertedLogo := "" }}
{{ $darkLogo := "" }}
{{/* if custom logo has been provided, use them */}} {{/* if custom logo has been provided, use them */}}
{{ if site.Params.logo.main }} {{ if site.Params.logo.main }}
@ -22,14 +19,11 @@
{{ if site.Params.logo.inverted }} {{ if site.Params.logo.inverted }}
{{ $invertedLogo = site.Params.logo.inverted }} {{ $invertedLogo = site.Params.logo.inverted }}
{{ end }} {{ end }}
{{ if site.Params.logo.dark }}
{{ $darkLogo = site.Params.logo.dark }}
{{ end }}
{{/* resize the logos. don't resize svg because it is not supported */}} {{/* resize the logos. don't resize svg because it is not supported */}}
{{ if $mainLogo }} {{ if $mainLogo }}
{{ $mainLogo = resources.Get $mainLogo}} {{ $mainLogo = resources.Get $mainLogo}}
{{ if and $mainLogo (not (or (eq $mainLogo.MediaType.SubType "svg") (eq $mainLogo.MediaType.SubType "gif"))) }} {{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }}
{{ $mainLogo = $mainLogo.Resize "42x" }} {{ $mainLogo = $mainLogo.Resize "42x" }}
{{ end }} {{ end }}
{{ $mainLogo = $mainLogo.RelPermalink}} {{ $mainLogo = $mainLogo.RelPermalink}}
@ -37,20 +31,12 @@
{{ if $invertedLogo }} {{ if $invertedLogo }}
{{ $invertedLogo = resources.Get $invertedLogo}} {{ $invertedLogo = resources.Get $invertedLogo}}
{{ if and $invertedLogo (not (or (eq $invertedLogo.MediaType.SubType "svg") (eq $invertedLogo.MediaType.SubType "gif"))) }} {{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}}
{{ $invertedLogo = $invertedLogo.Resize "42x" }} {{ $invertedLogo = $invertedLogo.Resize "42x" }}
{{ end }} {{ end }}
{{ $invertedLogo = $invertedLogo.RelPermalink}} {{ $invertedLogo = $invertedLogo.RelPermalink}}
{{ end }} {{ end }}
{{ if $darkLogo }}
{{ $darkLogo = resources.Get $darkLogo}}
{{ if and $darkLogo (not (or (eq $darkLogo.MediaType.SubType "svg") (eq $darkLogo.MediaType.SubType "gif"))) }}
{{ $darkLogo = $darkLogo.Resize "42x" }}
{{ end }}
{{ $darkLogo = $darkLogo.RelPermalink}}
{{ end }}
{{ $logo := $mainLogo }} {{ $logo := $mainLogo }}
{{ if .IsHome }} {{ if .IsHome }}
{{ $logo = $invertedLogo }} {{ $logo = $invertedLogo }}
@ -66,11 +52,6 @@
{{ $sections = (index site.Data site.Language.Lang).sections }} {{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }} {{ end }}
{{ $navBarTitle := (index site.Data site.Language.Lang).site.navBarTitle }}
{{ if not $navBarTitle }}
{{ $navBarTitle = site.Title }}
{{ end }}
<nav class="navbar navbar-expand-xl top-navbar shadow {{ if .IsHome}}transparent-navbar homepage{{end}}" id="top-navbar"> <nav class="navbar navbar-expand-xl top-navbar shadow {{ if .IsHome}}transparent-navbar homepage{{end}}" id="top-navbar">
<div class="container"> <div class="container">
{{ if not .IsHome }} {{ if not .IsHome }}
@ -82,21 +63,21 @@
{{ if $logo }} {{ if $logo }}
<img src="{{ $logo }}" id="logo" alt="Logo"> <img src="{{ $logo }}" id="logo" alt="Logo">
{{ end }} {{ end }}
{{- $navBarTitle -}} {{- site.Title -}}
</a> </a>
<button <button
class="navbar-toggler {{if .IsHome}}navbar-dark{{else}}navbar-light{{end}}" class="navbar-toggler {{if .IsHome}}navbar-dark{{else}}navbar-light{{end}}"
id="navbar-toggler" id="navbar-toggler"
type="button" type="button"
data-bs-toggle="collapse" data-toggle="collapse"
data-bs-target="#top-nav-items" data-target="#top-nav-items"
aria-label="menu" aria-label="menu"
> >
<i data-feather="menu"></i> <i data-feather="menu"></i>
</button> </button>
<div class="collapse navbar-collapse dynamic-navbar" id="top-nav-items"> <div class="collapse navbar-collapse dynamic-navbar" id="top-nav-items">
<ul class="nav navbar-nav ms-auto"> <ul class="nav navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ if .IsHome }}#home{{else}}{{ site.BaseURL | relLangURL }}#home{{end}}">{{ i18n "home" }}</a> <a class="nav-link" href="{{ if .IsHome }}#home{{else}}{{ site.BaseURL | relLangURL }}#home{{end}}">{{ i18n "home" }}</a>
</li> </li>
@ -114,7 +95,7 @@
{{- end }} {{- end }}
{{ if gt $sectionCount $maxVisibleSections }} {{ if gt $sectionCount $maxVisibleSections }}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{i18n "more" }}</a> <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"> <div class="dropdown-menu" aria-labelledby="navbarDropdown">
{{ $sectionCount := 1 }} {{ $sectionCount := 1 }}
{{ range sort $sections "section.weight" }} {{ range sort $sections "section.weight" }}
@ -135,12 +116,12 @@
{{ end }} {{ end }}
{{ if $blogEnabled }} {{ if $blogEnabled }}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="blog-link" href="{{ path.Join (site.BaseURL | relLangURL) "posts" }}">{{ $blogTitle }}</a> <a class="nav-link" id="blog-link" href="{{ path.Join (site.BaseURL | relLangURL) "posts" }}">{{ i18n "posts" }}</a>
</li> </li>
{{ end }} {{ end }}
{{ if $notesEnabled }} {{ if $notesEnabled }}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="note-link" href="{{ path.Join (site.BaseURL | relLangURL) "notes" }}">{{ $notesTitle }}</a> <a class="nav-link" id="note-link" href="{{ path.Join (site.BaseURL | relLangURL) "notes" }}">{{ i18n "notes" }}</a>
</li> </li>
{{ end }} {{ end }}
{{ range $customMenus }} {{ range $customMenus }}
@ -153,7 +134,7 @@
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ partial "navigators/lang-selector.html" . }} {{ partial "navigators/lang-selector.html" . }}
{{ end }} {{ end }}
{{ if or site.Params.features.darkMode.enable site.Params.features.theme.enable }} {{ if site.Params.features.darkMode.enable }}
{{ partial "navigators/theme-selector.html" . }} {{ partial "navigators/theme-selector.html" . }}
{{ end }} {{ end }}
</ul> </ul>
@ -166,7 +147,4 @@
{{ if $invertedLogo }} {{ if $invertedLogo }}
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo"> <img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo">
{{ end }} {{ end }}
{{ if $darkLogo }}
<img src="{{ $darkLogo }}" class="d-none" id="dark-logo" alt="Dark Logo">
{{ end }}
</nav> </nav>

Some files were not shown because too many files have changed in this diff Show more