feat: link-peek component

This commit is contained in:
Cory Dransfeldt 2024-04-12 09:17:52 -07:00
parent 1f25a4df35
commit 67693635d8
No known key found for this signature in database
12 changed files with 79 additions and 13 deletions

View file

@ -0,0 +1,20 @@
{% capture css %}
{% render "../../assets/styles/components/link-peek.css" %}
{% endcapture %}
<style>{{ css }}</style>
<script type="module" src="/assets/scripts/components/link-peek.js"></script>
<template id="link-peek-template">
<figure>
<figcaption>
<a data-key="data.title, link"></a>
<p data-key="data.description"></p>
<img data-key="data.logo.url" />
<small data-key="data.publisher"></small>
</figcaption>
<img data-key="data.image.url" />
</figure>
</template>
<link-peek api="https://api.microlink.io/?url={{ url }}">
<a href="{{ url }}">{{ title }}</a>
</link-peek>