You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
2.5 KiB
40 lines
2.5 KiB
{% if share is not defined %} |
|
{% set share = nostr_share_menu() %} |
|
{% endif %} |
|
{% if share is not null %} |
|
<details class="nostr-share-menu{{ event_menu|default(false) ? ' nostr-share-menu--event' : '' }}"> |
|
<summary class="nostr-share-menu__trigger btn btn-secondary btn-sm" title="Nostr options" aria-label="Nostr options"> |
|
{% if event_menu|default(false) %} |
|
<span class="nostr-share-menu__glyph" aria-hidden="true">⋯</span> |
|
{% else %} |
|
<span class="nostr-share-menu__label">Nostr</span><span class="nostr-share-menu__glyph" aria-hidden="true">⋯</span> |
|
{% endif %} |
|
</summary> |
|
<ul class="nostr-share-menu__list" role="menu"> |
|
{% if share.npub is not null and share.npub is not same as('') %} |
|
<li class="nostr-share-menu__item" role="none" |
|
data-controller="copy-text" |
|
data-copy-text-text-value="{{ share.npub|e('html_attr') }}"> |
|
<button type="button" class="nostr-share-menu__action" data-action="click->copy-text#copy" data-copy-text-target="button" role="menuitem">Copy npub</button> |
|
</li> |
|
{% endif %} |
|
{% if share.naddrBech32 is not null and share.naddrBech32 is not same as('') %} |
|
<li class="nostr-share-menu__item" role="none" |
|
data-controller="copy-text" |
|
data-copy-text-text-value="{{ share.naddrBech32|e('html_attr') }}"> |
|
<button type="button" class="nostr-share-menu__action" data-action="click->copy-text#copy" data-copy-text-target="button" role="menuitem">Copy naddr</button> |
|
</li> |
|
{% endif %} |
|
{% if share.neventBech32 is not null and share.neventBech32 is not same as('') %} |
|
<li class="nostr-share-menu__item" role="none" |
|
data-controller="copy-text" |
|
data-copy-text-text-value="{{ share.neventBech32|e('html_attr') }}"> |
|
<button type="button" class="nostr-share-menu__action" data-action="click->copy-text#copy" data-copy-text-target="button" role="menuitem">Copy nevent</button> |
|
</li> |
|
{% endif %} |
|
<li class="nostr-share-menu__item" role="none"> |
|
<a class="nostr-share-menu__action" role="menuitem" href="{{ share.jumbleHref|e('html_attr') }}" target="_blank" rel="nofollow noopener noreferrer">View on Jumble</a> |
|
</li> |
|
</ul> |
|
</details> |
|
{% endif %}
|
|
|