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,46 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>{{ site_title }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/media/{% if white %}styles_fb.css{% else %}styles_b.css{% endif %}" />
|
||||
<link rel="Shortcut Icon" href="/media/favicon.ico"/>
|
||||
<script type="text/javascript" src="/media/remotepost.js" defer="defer"></script>
|
||||
</head>
|
||||
<body style="margin: 0.2em 1em 0 1em; padding: 0;">
|
||||
|
||||
<h1 class="remotePost">4ducky.com - One click Uploader</h1>
|
||||
|
||||
{%- if status == "login" %}
|
||||
<form action="/remotepost.php" method="post">
|
||||
<em>Name:</em>
|
||||
<input type="text" name="name" style="width: 80px; margin-right: 10px" value="{{ name }}"/>
|
||||
|
||||
<em>Passwort:</em>
|
||||
<input type="password" style="width: 80px; margin-right: 10px" name="pass" />
|
||||
|
||||
<input type="submit" class="button login" name="login" value="Login" />
|
||||
<input type="hidden" name="remember" value="1"/>
|
||||
<input type="hidden" name="url" value="{{ url }}"/>
|
||||
<input type="hidden" name="_csrf" value="{{ csrf }}"/>
|
||||
</form>
|
||||
{%- else if status == "ready" %}
|
||||
<p>Please click on the image you want to publish on {{ site_name }}.com!</p>
|
||||
<p><strong>Rules:</strong> Gore, CP, Spam (no Thread) = Ban</p>
|
||||
{%- else if status == "confirm" %}
|
||||
<p><img src="{{ url }}" style="max-width:200px;max-height:120px;float:right;margin-left:10px;" alt=""/>Post this image to {{ site_name }}.com?</p>
|
||||
<form action="/remotepost.php" method="post">
|
||||
<input type="hidden" name="url" value="{{ url }}"/>
|
||||
<input type="hidden" name="_csrf" value="{{ csrf }}"/>
|
||||
<input type="submit" class="button" name="post" value="Post" />
|
||||
</form>
|
||||
<p><strong>Rules:</strong> Gore, CP, Spam (no Thread) = Ban</p>
|
||||
{%- else if status == "failed" %}
|
||||
<p>Sorry, the Image could not be posted for the following reason:</p>
|
||||
<p><strong>{% for e in errors %}{{ e|safe }} {% endfor %}</strong></p>
|
||||
{%- else %}
|
||||
<p id="RP_Success">Image posted! Thank you!</p>
|
||||
{%- endif %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user