49 lines
1.6 KiB
HTML
49 lines
1.6 KiB
HTML
{% extends "thoughts/page.html" %}
|
|
|
|
{% block title %}Search{% if query %} "{{ query }}"{% endif %}{% endblock %}
|
|
|
|
{% block navigation %}
|
|
<a class="text" href="/">Thoughts</a>
|
|
<a class="text" href="/about">About</a>{% if authenticated %}
|
|
<a class="text" href="/post">Post</a>{% endif %}
|
|
<h1 class="text" aria-current="page">Search</h1>
|
|
{% endblock %}
|
|
|
|
{% block main %}
|
|
<form method="get" action="search">
|
|
{{ form.q }}
|
|
|
|
<input type="submit" id="post-button" value="{% if editing %}Update{% else %}Submit{% endif %}">
|
|
</form>
|
|
|
|
{% if query %}
|
|
{% load tz %}
|
|
|
|
{% for thought in page.object_list %}
|
|
<div class="thought" id="{{ thought.uuid }}">
|
|
<div class="main">
|
|
<span class="main-text text">{{ thought.object.text|urlize }}</span>
|
|
|
|
<a href="/?show={{thought.object.uuid}}" class="button show-more">Show</a>
|
|
</div>
|
|
|
|
<div class="thought-end">
|
|
<span class="timestamp">
|
|
{% timezone thought.object.get_timezone %}
|
|
{{ thought.object.posted|time:"g:i a" }}
|
|
{{ thought.object.posted|date:"M d, Y" }},
|
|
|
|
UTC{{ thought.object.get_offset_hours }}
|
|
{{ thought.object.get_season }}
|
|
{% endtimezone %}
|
|
</span>
|
|
</div>
|
|
|
|
<hr>
|
|
</div>
|
|
{% empty %}
|
|
<p>No results found.</p>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endblock %}
|