chore: update share button + fixes

This commit is contained in:
Cory Dransfeldt 2024-02-20 14:24:32 -08:00
parent f45eb74c0f
commit 593c2a5a09
No known key found for this signature in database
9 changed files with 37 additions and 51 deletions

View file

@ -1,4 +1,2 @@
<script type="module" src="/assets/scripts/components/now-playing.js"></script>
<div style="height:28px;margin-bottom:1rem">
<now-playing></now-playing>
</div>
<now-playing style="height:28px;margin-bottom:1rem"></now-playing>

View file

@ -2,22 +2,7 @@
{% render "../../assets/styles/components/share-button.css" %}
{% endcapture %}
<style>{{ css }}</style>
<script type="module" src="/assets/scripts/components/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>
<style>
share-button:not(:defined) button,
share-button:defined label {
display: none;
}
</style>
<script type="module" src="/assets/scripts/components/webcare-webshare.js"></script>
<webcare-webshare share-text="{{ title }} {{ url | tagLookup: tagMap }}" share-url="{{ url }}" copy-text="{{ title }} {{ url | tagLookup: tagMap }} {{ url }}">
<button class="icon--small icon--center__vertical" disabled>{% tablericon "share" "Share" %}</button>
</webcare-webshare>

View file

@ -18,7 +18,7 @@ schema: blog
{{ date | readableDate }}
<span class="client-side"> • </span>
</time>
{% render "partials/share-button.liquid", url:postUrl %}
{% render "partials/share-button.liquid", url: postUrl, title: title, tagMap: collections.tagMap %}
</div>
<div class="p-summary hidden">{{ post_excerpt }}</div>
<div class="e-content">