🎉 Hello World
This commit is contained in:
16
layouts/_default/_markup/render-image.html
Normal file
16
layouts/_default/_markup/render-image.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- $url := .Destination | safeURL -}}
|
||||
{{- $block := gt (len .Title) 0 -}}
|
||||
|
||||
{{- if $block -}}
|
||||
<span class="image-container"><span class="link">
|
||||
{{- end -}}
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="{{- $url -}}"><img {{ if $block }}class="img"{{ end }} src="{{- $url -}}"
|
||||
alt{{- with .Text -}}="{{- . -}}" {{- end -}} /></a>
|
||||
{{- if $block -}}
|
||||
</span>
|
||||
{{- if ne .Title " " -}}
|
||||
<span class="caption"><span class="title">{{- .Title | safeHTML -}}</span></span>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
5
layouts/_default/_markup/render-link.html
Normal file
5
layouts/_default/_markup/render-link.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- $url := .Destination | safeURL -}}
|
||||
{{- $text := .Text | safeHTML -}}
|
||||
<a href="{{- $url -}}"
|
||||
{{- with .Title -}}title="{{- . -}}"{{- end -}}
|
||||
{{- if strings.HasPrefix $url "http" -}}target="_blank"{{- end -}}>{{- $text -}}</a>
|
Reference in New Issue
Block a user