chore: split out styles + only load where needed
This commit is contained in:
parent
f21e8b18ae
commit
67fcfdb051
26 changed files with 539 additions and 454 deletions
|
@ -1,4 +1,10 @@
|
|||
{% if data.size > 0 %}
|
||||
{% capture css %}
|
||||
{% render "../../../assets/styles/widgets/media-grid.css" %}
|
||||
{% endcapture %}
|
||||
<style>
|
||||
{{ css | cssmin }}
|
||||
</style>
|
||||
{% assign media = data | normalizeMedia %}
|
||||
<h2 class="now__section--header flex--centered">
|
||||
{% tablericon icon title %}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{% if percentage %}
|
||||
{% capture css %}
|
||||
{% render "../../../assets/styles/widgets/media-grid.css" %}
|
||||
{% endcapture %}
|
||||
<style>
|
||||
{{ css | cssmin }}
|
||||
</style>
|
||||
<div class="progress-bar__wrapper">
|
||||
<div style="width:{{ percentage }}" class="progress-bar shadow-none flex flex-col whitespace-nowrap justify-center bg-blue-600 dark:bg-blue-400"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/paginator.css" %}
|
||||
{% endcapture %}
|
||||
<style>
|
||||
{{ css | cssmin }}
|
||||
</style>
|
||||
<nav class="pagination flex--centered">
|
||||
{% if pagination.href.previous %}
|
||||
<a href="{{ pagination.href.previous }}">
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
{% capture css %}
|
||||
{% render "../../assets/styles/widgets/popular-posts.css" %}
|
||||
{% endcapture %}
|
||||
<style>
|
||||
{{ css | cssmin }}
|
||||
</style>
|
||||
{% assign posts = posts | getPopularPosts: analytics %}
|
||||
<div class="popular-posts">
|
||||
<h2 class="flex--centered">
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{% assign mentions = webmentions.mentions | webmentionsByUrl: page.url %}
|
||||
{% if mentions %}
|
||||
{% capture css %}
|
||||
{% render "../../../assets/styles/widgets/webmentions.css" %}
|
||||
{% endcapture %}
|
||||
<style>
|
||||
{{ css | cssmin }}
|
||||
</style>
|
||||
<div class="webmentions">
|
||||
{% render "partials/webmentions/interaction.liquid", mentions: mentions, type: 'repost-of' %}
|
||||
{% render "partials/webmentions/interaction.liquid", mentions: mentions, type: 'like-of' %}
|
||||
|
|
Reference in a new issue