style(css): change out CSS classes according to stylesheet update
This commit is contained in:
parent
d609265862
commit
31150b9b12
5 changed files with 96 additions and 12 deletions
80
www/templates/search.html
Normal file
80
www/templates/search.html
Normal file
|
@ -0,0 +1,80 @@
|
|||
|
||||
|
||||
{% extends "pathed_content.html" %}
|
||||
|
||||
{% block second_title %}
|
||||
<h2> Dergen Search </h2>
|
||||
{% endblock %}
|
||||
|
||||
{%block content_article %}
|
||||
<form class="dergen_search_form" method="get" enctype="multipart/form-data" action="/search">
|
||||
<h1>
|
||||
Dergle
|
||||
</h1>
|
||||
|
||||
<input type="text" id="query" autocomplete="on" name="query" placeholder="Search for..."
|
||||
{% if search_query.user_type %}
|
||||
value="{{search_query.user_input}}"
|
||||
{% endif %}
|
||||
/> <br>
|
||||
|
||||
<button type="submit">Search!</button>
|
||||
<button>I'm feeling cuddly</button>
|
||||
|
||||
<div class="_search_type">
|
||||
{% for type in search_query.types %}
|
||||
<input type="radio" name="search_type"
|
||||
id="type_{{type[1]}}" value="{{type[1]}}"
|
||||
onchange="this.form.submit();"
|
||||
{% if type[1] == search_query.user_type %}
|
||||
checked
|
||||
{% endif %}
|
||||
>
|
||||
<label for="type_{{type[1]}}">
|
||||
{{type[0]}}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if display_type == 'no_search' %}
|
||||
<h3>Search for something :D</h3>
|
||||
<ul>
|
||||
<li>Type normal words to search for post title, brief descriptions and main content</li>
|
||||
<li>Use the syntax <code>tags:tag_a,tag_b,...</code> to search for specific tags</li>
|
||||
<li>Use the type selector to more precisely look for images, blogs, etc.</li>
|
||||
</ul>
|
||||
|
||||
{% elseif display_type == 'image' %}
|
||||
<ul class="gallery">
|
||||
{% for post in search_results %}
|
||||
<li class="entry">
|
||||
<a href={{post.path}}>
|
||||
<figure>
|
||||
<img src="{{post.media_preview_url}}">
|
||||
<figcaption>
|
||||
{{ post.title }} ({{ post.search_score }})
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{%elseif display_type == 'no results' %}
|
||||
<h4>How sad. There are no images yet... What a real shame :c </h4>
|
||||
{%else%}
|
||||
<ul class="dergen_search_result_listing">
|
||||
{% for post in search_results %}
|
||||
<li>
|
||||
<ul class="_details">
|
||||
<li class="_path_details"> <span>Score: {{post.search_score|round(2)}}</span> <span>Path: {{post.path}}</span> </li>
|
||||
<li class="_title"> <a href="{{post.url}}" target="_blank">
|
||||
{{post.title}} </a>
|
||||
</li>
|
||||
<li class="_brief"> {{post.brief}} </li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{%endblock%}
|
Loading…
Add table
Add a link
Reference in a new issue