3 Commits

Author SHA1 Message Date
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
6 changed files with 53 additions and 40 deletions
+8 -1
View File
@@ -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 += '<li class="rounded"><a href="/tags/' + t.toLowerCase() + '/" class="btn btn-sm btn-info">' + t + "</a></li>"});
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
})
+18 -6
View File
@@ -28,28 +28,40 @@
{{ end }}
{{ define "content" }}
<script>
document.body.classList.replace('kind-page', 'kind-section');
</script>
<section class="content-section" id="content-section">
<div class="content container-fluid" id="content">
<div class="container-fluid post-card-holder" id="post-card-holder">
<div id="search-results">
<div id="search-results" style="display: flex;">
<script id="search-result-template" type="text/x-js-template">
<div class="post-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">
<div class="card-head">
<a href="${link}" class="post-card-link">
<img class="card-img-top" src="${hero}" alt="Card Heading Image">
</a>
</div>
<div class="card-body">
<h5 class="card-title">${title}</h5>
<p class="card-text post-summary">${summary}</p>
<a href="${link}" class="post-card-link">
<h5 class="card-title">${title}</h5>
<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 class="card-footer">
<span class="float-left">${date}</span>
<a href="${link}" class="float-right btn btn-outline-info btn-sm">Read</a>
</div>
</div>
</a>
</div>
</script>
@@ -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 }}
<div class="logo-holder">
<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
</div>
-5
View File
@@ -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 }}
<div class="logo-holder">
<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
</div>
@@ -2,10 +2,6 @@
<div class="experience-entry-heading">
{{ $logoImage:= resources.Get .company.logo}}
{{ if $logoImage }}
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage = $logoImage.Fit "300x300" }}
{{ end }}
<div class="logo-holder">
<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
</div>
+27 -20
View File
@@ -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"