feat: clearly label last track played; move to recent activity

This commit is contained in:
Cory Dransfeldt 2024-10-26 13:09:48 -07:00
parent 1cd9452c28
commit c5793b9ad4
No known key found for this signature in database
6 changed files with 16 additions and 16 deletions

View file

@ -1,8 +1,8 @@
<script type="module" src="/assets/scripts/components/api-text.js?v={% appVersion %}" crossorigin="anonymous"></script>
<api-text api-url="/api/now-playing">
<p class="loading client-side">{{ nowPlaying }}</p>
<p class="content"></p>
<api-text api-url="/api/now-playing" display="inline">
<span class="loading client-side">{{ nowPlaying }}</span>
<span class="content"></span>
<noscript>
<p>{{ nowPlaying }}</p>
<span>{{ nowPlaying }}</span>
</noscript>
</api-text>

View file

@ -1,4 +1,3 @@
<article>
{{ intro }}
{% render "partials/blocks/now-playing.liquid", nowPlaying:nowPlaying %}
</article>

View file

@ -10,7 +10,8 @@
Recent activity
</h2>
<ul>
<li><span class="music">Top track this week:</span> <a href="{{ track.artist_url }}">{{ track.track_name }} by {{ track.artist_name }}</a></li>
<li><span class="music">Last track listened to:</span> {% render "partials/blocks/now-playing.liquid", nowPlaying:nowPlaying %}</li>
<li><span class="music">Top track this week:</span> {{ track.track_name }} by <a href="{{ track.artist_url }}">{{ track.artist_name }}</a></li>
<li><span class="tv">Last episode watched:</span> <strong class="highlight-text">{{ show.formatted_episode }}</strong> of <a href="{{ show.url }}">{{ show.title }}</a></li>
<li><span class="movies">Last movie watched:</span> <a href="{{ movie.url }}">{{ movie.title }}</a>{%- if movie.rating %} ({{ movie.rating }}){%- endif -%}</li>
<li><span class="books">Last book finished:</span> <a href="{{ book.url }}">{{ book.title }}</a> by {{ book.author }}{%- if book.rating %} ({{ book.rating }}){%- endif -%}</li>

View file

@ -1,6 +1,6 @@
---
permalink: /
---
{% render "partials/home/intro.liquid" intro:globals.intro, nowPlaying:nowPlaying.content %}
{% render "partials/home/recent-activity.liquid" music:music, books:books.currentYear, tv:tv, movies:movies, links:links %}
{% render "partials/home/intro.liquid" intro:globals.intro %}
{% render "partials/home/recent-activity.liquid" music:music, nowPlaying:nowPlaying.content, books:books.currentYear, tv:tv, movies:movies, links:links %}
{% render "partials/home/recent-posts.liquid" posts:posts %}