forked from 4ducky/4ducky
Port 4ducky to Rust (Axum + SQLite)
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>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{%- if !likes.is_empty() %}
|
||||
<div class="comment" style="border: 1px solid #FFD600;">
|
||||
<div style="color: #FFD600;font-size: 30px;width:32px;height:32px; float: left; padding-left: 7px;">♥</div>
|
||||
{%- for lk in likes %}
|
||||
<a title="ID: {{ lk.user_id }}" href="/user/{{ lk.name_enc }}"><img class="avatarSmall" width="32" height="32" src="/{{ lk.avatar }}"/></a>
|
||||
{%- endfor %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- for c in comments %}
|
||||
{%- if c.blocked %}
|
||||
<br/><a class="quote" style="margin-left: 5px;" href="#" data-toggle="comment{{ c.id }}"><img style="margin-right: 10px; vertical-align:middle;" height="28" width="28" src="/media/xd.png" alt="blocked"/>Comment blocked ({{ c.name }})</a>
|
||||
<div style="display: none;" id="comment{{ c.id }}">
|
||||
{%- endif %}
|
||||
<div id="comment{{ c.id }}" class="comment"{% if c.upload.is_some() %} style="min-height:86px;"{% endif %}>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="40" valign="top"><a style="{{ c.style }}" title="ID: {{ c.user_id }}" href="/user/{{ c.name_enc }}"><img class="avatarSmall" width="32" height="32" src="/{{ c.avatar }}"/></a></td>
|
||||
<td valign="top" >
|
||||
<div class="info" id="unmark" style="float:right;padding-right:5px;"><a href="#content_comment" class="quote" data-requote="{{ c.id }}" data-name="{{ c.name }}">{{ c.howlong }}</a> {% if admin %}<a href="#" data-delcomment="{{ c.id }}">[x]</a>{% endif %}</div><div><a style="{{ c.style }}" title="ID: {{ c.user_id }}" href="/user/{{ c.name_enc }}">{{ c.name }}</a></div>
|
||||
{%- if let Some(up) = c.upload %}
|
||||
<div style="float:left;margin-right:10px;"><a href="/{{ up.0 }}" rel="lightbox[more]" title="{{ c.text }}"><img src="/{{ up.1 }}"/></a>
|
||||
</div>
|
||||
{%- endif %}
|
||||
<div id="{{ c.id }}">{{ c.html|safe }}</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{%- if c.blocked %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
Reference in New Issue
Block a user