Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ec4cd2688 | |||
| 9f5a44e24e | |||
| 32e95a572f |
@@ -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
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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;">
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
|
|||||||
@@ -34,10 +34,6 @@
|
|||||||
|
|
||||||
{{ $logoImage:= resources.Get .institution.logo}}
|
{{ $logoImage:= resources.Get .institution.logo}}
|
||||||
{{ 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" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,11 +34,6 @@
|
|||||||
|
|
||||||
{{ $logoImage:= resources.Get .institution.logo}}
|
{{ $logoImage:= resources.Get .institution.logo}}
|
||||||
{{ 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" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
<div class="experience-entry-heading">
|
<div class="experience-entry-heading">
|
||||||
{{ $logoImage:= resources.Get .company.logo}}
|
{{ $logoImage:= resources.Get .company.logo}}
|
||||||
{{ 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" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+25
-18
@@ -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"
|
||||||
Reference in New Issue
Block a user