mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-07 12:13:59 +00:00
1 parent
917d4b5126
commit
fdfc961f34
4 files changed
+25
-4
No files matched your search
@@ -1,6 +1,12 @@
|
||||
{{ if .Params.header.image }}
|
||||
<div class="article-header">
|
||||
<img src="{{ "/img/" | relURL }}{{ .Params.header.image }}" class="article-banner" itemprop="image">
|
||||
{{ $img_src := urls.Parse .Params.header.image }}
|
||||
{{ if $img_src.Scheme }}
|
||||
<img src="{{ .Params.header.image }}" class="article-banner" itemprop="image">
|
||||
{{ else }}
|
||||
<img src="{{ "/img/" | relURL }}{{ .Params.header.image }}" class="article-banner" itemprop="image">
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.header.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -6,7 +6,12 @@
|
||||
{{ $preview := $post.Params.header.preview | default true }}
|
||||
{{ if and $post.Params.header.image $preview }}
|
||||
<a href="{{ $post.Permalink }}">
|
||||
<img src="{{ "/img/" | relURL }}{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
|
||||
{{ $img_src := urls.Parse $post.Params.header.image }}
|
||||
{{ if $img_src.Scheme }}
|
||||
<img src="{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
|
||||
{{ else }}
|
||||
<img src="{{ "/img/" | relURL }}{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
|
||||
{{ end }}
|
||||
</a>
|
||||
{{end}}
|
||||
<h3 class="article-title" itemprop="headline">
|
||||
|
||||
@@ -8,7 +8,12 @@
|
||||
{{ if .Scratch.Get "image" }}
|
||||
<div>
|
||||
<a href="{{ .Permalink }}">
|
||||
<img src="{{ "/img/" | relURL }}{{ .Scratch.Get "image" }}" class="pub-banner" itemprop="image">
|
||||
{{ $img_src := urls.Parse .Scratch.Get "image" }}
|
||||
{{ if $img_src.Scheme }}
|
||||
<img src="{{ .Scratch.Get "image" }}" class="article-banner" itemprop="image">
|
||||
{{ else }}
|
||||
<img src="{{ "/img/" | relURL }}{{ .Scratch.Get "image" }}" class="article-banner" itemprop="image">
|
||||
{{ end }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -8,7 +8,12 @@
|
||||
{{ if .Scratch.Get "image" }}
|
||||
<div>
|
||||
<a href="{{ .Permalink }}">
|
||||
<img src="{{ "/img/" | relURL }}{{ .Scratch.Get "image" }}" class="pub-banner" itemprop="image">
|
||||
{{ $img_src := urls.Parse .Scratch.Get "image" }}
|
||||
{{ if $img_src.Scheme }}
|
||||
<img src="{{ .Scratch.Get "image" }}" class="article-banner" itemprop="image">
|
||||
{{ else }}
|
||||
<img src="{{ "/img/" | relURL }}{{ .Scratch.Get "image" }}" class="article-banner" itemprop="image">
|
||||
{{ end }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
Reference in new issue
Block a user