fix: account for js being disabled

This commit is contained in:
Cory Dransfeldt 2024-02-19 12:34:34 -08:00
parent 1690b368fc
commit ca2c7f177d
No known key found for this signature in database
4 changed files with 26 additions and 19 deletions

View file

@ -18,9 +18,11 @@
</dl>
</div>
</template>
<mastodon-post>
<a href="{{ shareLink }}">
Discuss on Mastodon
</a>
</mastodon-post>
<span class="client-side">
<mastodon-post>
<a href="{{ shareLink }}">
Discuss on Mastodon
</a>
</mastodon-post>
</span>
{% endif -%}

View file

@ -3,18 +3,20 @@
{% endcapture %}
<style>{{ css }}</style>
<script type="module" src="/assets/scripts/share-button.js"></script>
<share-button>
<button class="icon--small icon--center__vertical">{% tablericon "share" "Share" %}</button>
<label>
Share this page
<input
type="url"
readonly
value="{{ url }}"
onclick="this.select()"
/>
</label>
</share-button>
<span class="client-side">
<share-button>
<button class="icon--small icon--center__vertical">{% tablericon "share" "Share" %}</button>
<label>
Share this page
<input
type="url"
readonly
value="{{ url }}"
onclick="this.select()"
/>
</label>
</share-button>
</span>
<style>
share-button:not(:defined) button,
share-button:defined label {