perf: implement hide/show of links in CSS instead of SSR
This commit is contained in:
parent
fb6bdfecf4
commit
d7b4f9690d
1 changed files with 8 additions and 5 deletions
|
@ -39,6 +39,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main.home {
|
||||||
|
& .back,
|
||||||
|
& .top {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
@ -227,12 +234,10 @@
|
||||||
<h1>{{ app.title }}</h1>
|
<h1>{{ app.title }}</h1>
|
||||||
<p>{{ app.description }}</p>
|
<p>{{ app.description }}</p>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main class={{ "thread" if threads|length == 1 else "home" }}>
|
||||||
{% if threads|length == 1 and threads[0].descendants %}
|
|
||||||
<div class="back">
|
<div class="back">
|
||||||
<a href="{{url_for('threads.home')}}">Back</a>
|
<a href="{{url_for('threads.home')}}">Back</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for thread in threads %}
|
{% for thread in threads %}
|
||||||
|
@ -392,9 +397,7 @@
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% if threads|length == 1 and threads[0].descendants|length > 1%}
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
{% endif %}
|
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue