2021-07-30 11:05:20 +00:00
|
|
|
{% extends "default.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2021-08-03 06:17:48 +00:00
|
|
|
<title>{{"SITE_NAME" | app_config}}</title>
|
|
|
|
<meta name="description" content="{{"SITE_NAME" | app_config}} Votes">
|
2021-07-30 11:05:20 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h1>Vote Info</h1>
|
|
|
|
|
|
|
|
<form action="votes" method="get" class="mb-6">
|
|
|
|
<label for="link-input">Paste permalink</label>
|
|
|
|
<input id="link-input" type="text" class="form-control mb-2" name="link" value="{{thing.permalink if thing else ''}}">
|
|
|
|
<input type="submit" value="Submit" class="btn btn-primary">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if thing %}
|
|
|
|
|
|
|
|
<h1>Info</h1>
|
|
|
|
<p><a href="{{thing.permalink}}">{{thing.permalink}}</a></p>
|
2021-08-06 17:59:52 +00:00
|
|
|
<p><b>Author:</b> <a href="{{thing.author.url}}">@{{thing.author.username}}</a></p>
|
2021-08-04 13:56:56 +00:00
|
|
|
<p><b>Author Created At:</b> {{thing.author.created_utc}} ({{thing.author.created_datetime}})</p>
|
2021-08-07 23:11:49 +00:00
|
|
|
<p><b>Upvotes: </b>{{ups | length}}</p>
|
|
|
|
<p><b>Downvotes: </b>{{downs | length}}</p>
|
2021-07-30 11:05:20 +00:00
|
|
|
|
|
|
|
<h2>Upvotes</h2>
|
|
|
|
<table class="table table-striped mb-5">
|
|
|
|
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
|
|
|
|
|
|
|
|
{% for vote in ups %}
|
2021-08-11 17:28:51 +00:00
|
|
|
<tr><td><a {% if vote.user.patron %}class="patron"{% endif %} style="color:#{{vote.user.namecolor}}; {% if vote.user.patron %}background-color:#{{vote.user.namecolor}};{% endif %} font-weight:bold;" href="/@{{vote.user.username}}"><img src="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
2021-07-30 11:05:20 +00:00
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h2>Downvotes</h2>
|
|
|
|
<table class="table table-striped mb-5">
|
|
|
|
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
|
|
|
|
|
|
|
|
{% for vote in downs %}
|
2021-08-11 17:28:51 +00:00
|
|
|
<tr><td><a {% if vote.user.patron %}class="patron"{% endif %} style="color:#{{vote.user.namecolor}}; {% if vote.user.patron %}background-color:#{{vote.user.namecolor}};{% endif %} font-weight:bold;" href="/@{{vote.user.username}}"><img src="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
2021-07-30 11:05:20 +00:00
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|