7 Commits

Author SHA1 Message Date
Andreas Deininger a69388d9b8 Fix deprecation warning emitted by hugo (#904)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2024-03-19 22:26:49 +06:00
dependabot[bot] 600c50c71c Bump actions/checkout from 4.1.1 to 4.1.2 (#905)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.1...v4.1.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-12 11:25:06 +00:00
Bernat Borràs Civil 36e3e4c09c Add dark logos (#903)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2024-03-10 16:02:51 +06:00
Bernat Borràs Civil 803821d7e8 Fixes posts in search results (#900) 2024-02-25 15:20:00 +06:00
Bernat Borràs Civil 1ec4cd2688 Add tags in post cards from search results (#895)
* Add tags in post cards from search results

* Use on_card parameter to decide to show the cards or not

* Fix search cards height

* Minor fix

* Fix null tags

* Fix CSS not applied properly in search page

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

---------

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2024-02-23 23:37:35 +06:00
Bernat Borràs Civil 9f5a44e24e Fix logos (#898) 2024-02-19 15:11:18 +06:00
Bernat Borràs Civil 32e95a572f Update theme.toml for hugoThemesSiteBuilder (#896)
* Update theme.toml

* Add min hugo version
2024-02-16 20:34:13 +06:00
12 changed files with 99 additions and 56 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ 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.1.1 uses: actions/checkout@v4.1.2
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4.1.1 uses: actions/checkout@v4.1.2
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
+3 -3
View File
@@ -10,7 +10,7 @@ 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.1.1 - uses: actions/checkout@v4.1.2
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@@ -35,7 +35,7 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.1.1 - uses: actions/checkout@v4.1.2
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@@ -87,6 +87,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# checkout to latest commit # checkout to latest commit
- uses: actions/checkout@v4.1.1 - uses: actions/checkout@v4.1.2
# run markdown linter # run markdown linter
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
+18
View File
@@ -39,6 +39,8 @@ window.addEventListener('load', async () => {
// save preference to local storage // save preference to local storage
saveScheme(newScheme) saveScheme(newScheme)
setImages(newScheme)
} }
setScheme(loadScheme()) setScheme(loadScheme())
@@ -50,3 +52,19 @@ 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'
}
}
}
+8 -1
View File
@@ -79,6 +79,13 @@ 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,
@@ -86,7 +93,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: value.item.tags, tags: adaptTags(),
categories: value.item.categories, categories: value.item.categories,
snippet snippet
}) })
+16 -4
View File
@@ -28,28 +28,40 @@
{{ 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"> <div id="search-results" style="display: flex; flex-wrap: wrap;">
<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">
<a href="${link}" class="post-card-link"> <div class="card">
<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-left">${date}</span> <span class="float-left">${date}</span>
<a href="${link}" class="float-right 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>
+2 -2
View File
@@ -157,8 +157,8 @@
{{ end }} {{ end }}
<!-- Keep backward compatibility with old config.yaml --> <!-- Keep backward compatibility with old config.yaml -->
{{ if site.DisqusShortname }} {{ if .Site.Config.Services.Disqus.Shortname }}
{{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") site.DisqusShortname) }} {{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") .Site.Config.Services.Disqus.Shortname) }}
{{ end }} {{ end }}
</div> </div>
+1 -1
View File
@@ -56,6 +56,6 @@
{{ end }} {{ end }}
<!-- Keep backwards compatibility and consistency with HUGO defaults --> <!-- Keep backwards compatibility and consistency with HUGO defaults -->
{{ if site.GoogleAnalytics }} {{ if .Site.Config.Services.GoogleAnalytics.ID }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ end }} {{ end }}
+5 -5
View File
@@ -33,13 +33,13 @@
<div class="degree-info card"> <div class="degree-info card">
{{ $logoImage:= resources.Get .institution.logo}} {{ $logoImage:= resources.Get .institution.logo}}
{{ $darkLogoImage:= resources.Get .institution.darkLogo}}
{{ if $logoImage }} {{ if $logoImage }}
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage = $logoImage.Fit "300x300" }}
{{ end }}
<div class="logo-holder"> <div class="logo-holder">
<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" /> <img class="company-logo light-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ if $darkLogoImage }}
<img class="company-logo dark-logo" src="{{ $darkLogoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
</div> </div>
{{ end }} {{ end }}
+5 -6
View File
@@ -33,14 +33,13 @@
<div class="degree-info card"> <div class="degree-info card">
{{ $logoImage:= resources.Get .institution.logo}} {{ $logoImage:= resources.Get .institution.logo}}
{{ $darkLogoImage:= resources.Get .institution.darkLogo}}
{{ if $logoImage }} {{ if $logoImage }}
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage = $logoImage.Fit "300x300" }}
{{ end }}
<div class="logo-holder"> <div class="logo-holder">
<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" /> <img class="company-logo light-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ if $darkLogoImage }}
<img class="company-logo dark-logo" src="{{ $darkLogoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
</div> </div>
{{ end }} {{ end }}
@@ -1,13 +1,13 @@
<div class="col-10 col-lg-8"> <div class="col-10 col-lg-8">
<div class="experience-entry-heading"> <div class="experience-entry-heading">
{{ $logoImage:= resources.Get .company.logo}} {{ $logoImage:= resources.Get .company.logo}}
{{ $darkLogoImage:= resources.Get .company.darkLogo}}
{{ if $logoImage }} {{ if $logoImage }}
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage = $logoImage.Fit "300x300" }}
{{ end }}
<div class="logo-holder"> <div class="logo-holder">
<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" /> <img class="company-logo light-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ if $darkLogoImage }}
<img class="company-logo dark-logo" src="{{ $darkLogoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
</div> </div>
{{ end }} {{ end }}
<!-- Total experience duration on a company is time between the starting date of the oldest position and ending date of most recent position --> <!-- Total experience duration on a company is time between the starting date of the oldest position and ending date of most recent position -->
+25 -18
View File
@@ -1,24 +1,14 @@
# theme.toml template for a Hugo theme name = "Toha"
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
description = "A simple hugo theme for personal portfolio"
homepage = "https://hugo-toha.github.io/"
license = "MIT" license = "MIT"
licenselink = "https://github.com/hugo-toha/toha/blob/master/LICENSE" licenselink = "https://github.com/hugo-toha/toha/blob/master/LICENSE"
min_version = "0.118.0" description = "A simple hugo theme for personal portfolio"
name = "Toha"
# The home page of the theme, where the source can be found.
homepage = "https://github.com/hugo-toha/toha"
# If you have a running demo of the theme.
demosite = "https://hugo-toha.github.io/"
features = [
"Minimalist Design",
"Fully Responsive",
"Multiple Language Support",
"Carefully Designed Cards",
"Experience Timeline",
"Achievement Gallery",
"Sidebar to Categorize the Posts",
"Short Codes",
"Google Analytics Support",
"Disqus Comment Support",
]
tags = [ tags = [
"Portfolio", "Portfolio",
"Blog", "Blog",
@@ -34,7 +24,24 @@ tags = [
"Bootstrap", "Bootstrap",
"Syntax highlighting", "Syntax highlighting",
] ]
features = [
"Minimalist Design",
"Fully Responsive",
"Multiple Language Support",
"Carefully Designed Cards",
"Experience Timeline",
"Achievement Gallery",
"Sidebar to Categorize the Posts",
"Short Codes",
"Google Analytics Support",
"Disqus Comment Support",
]
[author] [author]
homepage = "https://hossainemruz.github.io" homepage = "https://hossainemruz.github.io"
name = "Emruz Hossain" name = "Emruz Hossain"
[module]
[module.hugoVersion]
extended = true
min = "0.118.0"