feat: now playing web component
This commit is contained in:
parent
2c606a6d13
commit
a4607bccd9
28 changed files with 159 additions and 131 deletions
|
@ -122,7 +122,6 @@
|
|||
<script>{{ theme }}</script>
|
||||
{{ content }}
|
||||
{% capture js %}
|
||||
{% render "../assets/scripts/now-playing.js" %}
|
||||
{% render "../assets/scripts/theme-handler.js" %}
|
||||
{% endcapture %}
|
||||
<script>
|
||||
|
|
|
@ -3,8 +3,8 @@ layout: default
|
|||
---
|
||||
{% capture css %}
|
||||
{% render "../assets/styles/pages/now.css" %}
|
||||
{% render "../assets/styles/widgets/media-grid.css" %}
|
||||
{% render "../assets/styles/widgets/progress-bar.css" %}
|
||||
{% render "../assets/styles/components/media-grid.css" %}
|
||||
{% render "../assets/styles/components/progress-bar.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
{{ content }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% assign isOldPost = date | oldPost %}
|
||||
{% if isOldPost %}
|
||||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/banner-old-post.css" %}
|
||||
{% render "../../assets/styles/components/banner-old-post.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
<div class="banner__old-post">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{%- assign shareLink = postUrl | findPost: linkPosts -%}
|
||||
{%- if shareLink %}
|
||||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/mastodon-post.css" %}
|
||||
{% render "../../assets/styles/components/mastodon-post.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
<script type="module" src="/assets/scripts/mastodon-post.js"></script>
|
||||
<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>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% if data.size > 0 %}
|
||||
{% if embeddedStyles == true %}
|
||||
{% capture css %}
|
||||
{% render "../../../assets/styles/widgets/media-grid.css" %}
|
||||
{% render "../../../assets/styles/widgets/progress-bar.css" %}
|
||||
{% render "../../../assets/styles/components/media-grid.css" %}
|
||||
{% render "../../../assets/styles/components/progress-bar.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,8 +1,2 @@
|
|||
<p id="now-playing" class="now-playing client-side">
|
||||
<span id="now-playing-loading" class="icon--spin">
|
||||
{% tablericon 'loader-2' 'Loading...' %}
|
||||
</span>
|
||||
<span id="now-playing-display">
|
||||
<span id="now-playing-content"></span>
|
||||
</span>
|
||||
</p>
|
||||
<script type="module" src="/assets/scripts/components/now-playing.js"></script>
|
||||
<now-playing></now-playing>
|
|
@ -1,5 +1,5 @@
|
|||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/paginator.css" %}
|
||||
{% render "../../assets/styles/components/paginator.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
<nav aria-label="Blog pagination" class="pagination flex--centered">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/popular-posts.css" %}
|
||||
{% render "../../assets/styles/components/popular-posts.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
{% assign posts = posts | getPopularPosts: analytics %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/post-graph.css" %}
|
||||
{% render "../../assets/styles/components/post-graph.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
<div class="post-graph">
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/share-button.css" %}
|
||||
{% render "../../assets/styles/components/share-button.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
<script type="module" src="/assets/scripts/share-button.js"></script>
|
||||
<span class="client-side">
|
||||
<share-button>
|
||||
<button class="icon--small icon--center__vertical">{% tablericon "share" "Share" %}</button>
|
||||
<label>
|
||||
Share this page
|
||||
<input
|
||||
type="url"
|
||||
readonly
|
||||
value="{{ url }}"
|
||||
onclick="this.select()"
|
||||
/>
|
||||
</label>
|
||||
</share-button>
|
||||
</span>
|
||||
<script type="module" src="/assets/scripts/components/share-button.js"></script>
|
||||
<share-button>
|
||||
<button class="icon--small icon--center__vertical">{% tablericon "share" "Share" %}</button>
|
||||
<label>
|
||||
Share this page
|
||||
<input
|
||||
type="url"
|
||||
readonly
|
||||
value="{{ url }}"
|
||||
onclick="this.select()"
|
||||
/>
|
||||
</label>
|
||||
</share-button>
|
||||
<style>
|
||||
share-button:not(:defined) button,
|
||||
share-button:defined label {
|
||||
|
|
Reference in a new issue