chore: organization

This commit is contained in:
Cory Dransfeldt 2024-04-29 18:12:37 -07:00
parent 1932b02c8f
commit e3e4ab0335
No known key found for this signature in database
39 changed files with 44 additions and 44 deletions

View file

@ -0,0 +1,8 @@
<div class="addon-links">
{%- if analytics.size > 0 -%}
<div>{% render "partials/widgets/popular-posts.liquid", posts:posts, analytics:analytics %}</div>
{%- endif -%}
{%- if links.size > 0 -%}
<div>{% render "partials/widgets/recent-links.liquid", links:links %}</div>
{%- endif -%}
</div>

View file

@ -0,0 +1,22 @@
<div class="badge-grid">
<a href="https://11ty.dev">
{% image './src/assets/img/badges/eleventy.png', 'Made with 11ty', '', 'lazy' %}
</a>
<a href="https://social.lol/@cory">
{% image './src/assets/img/badges/mastodon.png', 'Follow me on Mastodon', '', 'lazy' %}
</a>
{% image './src/assets/img/badges/notarobot.png', 'Not a robot', '', 'lazy' %}
<a href="https://github.com/cdransf">
{% image './src/assets/img/badges/github.png', 'Check out my GitHub', '', 'lazy' %}
</a>
<a href="https://www.last.fm/user/coryd_">
{% image './src/assets/img/badges/lastfm.png', 'Follow me on Last.fm', '', 'lazy' %}
</a>
<a href="https://www.buymeacoffee.com/cory">
{% image './src/assets/img/badges/buymeacoffee.png', 'Buy Me a Coffee', '', 'lazy' %}
</a>
{% image './src/assets/img/badges/validhtml5.png', 'Valid HTML5', '', 'lazy' %}
<a href="https://coryd.dev/feeds">
{% image './src/assets/img/badges/validrss.png', 'Valid RSS', '', 'lazy' %}
</a>
</div>

View file

@ -0,0 +1,16 @@
<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>

View file

@ -0,0 +1,24 @@
{%- assign shareLink = postUrl | findPost: linkPosts -%}
{%- if shareLink %}
<script type="module" src="/assets/scripts/components/mastodon-post.js"></script>
<template id="mastodon-post-template">
<div class="mastodon-post-wrapper">
<blockquote data-key="content"></blockquote>
<dl>
<dt>{% tablericon "refresh" "Reposts" %}</dt>
<dd data-key="reblogs_count"></dd>
<dt>{% tablericon "message-circle" "Replies" %}</dt>
<dd data-key="replies_count"></dd>
<dt>{% tablericon "star" "Favorites" %}</dt>
<dd data-key="favourites_count"></dd>
</dl>
</div>
</template>
<span class="client-side">
<mastodon-post>
<a href="{{ shareLink }}">
Discuss on Mastodon
</a>
</mastodon-post>
</span>
{% endif -%}

View file

@ -0,0 +1,5 @@
<script type="module" src="/assets/scripts/components/api-text.js"></script>
<api-text class="client-side" api-url="/api/now-playing">
<p class="loading">🎧 Loading...</p>
<p class="content"></p>
</api-text>

View file

@ -0,0 +1,39 @@
<script type="module" src="/assets/scripts/components/select-pagination.js"></script>
<nav aria-label="Pagination" class="pagination flex-centered">
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}" aria-label="Previous page">
{% tablericon "arrow-left" "Previous" %}
</a>
{% else %}
<span
class="disabled"
aria-label="Previous page (disabled)"
disabled>
{% tablericon "arrow-left" "Prevous" %}
</span>
{% endif %}
<select-pagination>
<select aria-label="Page selection">
{% for pageEntry in pagination.pages %}
<option value="{{ forloop.index | minus: 1 }}">{{ forloop.index }} of {{ pagination.links.size }}</option>
{% endfor %}
</select>
<noscript>
<div class="text-centered">
<span aria-current="page">{{ pagination.pageNumber | plus: 1 }}</span> of {{ pagination.links.size }}
</div>
</noscript>
</select-pagination>
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}" aria-label="Next page">
{% tablericon "arrow-right" "Next" %}
</a>
{% else %}
<span
class="disabled"
aria-label="Next page (disabled)"
disabled>
{% tablericon "arrow-right" "Next" %}
</span>
{% endif %}
</nav>

View file

@ -0,0 +1,16 @@
{% assign posts = posts | getPopularPosts: analytics %}
{% if posts.size > 0 %}
<h2 class="link-list-header flex-centered">
{% tablericon "flame" "Popular" %}
Popular posts
</h2>
<ul class="link-list">
{% for post in posts limit: 5 %}
<li>
<a class="no-underline" href="{{post.url}}" title="{{ post.data.title | escape}}">
{{ post.data.title }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}

View file

@ -0,0 +1,10 @@
<div class="post-graph">
{% assign years = postYears | reverse %}
{%- for year in years %}
<div class="wrapper">
<div class="year">{{ year.year }}</div>
<div class="progress" style="width: {{ year.yearProgress }}%"></div>
<div class="data">{{ year.postCount }}</div>
</div>
{% endfor %}
</div>

View file

@ -0,0 +1,15 @@
{% if links.size > 0 %}
<h2 id="links" class="link-list-header flex-centered">
{% tablericon "link" "Links" %}
Recent links
</h2>
<ul class="link-list">
{% for link in links limit: 5 %}
<li>
<a href="{{ link.data.link }}" title="{{ link.data.title | escape }}">
{{ link.data.title }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}

View file

@ -0,0 +1,4 @@
<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="share icon-small icon-center-vertical" disabled>{% tablericon "share" "Share" %}</button>
</webcare-webshare>

View file

@ -0,0 +1,6 @@
{% assign filteredTags = tags | filterTags %}
<div{% if hasSpace %} style="margin-bottom:var(--sizing-md)"{% endif %}>
{% for tag in filteredTags limit: 10 %}
<a class="post-tag" href="/tags/{{ tag | downcase }}">{{ tag | formatTag }}</a>
{% endfor %}
</div>

View file

@ -0,0 +1,3 @@
<script type="module" src="/assets/scripts/components/youtube-video-element.js"></script>
<style>youtube-video{aspect-ratio:16/9!important;width:100%!important}</style>
<youtube-video controls src="{{ url }}"></youtube-video>