forked from rDrama/rDrama
137 lines
4.8 KiB
HTML
137 lines
4.8 KiB
HTML
{% extends "default.html" %}
|
|
|
|
{% block title %}
|
|
<title>{{'SITE_NAME' | app_config}}</title>
|
|
<meta name="description" content="{{'SITE_NAME' | app_config}} Votes">
|
|
{% endblock %}
|
|
|
|
{% block subHeader %}
|
|
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t">
|
|
<div class="absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-300 to-gray-200 rounded-t sub-header-shadow"></div>
|
|
<div class="relative col-span-full flex items-center">
|
|
<div>
|
|
<h1 class="font-bold text-xl font-heading leading-normal mb-0">
|
|
Votes
|
|
</h1>
|
|
<small class="block text-gray-700 leading-normal">
|
|
See which losers downvoted your quality content.
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="col-span-full">
|
|
<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-input mb-2" name="link" value="{{thing.permalink if thing else ''}}">
|
|
<input type="submit" value="See votes" class="btn btn-gray">
|
|
</form>
|
|
|
|
{% if thing %}
|
|
|
|
<h1>Info</h1>
|
|
<p><a href="{{thing.permalink}}">{{thing.permalink}}</a></p>
|
|
<p><b>Author:</b> <a href="{{thing.author.url}}">@{{thing.author.username}}</a></p>
|
|
<p><b>Author Created At:</b> {{thing.author.created_utc}} ({{thing.author.created_datetime}})</p>
|
|
<p><b>Upvotes: </b>{{ups | length}}</p>
|
|
<p><b>Downvotes: </b>{{downs | length}}</p>
|
|
|
|
<h2 class="text-2xl font-heading font-bold mb-0">
|
|
Upvotes
|
|
</h2>
|
|
<div class="flex flex-col mb-8">
|
|
<div class="-mx-4 overflow-x-auto">
|
|
<div class="align-middle inline-block min-w-full">
|
|
<div class="flex flex-col bg-gray-200 rounded-b-xl overflow-hidden">
|
|
<table class="min-w-full">
|
|
<thead class="bg-gradient-to-t from-gray-200 to-gray-100">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
|
Members
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-gray-100 divide-y divide-gray-300">
|
|
{% for vote in ups %}
|
|
<tr class="shadow-inset-t-white-05 odd:bg-gray-200">
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="flex items-center">
|
|
<div class="flex items-center justify-center flex-shrink-0 h-10 w-10">
|
|
<img src="{{vote.user.profile_url}}" class="flex-shrink-0 p-[3px] border w-12 h-12 object-cover {{ 'bg-red-800 border-red-900' if v.username == vote.user.username else 'bg-white border-gray-300' }}" alt="{{ vote.user.username }} avatar"/>
|
|
</div>
|
|
<!-- User Details -->
|
|
<div class="ml-3">
|
|
<a class="block font-bold text-black hover:text-red-600" href="/@{{vote.user.username}}">
|
|
{{vote.user.username}}
|
|
</a>
|
|
{% if vote.user.customtitle %}
|
|
<p class="text-sm" style="#{{vote.user.namecolor}}">
|
|
{{vote.user.customtitle | safe}}
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="text-2xl font-heading font-bold mb-0">
|
|
Downvotes
|
|
</h2>
|
|
<div class="flex flex-col mb-8">
|
|
<div class="-mx-4 overflow-x-auto">
|
|
<div class="align-middle inline-block min-w-full">
|
|
<div class="flex flex-col bg-gray-200 rounded-b-xl overflow-hidden">
|
|
<table class="min-w-full">
|
|
<thead class="bg-gradient-to-t from-gray-200 to-gray-100">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
|
Members
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-gray-100 divide-y divide-gray-300">
|
|
{% for vote in downs %}
|
|
<tr class="shadow-inset-t-white-05 odd:bg-gray-200">
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="flex items-center">
|
|
<div class="flex items-center justify-center flex-shrink-0 h-10 w-10">
|
|
<img src="{{vote.user.profile_url}}" class="flex-shrink-0 p-[3px] border w-12 h-12 object-cover {{ 'bg-red-800 border-red-900' if v.username == vote.user.username else 'bg-white border-gray-300' }}" alt="{{ vote.user.username }} avatar"/>
|
|
</div>
|
|
<!-- User Details -->
|
|
<div class="ml-3">
|
|
<a class="block font-bold text-black hover:text-red-600" href="/@{{vote.user.username}}">
|
|
{{vote.user.username}}
|
|
</a>
|
|
{% if vote.user.customtitle %}
|
|
<p class="text-sm" style="#{{vote.user.namecolor}}">
|
|
{{vote.user.customtitle | safe}}
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% endblock %} |