You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
suchwow/suchwow/templates/post/read.html

93 lines
3.5 KiB

{% extends 'base.html' %}
{% block content %}
<div class="container">
<div class="post" style="text-align:center;">
<nav class="breadcrumb is-centered" aria-label="breadcrumbs">
<ul>
<li><a href="/">All Posts</a></li>
<li class="is-active"><a href="#" aria-current="page">Post {{ post.id }}</a></li>
</ul>
</nav>
<div class="tabs is-fullwidth">
<ul>
<li>
<a {% if post.get_previous() %}href="{{ url_for('post.read', id=post.get_previous()) }}"{% else %}class="disabled"{% endif %}>
<span class="icon"><i class="fas fa-angle-left" aria-hidden="true"></i></span>
<span>Previous</span>
</a>
</li>
<li>
<a href="{{ url_for('post.read', id=post.get_random()) }}">
<span class="icon"><i class="fas fa-question" aria-hidden="true"></i></span>
<span>Random</span>
</a>
</li>
<li>
<a {% if post.get_next() %}href="{{ url_for('post.read', id=post.get_next()) }}"{% else %}class="disabled"{% endif %}>
<span>Next</span>
<span class="icon"><i class="fas fa-angle-right" aria-hidden="true"></i></span>
</a>
</li>
</ul>
</div>
<!-- Post Info -->
<section class="section">
<div class="content">
<h1>{{ post.title }}</h1>
<p>{{ post.text }}</p>
{% if not post.approved %}
<a href="{{ url_for('post.approve', id=post.id) }}" class="button is-success">Approve</a>
<a href="{{ url_for('post.delete', id=post.id) }}" class="button is-danger">Reject</a>
{% endif %}
<p class="mt-2">Submitted by <i><u><a href="/?submitter={{ post.user.username }}">{{ post.user.username }}</a></u></i> at <i>{{ post.timestamp }}</i></p>
{% if post.get_image_path().endswith('mp4') %}
<video style="max-height: 100vh!important;" controls>
<source src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" type="video/mp4">
Your browser does not support the video tag.
</video>
{% else %}
<img alt="SuchWow #{{ post.id }} - {{ post.title }} by {{ post.user.username }}" src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" />
{% endif %}
</div>
</section>
<!-- Payments -->
<section class="section content">
<h3>Payments</h3>
<p style="word-break:break-all;">Vote for this post by sending WOW to the following address:<br><i>{{ post.address }}</i></p>
{% if qr_code %}
<img src="data:image/png;base64,{{ qr_code }}" width=180 class="center"><br /><br />
{% endif %}
<div class="columns">
<div class="column content">
<h4>{{ tips | sum(attribute='amount') | from_atomic }} WOW Received</h4>
{% if tips %}
<ul>
{% for tip in tips %}
<li class="is-small" style="font-size:.8em;">
{{ tip.amount | from_atomic }} WOW
(<a href="https://explore.wownero.com/tx/{{ tip.txid }}" target="_blank">{{ tip.txid | shorten_address }}</a>)
- {{ tip.timestamp | humanize }}
</li>
{% endfor %}
</ul>
{% else %}
<p>No WOW received yet. Show this post some love!</p>
{% endif %}
</div>
</div>
</section>
{% if config.DEBUG %}
{{ post.show() }}
{% endif %}
</div>
</div>
{% endblock %}