coryd.dev/src/includes/home/recent-activity.liquid

62 lines
2.1 KiB
Text

<article>
<h2>
{% tablericon "activity" %}
Recent activity
</h2>
{%- for item in items -%}
<article class="{{ item.type }}">
<aside>
{%- if item.featured -%}
{% tablericon "star" %}
{%- endif -%}
<time datetime="{{ item.content_date }}">
{{ item.content_date | date:"%B %e, %Y" }}
</time>
• {{ item.label }}
<span class="client-side">
{%- if item.notes -%}
{% assign notes = item.notes | prepend: "### Notes\n" | markdown %}
{% render "blocks/dialog.liquid",
icon:"info-circle",
content:notes,
id:item.content_date
%}
{%- endif -%}
</span>
</aside>
<h3>
{%- if item.type == "concerts" -%}
{%- capture artistName -%}
{%- if item.artist_url -%}
<a href="{{ item.artist_url }}">{{ item.title | split: ' at ' | first }}</a>
{%- else -%}
{{ item.title | split: ' at ' | first }}
{%- endif -%}
{%- endcapture -%}
{%- capture venue -%}
{%- if item.venue_lat and item.venue_lon -%}
<a href="https://www.openstreetmap.org/?mlat={{ item.venue_lat }}&mlon={{ item.venue_lon }}#map=18/{{ item.venue_lat }}/{{ item.venue_lon }}">{{ item.venue_name }}</a>
{%- else -%}
{{ item.venue_name }}
{%- endif -%}
{%- endcapture -%}
{{ artistName }}
{% if venue %} at {{ venue }}{% endif %}
{%- else -%}
<a href="{{ item.url | prepend: globals.url }}">{{ item.title }}</a>
{%- if item.type == "link" and item.author -%}
<span> via </span>
{%- if item.author.url -%}
<a href="{{ item.author.url }}">{{ item.author.name }}</a>
{%- else -%}
{{ item.author.name }}
{%- endif -%}
{%- endif -%}
{%- endif -%}
</h3>
{% render "blocks/tags.liquid",
18 tags:item.tags
19 %}
</article>
{%- endfor -%}
</article>