2018-06-09 01:03:02 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load humanize %}
|
|
|
|
{% load taglinks %}
|
2018-06-09 19:49:04 +02:00
|
|
|
{% load sanitizer %}
|
2018-06-09 01:03:02 +02:00
|
|
|
|
|
|
|
{% block title %}
|
2018-06-09 19:49:04 +02:00
|
|
|
Brutaldon - search results
|
2018-06-09 01:03:02 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% comment %}
|
|
|
|
mastodon.search("<query>")
|
2018-06-09 19:49:04 +02:00
|
|
|
# Returns the following dictionary
|
|
|
|
{
|
|
|
|
'accounts': # List of account dicts resulting from the query
|
|
|
|
'hashtags': # List of hashtag dicts resulting from the query
|
|
|
|
'statuses': # List of toot dicts resulting from the query
|
|
|
|
}
|
2018-06-09 01:03:02 +02:00
|
|
|
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
2018-06-09 19:49:04 +02:00
|
|
|
<h1 class="title">Search results</h1>
|
|
|
|
<div class="container">
|
|
|
|
<h2 class="subtitle">Users</h2>
|
|
|
|
{% for user in results.accounts %}
|
2018-06-09 20:02:53 +02:00
|
|
|
<article class="media user-info">
|
2018-06-09 19:49:04 +02:00
|
|
|
<figure class="media-left">
|
|
|
|
<p class="image is-64x64">
|
|
|
|
<a href="{% url "user" user.acct %}">
|
|
|
|
<img src="{{ user.avatar }}"
|
|
|
|
alt="">
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</figure>
|
|
|
|
<div class="media-content">
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
|
|
|
<strong>{{ user.display_name }}</strong>
|
|
|
|
<small>
|
|
|
|
<a href="{% url "user" user.acct %}">
|
|
|
|
@{{ user.acct }}
|
|
|
|
</a>
|
|
|
|
</small>
|
|
|
|
</p>
|
|
|
|
{{ user.note | relink_toot | strip_html | safe }}
|
|
|
|
<p>
|
|
|
|
</p>
|
2018-06-09 01:03:02 +02:00
|
|
|
|
2018-06-09 19:49:04 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|
2018-06-09 01:03:02 +02:00
|
|
|
|
|
|
|
|
2018-06-09 19:49:04 +02:00
|
|
|
{% endfor %}
|
2018-06-09 01:03:02 +02:00
|
|
|
|
2018-06-09 19:49:04 +02:00
|
|
|
|
|
|
|
<h2 class="subtitle">Tags</h2>
|
|
|
|
<ul>
|
|
|
|
{% for tag in results.hashtags %}
|
|
|
|
<li><a href="{% url 'tag' tag %}">#{{ tag }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h2 class="subtitle">Toots</h2>
|
|
|
|
{% for toot in results.statuses %}
|
|
|
|
{% include "main/toot_partial.html" with toot=toot reblog=False %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2018-06-09 01:03:02 +02:00
|
|
|
{% endblock %}
|