Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ baseurl = "https://www.onlyspoolz.com/"
title = "Database of filament spools info"
theme = "hugo-creative-portfolio-theme"
languageCode = "en-us"
assetDir = "static"
# Enable comments by entering your Disqus shortname
disqusShortname = ""
# Enable Google Analytics by entering your tracking code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 masonry-item">
<div class="box-masonry">
{{ if and (isset .Params "image") .Params.image }}
{{ $img := resources.Get .Params.image }}
{{ $optimized := $img.Fit "1100x1100 webp picture q60" }}
{{ if eq .Params.showonlyimage true }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay">
{{ else }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay with-hover-icon">
{{ end }}
<img src="{{.Params.image | absURL}}" alt="" class="img-responsive">
<img src="{{ $optimized.RelPermalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
loading="lazy" alt="" class="img-responsive">
</a>
{{ end }}
{{ if eq .Params.showonlyimage true }}
Expand Down