Files
ircquotes/templates/submit.html
ComputerTech312 cd27cc8ad9 Major refactor: Fix SQLite concurrency, remove rate limiting, simplify architecture
- Switch to single Gunicorn worker to eliminate SQLite database locking issues
- Remove Flask-Limiter and all rate limiting complexity
- Remove Cloudflare proxy setup and dependencies
- Simplify configuration and remove unnecessary features
- Update all templates and static files for streamlined operation
- Clean up old files and documentation
- Restore stable database from backup
- System now runs fast and reliably without database locks
2025-09-21 19:45:08 +01:00

111 lines
4.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ircquotes: Add a Quote</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
<script>
// Prevent flash of white content by applying theme immediately
(function() {
const savedTheme = localStorage.getItem('theme');
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (savedTheme === 'dark' || (!savedTheme && prefersDark)) {
document.documentElement.className = 'dark-theme';
}
})();
</script>
<script src="{{ url_for('static', filename='theme.js') }}"></script>
</head>
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000" onload="document.add.quote.focus();">
<center>
<!-- Header -->
<table cellpadding="2" cellspacing="0" width="80%" border="0">
<tr>
<td bgcolor="#c08000" align="left">
<font size="+1"><b><i>ircquotes</i></b></font>
</td>
<td bgcolor="#c08000" align="right">
<font face="arial" size="+1"><b>Add a Quote</b></font>
</td>
</tr>
</table>
<!-- Navigation Links -->
<table cellpadding="2" cellspacing="0" width="80%" border="0">
<tr>
<td class="footertext" align="left" bgcolor="#f0f0f0">
<!-- Paypal Donate can be added here if needed -->
</td>
<td align="right" bgcolor="#f0f0f0" class="toplinks" colspan="2">
<a href="/">Home</a> /
<a href="/random">Random</a> /
<a href="/submit">Submit</a> /
<a href="/browse">Browse</a> /
<a href="/modapp">ModApp</a> /
<a href="/search">Search</a> /
<a href="/faq">FAQ</a>
<button id="theme-toggle" onclick="toggleDarkMode()" title="Toggle dark/light mode">🌙</button>
</td>
</tr>
</table>
<!-- Add a Quote Form -->
<form action="/submit" name="add" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<table cellpadding="2" cellspacing="0" width="60%">
{% if preview_text %}
<!-- Preview Section -->
<tr>
<td>
<h3>Quote Preview:</h3>
<div style="border: 1px solid #ccc; padding: 10px; margin: 10px 0; background-color: #f9f9f9;">
<pre style="white-space: pre-wrap; font-family: monospace;">{{ preview_text }}</pre>
</div>
<p><strong>If this looks correct, click "Submit Quote" below. Otherwise, edit your quote and preview again.</strong></p>
</td>
</tr>
{% endif %}
<tr>
<td><textarea cols="100%" rows="10" name="quote" class="text">{{ original_text or '' }}</textarea></td>
</tr>
<tr>
<td><input type="checkbox" name="strip" checked> Automatically attempt to fix timestamps and common mistakes.</td>
</tr>
<tr>
<td>
<input type="submit" value="Preview Quote" class="button" name="submit2">
<input type="submit" value="Submit Quote" class="button" name="submit1">
&nbsp; &nbsp;<input type="reset" value="Reset" class="button">
</td>
</tr>
<tr>
<td>
<br><br>
You may submit quotes from any chat medium, so long as they have reasonable
formatting (IRC, etc.).<br><br>
Tips for approval: no timestamps, keep it short (trim useless parts), remove trailing laughs, and avoid inside jokes.
</td>
</tr>
<tr>
<td class="bodytext">
<br><font size="-1"><b>Privacy Note:</b> Your IP address is never displayed publicly.</font>
</td>
</tr>
</table>
</form>
<!-- Footer -->
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
<tr>
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
</tr>
</table>
<font size="-1">
@ ircquotes 2024-2025
</font>
</center>
</body>
</html>