style(templates): Minor fixes to search & index layouts

This commit is contained in:
Vincent Ambo 2018-04-15 00:41:17 +02:00
parent ba33efd772
commit 02a466a28b
2 changed files with 5 additions and 6 deletions

View file

@ -26,10 +26,10 @@
<div class="col-12">
<div class="list-group">
{% for thread in threads -%}
<a href="/thread/{{ thread.id }}" class="list-group-item list-group-item-action flex-column align-items-start {% if thread.sticky %} bg-secondary text-white {% endif %}">
<a href="/thread/{{ thread.id }}" class="list-group-item list-group-item-action flex-column align-items-start {%- if thread.sticky %} bg-secondary text-white {% endif -%}">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{% if thread.sticky %}<span class="badge badge-light">Sticky</span> {% endif %}{{ thread.title }}</h5>
<small class="{%if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small>
<small class="{% if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small>
</div>
<p class="mb-1">Created by {{ thread.author_name }}</p>
</a>

View file

@ -32,11 +32,10 @@
<div class="col-12">
<div class="list-group">
{% for result in results -%}
<a href="/thread/{{ result.thread_id }}#post-{{ result.post_id }}" class="list-group-item flex-column list-group-item-action align-items-start">
<a href="/thread/{{ result.thread_id }}#post-{{ result.post_id }}" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">In thread '{{ result.title }}':</h5>
<div>{{ result.headline }}</div>
<div>(Posted by <i>{{ result.author }})</i></div>
<p class="mb-1">{{ result.headline }}</p>
<small class="float-right text-muted"><i>(Posted in '{{ result.title }}' by {{ result.author }})</i></small>
</div>
</a>
{%- endfor %}