From 32e95a572f000055192a15d27208f7897bed21a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:34:13 +0100 Subject: [PATCH 01/74] Update theme.toml for hugoThemesSiteBuilder (#896) * Update theme.toml * Add min hugo version --- theme.toml | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/theme.toml b/theme.toml index 3ab6525..0032852 100644 --- a/theme.toml +++ b/theme.toml @@ -1,24 +1,14 @@ -# theme.toml template for a Hugo theme -# See https://github.com/gohugoio/hugoThemes#themetoml for an example -description = "A simple hugo theme for personal portfolio" -homepage = "https://hugo-toha.github.io/" +name = "Toha" license = "MIT" licenselink = "https://github.com/hugo-toha/toha/blob/master/LICENSE" -min_version = "0.118.0" -name = "Toha" +description = "A simple hugo theme for personal portfolio" + +# 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 = [ "Portfolio", "Blog", @@ -34,7 +24,24 @@ tags = [ "Bootstrap", "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] -homepage = "https://hossainemruz.github.io" -name = "Emruz Hossain" + homepage = "https://hossainemruz.github.io" + name = "Emruz Hossain" + +[module] + [module.hugoVersion] + extended = true + min = "0.118.0" \ No newline at end of file From 9f5a44e24ea5397fcfc3bcd5ffa1b4c70572069e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:11:18 +0100 Subject: [PATCH 02/74] Fix logos (#898) --- layouts/partials/sections/education-alt.html | 4 ---- layouts/partials/sections/education.html | 5 ----- layouts/partials/sections/experiences/positions.html | 4 ---- 3 files changed, 13 deletions(-) diff --git a/layouts/partials/sections/education-alt.html b/layouts/partials/sections/education-alt.html index 3c6273b..cbb6120 100644 --- a/layouts/partials/sections/education-alt.html +++ b/layouts/partials/sections/education-alt.html @@ -34,10 +34,6 @@ {{ $logoImage:= resources.Get .institution.logo}} {{ if $logoImage }} - {{/* svg don't support "Fit" operation */}} - {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage = $logoImage.Fit "300x300" }} - {{ end }}
diff --git a/layouts/partials/sections/education.html b/layouts/partials/sections/education.html index afd586d..fcfb8e5 100644 --- a/layouts/partials/sections/education.html +++ b/layouts/partials/sections/education.html @@ -34,11 +34,6 @@ {{ $logoImage:= resources.Get .institution.logo}} {{ if $logoImage }} - {{/* svg don't support "Fit" operation */}} - {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage = $logoImage.Fit "300x300" }} - {{ end }} -
diff --git a/layouts/partials/sections/experiences/positions.html b/layouts/partials/sections/experiences/positions.html index 514d449..367801b 100644 --- a/layouts/partials/sections/experiences/positions.html +++ b/layouts/partials/sections/experiences/positions.html @@ -2,10 +2,6 @@
{{ $logoImage:= resources.Get .company.logo}} {{ if $logoImage }} - {{/* svg don't support "Fit" operation */}} - {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage = $logoImage.Fit "300x300" }} - {{ end }}
From 1ec4cd2688547cd26b556a0b568fe38459458d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Fri, 23 Feb 2024 18:37:35 +0100 Subject: [PATCH 03/74] 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 --------- Signed-off-by: hossainemruz Co-authored-by: Emruz Hossain --- assets/scripts/pages/search.js | 9 ++++++++- layouts/_default/search.html | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/assets/scripts/pages/search.js b/assets/scripts/pages/search.js index cd5eb08..87cd0c5 100644 --- a/assets/scripts/pages/search.js +++ b/assets/scripts/pages/search.js @@ -79,6 +79,13 @@ window.addEventListener('DOMContentLoaded', () => { // pull template from hugo template definition const templateDefinition = document.getElementById('search-result-template').innerHTML // replace values + function adaptTags() { + const tags = value.item.tags; + let string = ''; + if (tags) tags.forEach((t) => {string += '
  • ' + t + "
  • "}); + return string; + } + const output = render(templateDefinition, { key, title: value.item.title, @@ -86,7 +93,7 @@ window.addEventListener('DOMContentLoaded', () => { date: value.item.date, summary: value.item.summary, link: value.item.permalink, - tags: value.item.tags, + tags: adaptTags(), categories: value.item.categories, snippet }) diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 75aad98..5877e7d 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -28,28 +28,40 @@ {{ end }} {{ define "content" }} +
    -
    +
    From 803821d7e8d92b236e8d55fbfa095beee63b389b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Sun, 25 Feb 2024 10:20:00 +0100 Subject: [PATCH 04/74] Fixes posts in search results (#900) --- layouts/_default/search.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 5877e7d..9475868 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -34,7 +34,7 @@
    -
    +
    - +
    {{ block "navbar" . }} {{ end }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 9475868..371c808 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -58,8 +58,8 @@ {{ end }}
    diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8981d32..9d59e76 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -37,7 +37,7 @@
    {{ if site.Params.features.blog.showAuthor | default true }} -
    +
    Author Image
    {{ partial "helpers/get-author-name.html" . }}

    {{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}

    @@ -51,7 +51,7 @@
    {{ if not (site.Params.features.blog.showAuthor | default true) }} -
    +

    {{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}

    {{ end }} @@ -64,7 +64,7 @@
    -
    +
    - +
    @@ -175,7 +175,7 @@
    {{ if and site.Params.features.toc.enable ( .Params.enableTOC | default true ) }}
    -
    {{ i18n "toc_heading" }}
    +
    {{ i18n "toc_heading" }}

    {{ .TableOfContents }} diff --git a/layouts/index.html b/layouts/index.html index 81296de..5a1faf2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -29,7 +29,7 @@ document.documentElement.setAttribute('data-theme', theme); - + {{- partial "navigators/navbar.html" . -}} diff --git a/layouts/partials/cards/accomplishments.html b/layouts/partials/cards/accomplishments.html index a62fa22..27015b1 100644 --- a/layouts/partials/cards/accomplishments.html +++ b/layouts/partials/cards/accomplishments.html @@ -4,7 +4,7 @@
    {{ .name }}
    {{ .organization.name }} - {{ .timeline }} + {{ .timeline }}
    @@ -12,7 +12,7 @@
    diff --git a/layouts/partials/cards/post.html b/layouts/partials/cards/post.html index 99178bc..4426b7c 100644 --- a/layouts/partials/cards/post.html +++ b/layouts/partials/cards/post.html @@ -15,12 +15,12 @@ {{ end }}
    diff --git a/layouts/partials/cards/publication.html b/layouts/partials/cards/publication.html index bdc7b21..2c238e1 100644 --- a/layouts/partials/cards/publication.html +++ b/layouts/partials/cards/publication.html @@ -12,11 +12,11 @@
    {{ .title }}
    {{ .publishedIn.name }} - {{ .publishedIn.date }} + {{ .publishedIn.date }}
    {{ range $index,$author:= .authors }} - {{ .name }} + {{ .name }} {{ end }}
    @@ -26,13 +26,13 @@
    diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 048074f..c04bd7a 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -66,7 +66,7 @@