forked from tanner/qotnews
style: Match non-JS article page styling and layout to JS version
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -49,13 +49,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="root">
|
<div id="root">
|
||||||
{% if story %}
|
{% if story %}
|
||||||
<div class="container article">
|
<div class="article-container">
|
||||||
<div class="header">
|
<div class="article">
|
||||||
{% if show_comments %}
|
<h1>{{ story.title }}</h1>
|
||||||
<h1>{{ story.title }}</h1>
|
<div class="info">
|
||||||
{% else %}
|
Source: <a class="source" href="{{ story.url or story.link }}">{{ url }}</a>
|
||||||
<h1><a href="{{ story.url or story.link }}">{{ story.title }}</a></h1>
|
</div>
|
||||||
{% endif %}
|
|
||||||
<div class="info">
|
<div class="info">
|
||||||
{{ story.score }} points
|
{{ story.score }} points
|
||||||
by <a href="{{ story.author_link }}">{{ story.author }}</a>
|
by <a href="{{ story.author_link }}">{{ story.author }}</a>
|
||||||
@@ -64,30 +63,31 @@
|
|||||||
{{ story.num_comments }} comment{{ 's' if story.num_comments != 1 }}
|
{{ story.num_comments }} comment{{ 's' if story.num_comments != 1 }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class='dot toggleDot'>
|
|
||||||
<div class='button'>
|
{% if not show_comments and story.text %}
|
||||||
<a href="/{{ story.id }}{{ '/c' if not show_comments else '' }}">
|
<div class="story-text">{{ story.text | safe }}</div>
|
||||||
{{ '' if not show_comments else '' }}
|
{% elif show_comments %}
|
||||||
</a>
|
{% macro render_comment(comment, level) %}
|
||||||
|
<div class="comment" style="margin-left: {{ level * 20 }}px">
|
||||||
|
<div class="c-info"><a href="{{ comment.author_link }}">{{ comment.author }}</a></div>
|
||||||
|
<div class="c-text">{{ comment.text | safe }}</div>
|
||||||
|
{% for reply in comment.comments %}
|
||||||
|
{{ render_comment(reply, level + 1) }}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
|
<div class="comments">
|
||||||
|
{% for comment in story.comments %}{{ render_comment(comment, 0) }}{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class='dot toggleDot'>
|
||||||
|
<div class='button'>
|
||||||
|
<a href="/{{ story.id }}{{ '/c' if not show_comments else '' }}">
|
||||||
|
{{ '' if not show_comments else '' }}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if not show_comments %}
|
|
||||||
<div class="text">{{ story.text | safe }}</div>
|
|
||||||
{% else %}
|
|
||||||
{% macro render_comment(comment, level) %}
|
|
||||||
<div class="comment" style="margin-left: {{ level * 20 }}px">
|
|
||||||
<div class="c-info"><a href="{{ comment.author_link }}">{{ comment.author }}</a></div>
|
|
||||||
<div class="c-text">{{ comment.text | safe }}</div>
|
|
||||||
{% for reply in comment.comments %}
|
|
||||||
{{ render_comment(reply, level + 1) }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endmacro %}
|
|
||||||
<div class="comments">
|
|
||||||
{% for comment in story.comments %}{{ render_comment(comment, 0) }}{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user