simplify condition
This commit is contained in:
parent
c82cdcdc2c
commit
38e137066a
@ -14,7 +14,7 @@
|
|||||||
{{- with $ShareButtons }}{{ $custom = true }}{{ end }}
|
{{- with $ShareButtons }}{{ $custom = true }}{{ end }}
|
||||||
|
|
||||||
<div class="share-buttons">
|
<div class="share-buttons">
|
||||||
{{- if (cond ($custom) (in $ShareButtons "x") (true)) | or (cond ($custom) (in $ShareButtons "twitter") (true)) }}
|
{{- if (or (cond ($custom) (in $ShareButtons "x") (true)) (cond ($custom) (in $ShareButtons "twitter") (true))) }}
|
||||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on x"
|
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on x"
|
||||||
href="https://x.com/intent/tweet/?text={{ $title }}&url={{ $pageurl }}&hashtags={{- $.Scratch.Get "tags" -}}">
|
href="https://x.com/intent/tweet/?text={{ $title }}&url={{ $pageurl }}&hashtags={{- $.Scratch.Get "tags" -}}">
|
||||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||||
@ -68,4 +68,4 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user