Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ec4cd2688 | |||
| 9f5a44e24e | |||
| 32e95a572f |
@@ -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
|
||||
})
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
@@ -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"
|
||||
Reference in New Issue
Block a user