Add backwards compatibility for twitter share button

This commit is contained in:
Sebastian Zanoni 2023-07-31 08:19:31 +02:00
parent 6c20301bbf
commit c82cdcdc2c

View File

@ -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)) }} {{- if (cond ($custom) (in $ShareButtons "x") (true)) | or (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 }}&amp;url={{ $pageurl }}&amp;hashtags={{- $.Scratch.Get "tags" -}}"> href="https://x.com/intent/tweet/?text={{ $title }}&amp;url={{ $pageurl }}&amp;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">