+
+
+ {{thread.account.display_name | safe}}
+
+
+
+
+
+
+ {{thread.content | safe}}
+ {% if thread.descendants is defined %}
+ {% for media in thread.media_attachments %}
+ {% if media.type == 'image'%}
+
+
+
+ {% elif media.type == 'gifv' %}
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% if thread.media_attachments|length <= 0 and thread.card %}
+
+
+
+ {{ thread.card.provider_name or
+ thread.card.provider_url }}
+
+ {{ thread.card.title }}
+ {{thread.card.description}}
+
+
+ {% endif %}
+
+
+ {% if is_thread %}
+
Read full thread
+ {% endif %}
+
+
diff --git a/templates/mock.html b/templates/mock.html
new file mode 100644
index 0000000..6b3be45
--- /dev/null
+++ b/templates/mock.html
@@ -0,0 +1,3 @@
+
+ hey {{ data }}
+
diff --git a/templates/threads.html b/templates/threads.html
index 2d3dcda..b930aeb 100644
--- a/templates/threads.html
+++ b/templates/threads.html
@@ -74,7 +74,7 @@
}
main.thread {
- & li:not(:last-of-type) .card_avatar::after {
+ & .card:not(:last-of-type) .card_avatar::after {
content: " ";
display: block;
height: 100%;
@@ -91,13 +91,6 @@
width: 50px;
}
- ul {
- list-style: none;
- padding-left: 0;
- display: grid;
- gap: 1em;
- }
-
.card {
grid-template-columns: 55px auto;
display: grid;
@@ -188,13 +181,6 @@
}
- & .action {
- color: var(--color-link);
- margin: 1em 0;
- cursor: pointer;
- margin-top: 1em;
- }
-
& .link_card {
color: var(--text-color-dark-faded);
text-decoration: underline;
@@ -220,7 +206,7 @@
}
main.thread {
- & li:not(:last-of-type) .card_avatar::after {
+ & .card:not(:last-of-type) .card_avatar::after {
border-right: 2px solid rgba(197, 209, 222, 0.15);
}
}
@@ -266,165 +252,18 @@
-
-
{% for thread in threads %}
- -
-
- {% if thread.account.avatar is defined %}
-

- {% endif %}
-
-
-
-
-
- {{thread.account.display_name | safe}}
-
-
-
-
-
-
- {{thread.content | safe}}
- {% if thread.descendants is defined %}
- {% for media in thread.media_attachments %}
- {% if media.type == 'image'%}
-
-
-
- {% elif media.type == 'gifv' %}
-
- {% endif %}
- {% endfor %}
- {% endif %}
- {% if thread.media_attachments|length <= 0 and thread.card %}
-
-
-
- {{ thread.card.provider_name or
- thread.card.provider_url }}
-
- {{ thread.card.title }}
- {{thread.card.description}}
-
-
- {% endif %}
-
-
-
- {% if thread.descendants is defined %}
-
- {% for descendant in thread.descendants %}
-
-
-
- {% if descendant.account.avatar is defined %}
-

- {% endif %}
-
-
-
-
-
- {{descendant.account.display_name | safe}}
-
-
-
-
-
-
- {{ descendant.content | safe }}
- {% for media in descendant.media_attachments %}
- {% if media.type == 'image'%}
-
-
-
- {% elif media.type == 'gifv' %}
-
- {% endif %}
- {% endfor %}
- {% if descendant.media_attachments|length <= 0 and descendant.card %}
-
-
-
- {{ descendant.card.provider_name or
- descendant.card.provider_url }}
-
- {{ descendant.card.title }}
- {{descendant.card.description}}
-
-
- {% endif %}
-
-
-
-
+ {% with thread=thread, is_thread=threads|length > 1 %}
+ {% include "card.html" %}
+ {% endwith %}
+ {% if thread.descendants is defined %}
+ {% for descendant in thread.descendants %}
+ {% with thread=descendant %}
+ {% include "card.html" %}
+ {% endwith %}
{% endfor %}
-
- {% else %}
-
Read full thread
-
- {% endif %}
-
-
+ {% endif %}
{% endfor %}
-
Top