mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +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 }}
|
{{ if .Params.header.image }}
|
||||||
<div class="article-header">
|
<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 }}
|
{{ with .Params.header.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -6,7 +6,12 @@
|
|||||||
{{ $preview := $post.Params.header.preview | default true }}
|
{{ $preview := $post.Params.header.preview | default true }}
|
||||||
{{ if and $post.Params.header.image $preview }}
|
{{ if and $post.Params.header.image $preview }}
|
||||||
<a href="{{ $post.Permalink }}">
|
<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>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<h3 class="article-title" itemprop="headline">
|
<h3 class="article-title" itemprop="headline">
|
||||||
|
|||||||
@@ -8,7 +8,12 @@
|
|||||||
{{ if .Scratch.Get "image" }}
|
{{ if .Scratch.Get "image" }}
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ .Permalink }}">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -8,7 +8,12 @@
|
|||||||
{{ if .Scratch.Get "image" }}
|
{{ if .Scratch.Get "image" }}
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ .Permalink }}">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in new issue
Block a user