add gallery content
This commit is contained in:
parent
7e94275ae3
commit
42942b4fbe
221 changed files with 3546 additions and 74 deletions
34
layouts/render-link.html
Normal file
34
layouts/render-link.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<a
|
||||
|
||||
{{ if or (strings.HasPrefix .Destination `http`) (strings.HasPrefix .Destination `#`) (strings.HasPrefix .Destination `/`) }}
|
||||
|
||||
href = "{{ .Destination | safeURL }}"
|
||||
|
||||
{{ else if strings.HasPrefix .Destination `mailto` }}
|
||||
|
||||
href = "mailto:{{ .Text }}"
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ with .Title}}
|
||||
|
||||
title = "{{ . }}"
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ if strings.HasPrefix .Destination "http" }}
|
||||
|
||||
target = "_blank"
|
||||
rel = "nofollow noopener noreferrer"
|
||||
|
||||
{{ else if strings.HasPrefix .Destination "mailto" }}
|
||||
|
||||
onClick = "javascript:window.open('mailto:{{ .Text }}', 'mail'); event.preventDefault()"
|
||||
|
||||
{{ end }}>
|
||||
|
||||
<span>
|
||||
{{ .Text }}
|
||||
</span>
|
||||
|
||||
</a>
|
Loading…
Add table
Add a link
Reference in a new issue