chore: refactoring
This commit is contained in:
parent
df5fddefc0
commit
e0593447eb
40 changed files with 181 additions and 232 deletions
|
@ -1,22 +0,0 @@
|
|||
<div class="avatar-wrapper">
|
||||
<div class="interior">
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev/{{ image }}?class=squaresm 200w,
|
||||
https://cdn.coryd.dev/{{ image }}?class=squaremd 400w,
|
||||
https://cdn.coryd.dev/{{ image }}?class=squarebase 800w,
|
||||
https://cdn.coryd.dev/{{ image }}?class=squarelg 1200w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px,
|
||||
(max-width: 850px) 400px,
|
||||
(max-width: 1000px) 800px,
|
||||
1200px"
|
||||
src="https://cdn.coryd.dev/{{ image }}?class=squarelg"
|
||||
alt="{{ alt }}"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="600"
|
||||
height="600"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
23
src/includes/partials/blocks/mastodon-post.liquid
Normal file
23
src/includes/partials/blocks/mastodon-post.liquid
Normal file
|
@ -0,0 +1,23 @@
|
|||
{%- if post -%}
|
||||
<script type="module" src="/assets/scripts/components/mastodon-post.js"></script>
|
||||
<template id="mastodon-post-template">
|
||||
<blockquote data-key="content"></blockquote>
|
||||
<dl>
|
||||
<dt>{% tablericon "refresh" %}</dt>
|
||||
<dd data-key="reblogs_count"></dd>
|
||||
<dt>{% tablericon "message-circle" %}</dt>
|
||||
<dd data-key="replies_count"></dd>
|
||||
<dt>{% tablericon "star" %}</dt>
|
||||
<dd data-key="favourites_count"></dd>
|
||||
</dl>
|
||||
</template>
|
||||
<span class="client-side">
|
||||
<div class="mastodon-post-wrapper">
|
||||
<mastodon-post>
|
||||
<a href="{{ post }}">
|
||||
Discuss on Mastodon
|
||||
</a>
|
||||
</mastodon-post>
|
||||
</div>
|
||||
</span>
|
||||
{%- endif -%}
|
|
@ -11,7 +11,7 @@
|
|||
</time>
|
||||
</div>
|
||||
<h3>
|
||||
<a href="{{ post.slug }}">{{ post.title }}</a>
|
||||
<a href="{{ post.url }}">{{ post.title }}</a>
|
||||
</h3>
|
||||
{{ post.description | normalize_whitespace | markdown | truncatewords: 50 }}
|
||||
</article>
|
||||
|
|
Reference in a new issue