forked from 4ducky/4ducky
Same design, layout, URLs and features as the PHP version: browse grid, image view with AJAX comments, BBCode, likes, uploads (file, URL and bookmarklet), quicktagger, profile, block list, inbox, invites, Hall of Ducks, Truhe, abuse reports and the admin tools. - Parameterized SQL, escaped templates (askama), argon2 passwords, server-side sessions, CSRF tokens on every write, strict script CSP - SSRF-safe remote image fetching, magic-byte upload checks - Self-hosted captcha replaces reCAPTCHA v1; analytics/social widgets removed - Vanilla JS replaces jQuery and its plugins with the same DOM behaviour - Reverse proxy support (frontend_path, trust_proxy, secure_cookies) - Admin CLI: admin, settings, invites See README.md for running it and the full list of changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
183 lines
6.7 KiB
HTML
183 lines
6.7 KiB
HTML
{% include "header.html" %}
|
|
|
|
<h1> » Viewing
|
|
{%- if let Some(cu) = ctx_user %}
|
|
User: <a href="/user/{{ cu.1 }}">{{ cu.0 }}</a>
|
|
{%- else %}
|
|
: {{ pname }}, uploaded {{ howlong }}
|
|
{%- endif %} ({{ date }})
|
|
</h1>
|
|
|
|
<div id="viewer">
|
|
{%- if let Some(p) = prev_href %}
|
|
<a href="{{ p }}" class="prev" id="prevBar" title="Previous">Previous</a>
|
|
{%- else %}
|
|
<div class="noPrev" id="prevBar">Previous</div>
|
|
{%- endif %}
|
|
{%- if let Some(n) = next_href %}
|
|
<a href="{{ n }}" class="next" id="nextBar" title="Next">Next</a>
|
|
{%- else %}
|
|
<div class="noNext" id="nextBar">Next</div>
|
|
{%- endif %}
|
|
|
|
<div id="imageContainer">
|
|
{%- if logged_in %}
|
|
<img class="scaled" id="image" src="{{ image_src }}" alt="{{ pname }}"/>
|
|
{%- else %}
|
|
<a href="/register"><img id="image" src="/images/gate.png" alt="register"/></a><br />
|
|
{%- endif %}
|
|
</div>
|
|
|
|
<div id="imageInfo">
|
|
|
|
<div class="userInfo">
|
|
<img class="avatar" width="50" height="50" alt="Avatar" src="/{{ up_avatar }}"/>
|
|
|
|
{%- if logged_in %}
|
|
<a style="font-size: 45px; float:right;margin-top:-9px;" href="#" data-fav="{{ image_id }}"><img name="img1" class="duckfav" src="/media/ducksw.png" alt="fav" height="64px" width="64px"/></a>
|
|
{%- endif %}
|
|
|
|
<div class="name"><strong><a title="ID: {{ up_id }} | Images: {{ up_images }}" style="{{ up_style }}" href="/user/{{ up_enc }}">{{ up_name }}</a> </strong>
|
|
|
|
{{ rank|safe }}
|
|
|
|
</div>
|
|
|
|
{%- if logged_in %}
|
|
<div class="info"><a class="smalllink" href="#" data-toggle="MessageForm">message</a> | <a href="#CommentForm">comment</a> | {% else %} <div class="info">{% endif %}<a class="smalllink" href="#" data-toggle="ShareForm">share</a> | <a target="_blank" href="{{ search_link }}">search</a> | <a target="_blank" href="{{ edit_link }}">edit</a> | <a href="#" data-toggle="AbuseForm">abuse</a></div>
|
|
|
|
{%- if admin %}
|
|
<div class="info" style="font-size: 14px; border:dotted 1px #666;float:left;padding:1px; margin-top:8px;">Score: {{ score }} |
|
|
{% if superadmin %} <a href="#" data-admin="fame" data-id="{{ image_id }}">HoF</a> | <a href="#" data-admin="ban" data-id="{{ up_id }}">Ban</a> | {% endif %}<a href="#" data-admin="timeblock" data-id="{{ up_id }}">TimeBlock User</a> | <a href="#" data-admin="close" data-id="{{ image_id }}">Close Thread</a> | <a href="#" data-admin="delete" data-id="{{ image_id }}">Delete Pic</a></div>
|
|
{%- endif %}
|
|
</div>
|
|
{%- if admin %}
|
|
<br/>
|
|
{%- endif %}
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
<div id="AbuseForm" style="display: none">
|
|
<div class="comment">
|
|
|
|
<form action="/abuse" method="post">
|
|
<dl class="form">
|
|
<dt>Reason:</dt>
|
|
<dd>
|
|
<input type="text" name="rsn" value=""/>
|
|
</dd>
|
|
<dt>Email:</dt>
|
|
<dd>
|
|
<input type="text" name="mail" value="" />
|
|
</dd>
|
|
<dt> </dt>
|
|
<dd>
|
|
<input type="submit" class="submit" name="abuse" value="Send" />
|
|
<input type="hidden" name="image" value="{{ image_id }}"/>
|
|
<input type="hidden" name="_csrf" value="{{ l.csrf }}"/>
|
|
</dd>
|
|
</dl>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="FavDiv" class="comment" style="display:none"> </div>
|
|
|
|
|
|
<div id="MessageForm" style="display:none">
|
|
<div class="comment">
|
|
|
|
Send:
|
|
<form method="post" class="addComment" action="/inbox/{{ up_enc }}">
|
|
<div>
|
|
<input type="hidden" name="_csrf" value="{{ l.csrf }}"/>
|
|
<input name="title" /><br />
|
|
<textarea name="content" rows="3" cols="40"></textarea><br />
|
|
<input class="submit" type="submit" name="addComment" value="Submit"/>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="ShareForm" style="display:none">
|
|
<div class="comment">
|
|
Link:<br/> <input type="text" readonly="1" value="{{ share_link }}" style="width: 400px; font-size:10px" data-select="1"/>
|
|
<br />
|
|
Forum-Code: <input type="text" readonly="1" value="{{ forum_code }}" style="width: 400px; font-size:10px" data-select="1"/>
|
|
<br />
|
|
HTML-Code: <input type="text" readonly="1" value="{{ html_code }}" style="width: 400px; font-size:10px" data-select="1"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="comments">
|
|
|
|
<div id="cmts">
|
|
<noscript>
|
|
<div class="noscr">Please enable Javascript.</div>
|
|
</noscript>
|
|
<div align="center">
|
|
<img src="{% if l.white %}/media/load.gif{% else %}/media/load_b.gif{% endif %}" />
|
|
</div>
|
|
</div>
|
|
|
|
{%- if logged_in && comment_open %}
|
|
<div class="comment">
|
|
<noscript>
|
|
<div class="noscr">Please enable Javascript.</div>
|
|
</noscript>
|
|
<div class="noscr" id="CommentError" style="display:none"></div>
|
|
|
|
<form method="post" class="addComment" id="CommentForm" enctype="multipart/form-data" action="{{ form_action }}">
|
|
<input type="hidden" name="_csrf" value="{{ l.csrf }}"/>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
{%- if let Some(lines) = spam %}
|
|
<td colspan="2"><div class="comment">
|
|
{%- for line in lines %}{% if !loop.first %}<br>{% endif %}{{ line|safe }}{% endfor %}
|
|
</div></td>
|
|
{%- else %}
|
|
|
|
<td width="40" valign="top"><img class="avatarSmall" width="32" height="32" src="/{{ my_avatar }}"/></td>
|
|
|
|
<td valign="top" >
|
|
» BB-Codes: <a class="quote" href="#" data-bbcode="img">[img]</a> <a class="quote" href="#" data-bbcode="link">[link]</a> <a class="quote" href="#" data-bbcode="spoiler">[spoiler]</a> <a class="quote" href="#" data-bbcode="youtube">[youtube]</a>
|
|
|
|
<div id="ImgFile" style="display:none">
|
|
<input type="file" id="image_comment" name="image_comment" value="" style="color: #000; background-color: #fff; border:1px solid #bdc7d8;"/>
|
|
<input type="text" id="url_comment" name="url_comment" value="http//URL Upload" />
|
|
</div>
|
|
<textarea name="content" id="content_comment" rows="6" cols="53"></textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td><input id="SubBut" class="submit" type="button" name="addComment" value="Submit Comment" data-image-id="{{ image_id }}"/>
|
|
<div style="text-align:center;display:none" id="SubLoad">
|
|
<div align="center">
|
|
<img src="{% if l.white %}/media/load.gif{% else %}/media/load_b.gif{% endif %}" />
|
|
</div>
|
|
</div>
|
|
|
|
</td>
|
|
{%- endif %}
|
|
</tr>
|
|
</table>
|
|
<div> </div>
|
|
</form>
|
|
</div>
|
|
{%- else %}
|
|
<div class="comment">
|
|
{%- if comment_open %}
|
|
Register to comment...
|
|
{%- else %}
|
|
Comments are closed!
|
|
{%- endif %}
|
|
</div>
|
|
{%- endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% include "footer.html" %}
|