Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit a0433a1

Browse files
author
Cy
committed
Changing the template, prettifying a bit
Now that everything is a <li> can set the margin-top value to make a gap, instead of making a visible "invisible" hr. And with the template thread.html fixed, it seems to be working, showing everything as a tree, instead of a flat list.
1 parent b306f38 commit a0433a1

2 files changed

Lines changed: 21 additions & 8 deletions

File tree

brutaldon/static/css/brutaldon-dark.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,10 @@ div.poll {
255255
{
256256
margin-top: 0;
257257
}
258+
259+
li {
260+
margin-top: 0.1vh;
261+
}
262+
ul {
263+
padding-left: 2vw;
264+
}

brutaldon/templates/main/thread.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@
1818
<h1 id="title" class="title">
1919
Thread
2020
</h1>
21-
{% include "main/toot_partial.html" with toot=root %}
22-
{% for descendant in descendants %}
23-
{% if descendant == toot %}
24-
{% include "main/toot_partial.html" with toot=toot active=True %}
25-
{% else %}
26-
{% include "main/toot_partial.html" with toot=descendant %}
27-
{% endif %}
28-
<hr class="is-hidden">
21+
{% for op in toots %}
22+
{% if op == IN %}
23+
<ul>
24+
{% elif op == OUT %}
25+
</ul>
26+
{% else %}
27+
<li>
28+
{% if op.toot == toot %}
29+
{% include "main/toot_partial.html" with toot=op.toot active=True %}
30+
{% else %}
31+
{% include "main/toot_partial.html" with toot=op.toot %}
32+
{% endif %}
33+
</li>
34+
{% endif %}
2935
{% endfor %}
3036

3137
{% if not preferences.no_javascript %}

0 commit comments

Comments
 (0)