Revert "Updated a lot of stuff"
This reverts commit 915febb352.
Made on behalf of @ComputerTech312
This commit is contained in:
@@ -1,36 +1,26 @@
|
||||
/* Global Styles */
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%; /* Ensure the body and HTML cover the full height */
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh; /* Full viewport height */
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
/* Wrapper for header and content */
|
||||
.wrapper {
|
||||
flex: 1; /* Takes up remaining space between header and footer */
|
||||
/* Links */
|
||||
a {
|
||||
color: #c08000;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em; /* Smaller font size for a neat appearance */
|
||||
background-color: #c08000; /* Footer background color */
|
||||
padding: 3px 0; /* Minimal padding to make it skinny */
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
border-top: 1px solid #a06500; /* Optional subtle top border */
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
a:visited, a:link, a:hover {
|
||||
color: #c08000;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Table and Layout */
|
||||
@@ -132,6 +122,16 @@ td.quote-box {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: smaller;
|
||||
background-color: #c08000;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* Pagination */
|
||||
#pagination {
|
||||
text-align: center;
|
||||
@@ -297,34 +297,4 @@ td.quote-box {
|
||||
}
|
||||
}
|
||||
|
||||
/* Header Styles */
|
||||
.header-table {
|
||||
background-color: #c08000; /* The orange color block for the header */
|
||||
width: 100%;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: left;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
text-align: right;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.nav-table {
|
||||
background-color: #f0f0f0; /* A lighter background for the navigation section */
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.toplinks a {
|
||||
color: #c08000;
|
||||
margin: 0 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.toplinks a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Include meta and header -->
|
||||
{% include 'meta.html' %}
|
||||
<title>{{ title }}</title>
|
||||
|
||||
<!-- Link to the CSS file -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="wrapper"> <!-- Main wrapper for flexbox -->
|
||||
<!-- Include Header -->
|
||||
{% include 'header.html' %}
|
||||
|
||||
<!-- Main Content Block -->
|
||||
<main>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- Include Footer -->
|
||||
{% include 'footer.html' %}
|
||||
|
||||
<!-- Include JavaScript files -->
|
||||
{% block scripts %}
|
||||
{% include 'scripts.html' %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,7 +1,47 @@
|
||||
{% extends 'base.html' %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
{% block content %}
|
||||
<center>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Browse Quotes</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
<!-- Top Navigation Bar -->
|
||||
<center>
|
||||
<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>Browse Quotes</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Navigation Links -->
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Browse Quotes -->
|
||||
<center>
|
||||
<table cellpadding="0" cellspacing="3" width="80%">
|
||||
<tr>
|
||||
<td class="bodytext" width="100%" valign="top">
|
||||
@@ -20,7 +60,44 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Include Pagination -->
|
||||
{% include 'pagination.html' %}
|
||||
</center>
|
||||
{% endblock %}
|
||||
<!-- Pagination -->
|
||||
<div id="pagination">
|
||||
{% if quotes.has_prev %}
|
||||
<a href="{{ url_for('browse', page=quotes.prev_num) }}">« Previous</a>
|
||||
{% endif %}
|
||||
Page {{ quotes.page }} of {{ quotes.pages }}
|
||||
{% if quotes.has_next %}
|
||||
<a href="{{ url_for('browse', page=quotes.next_num) }}">Next »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td 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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<font size="-1">
|
||||
<a href="#">Hosted by YourHostingProvider</a><br>
|
||||
© ircquotes 2024, All Rights Reserved.
|
||||
</font>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,19 +1,123 @@
|
||||
{% extends 'base.html' %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: FAQ</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
{% block content %}
|
||||
<center>
|
||||
<!-- Navigation -->
|
||||
<center>
|
||||
<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>FAQ</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- FAQ Content -->
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%">
|
||||
<tr>
|
||||
<td class="bodytext">
|
||||
<h2>Frequently Asked Questions (FAQ)</h2>
|
||||
|
||||
<h3>What is ircquotes?</h3>
|
||||
<p>ircquotes is a community-driven website where users can submit and browse memorable quotes from IRC (Internet Relay Chat).</p>
|
||||
<p>ircquotes is a community-driven website where users can submit and browse memorable quotes from IRC (Internet Relay Chat). You can browse quotes, submit your own, and vote on others.</p>
|
||||
|
||||
<!-- Add the rest of the FAQ content here -->
|
||||
<h3>How does the API work?</h3>
|
||||
<p>The ircquotes API allows users to retrieve quotes programmatically. It is designed for developers who want to integrate IRC quotes into their own applications.</p>
|
||||
|
||||
<h4>Available API Endpoints</h4>
|
||||
<ul>
|
||||
<li><strong>Get All Approved Quotes</strong>: <code>GET /api/quotes</code></li>
|
||||
<li><strong>Get a Specific Quote by ID</strong>: <code>GET /api/quotes/<id></code></li>
|
||||
<li><strong>Get a Random Quote</strong>: <code>GET /api/random</code></li>
|
||||
<li><strong>Get Top Quotes</strong>: <code>GET /api/top</code></li>
|
||||
<li><strong>Search Quotes</strong>: <code>GET /api/search?q=<search_term></code></li>
|
||||
</ul>
|
||||
|
||||
<h4>Submitting Quotes via the API</h4>
|
||||
<p>The API also allows you to submit quotes, but this feature is rate-limited to prevent abuse. Each user is allowed 5 submissions per minute.</p>
|
||||
<ul>
|
||||
<li><strong>Submit a Quote</strong>: <code>POST /api/submit</code></li>
|
||||
<li><strong>Request Body</strong>: The request body should be in JSON format and contain the quote text like this:</li>
|
||||
<pre><code>{
|
||||
"text": "This is a memorable quote!"
|
||||
}</code></pre>
|
||||
<li><strong>Validation Rules</strong>: Quotes must be between 5 and 1000 characters.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Rules for Submitting Quotes</h3>
|
||||
<p>To ensure that ircquotes remains a fun and enjoyable platform for everyone, we ask that you follow a few simple rules when submitting quotes:</p>
|
||||
<ul>
|
||||
<li><strong>No Offensive Content</strong>: Do not submit quotes that contain offensive language, hate speech, or other harmful content.</li>
|
||||
<li><strong>No Spam</strong>: Please avoid submitting irrelevant or repetitive content. The site is for memorable IRC quotes, not spam.</li>
|
||||
<li><strong>Stay On-Topic</strong>: Ensure that your submissions are actual quotes from IRC, not made-up content.</li>
|
||||
<li><strong>Rate Limiting</strong>: The submission rate is limited to 5 quotes per minute to prevent spam.</li>
|
||||
<li><strong>Moderation</strong>: All quotes are subject to approval by site moderators. Rejected quotes will not be publicly visible.</li>
|
||||
</ul>
|
||||
|
||||
<h3>How are quotes moderated?</h3>
|
||||
<p>Quotes go through a moderation process where they are either approved, rejected, or deleted. Approved quotes become visible to all users, while rejected ones remain in the system but aren't shown publicly.</p>
|
||||
|
||||
<h3>How can I get the top 100 quotes?</h3>
|
||||
<p>You can view the top 100 quotes by visiting the <a href="/top">Top 100 page</a>. The quotes are ranked by votes, with the highest-voted quotes appearing at the top.</p>
|
||||
|
||||
<h3>How do I search for quotes?</h3>
|
||||
<p>Use the search bar on the site or the API endpoint <code>/api/search?q=<search_term></code> to find specific quotes.</p>
|
||||
|
||||
<h3>Can I delete my submitted quotes?</h3>
|
||||
<p>No, quotes are submitted anonymously, so there's no direct way to delete quotes after submission. However, site moderators can remove inappropriate content.</p>
|
||||
|
||||
<h3>Who can I contact for help?</h3>
|
||||
<p>If you encounter any issues or have questions, feel free to reach out to the admin via the contact page or submit a help request through the site's interface.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
{% endblock %}
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td 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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<footer>
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" class="footer-table">
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">
|
||||
{{ approved_count }} quotes approved; {{ pending_count }} quotes pending
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<font size="-1">
|
||||
© ircquotes 2024, All Rights Reserved.
|
||||
</font>
|
||||
</center>
|
||||
</footer>
|
||||
@@ -1,30 +0,0 @@
|
||||
<header>
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0" class="header-table">
|
||||
<tr>
|
||||
<td class="header-left">
|
||||
<font size="+1"><b><i>ircquotes</i></b></font>
|
||||
</td>
|
||||
<td class="header-right">
|
||||
<font face="arial" size="+1"><b>{{ title }}</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Navigation Links -->
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0" class="nav-table">
|
||||
<tr>
|
||||
<td class="footertext" align="left"></td>
|
||||
<td align="right" class="toplinks">
|
||||
<a href="{{ url_for('index') }}">Home</a> /
|
||||
<a href="{{ url_for('random_quote') }}">Random</a> /
|
||||
<a href="{{ url_for('submit') }}">Submit</a> /
|
||||
<a href="{{ url_for('browse') }}">Browse</a> /
|
||||
<a href="{{ url_for('modapp') }}">ModApp</a> /
|
||||
<a href="{{ url_for('search') }}">Search</a> /
|
||||
<a href="{{ url_for('faq') }}">FAQ</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</header>
|
||||
@@ -1,7 +1,47 @@
|
||||
{% extends 'base.html' %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
{% block content %}
|
||||
<center>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Home</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
<!-- Top Navigation Bar -->
|
||||
<center>
|
||||
<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>Quote Database Home</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Navigation Links -->
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Main Content -->
|
||||
<center>
|
||||
<table cellpadding="0" cellspacing="3" width="80%">
|
||||
<tr>
|
||||
<td class="bodytext" width="50%" valign="top">
|
||||
@@ -21,5 +61,20 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
{% endblock %}
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<font size="-1"><a href="#"></a><br>© ircquotes 2024, All Rights Reserved.</font>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
87
templates/login.html
Normal file
87
templates/login.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Admin Login</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
<!-- Top Navigation Bar -->
|
||||
<center>
|
||||
<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>Admin Login</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Navigation Links -->
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Login Form -->
|
||||
<center>
|
||||
<h2>Admin Login</h2>
|
||||
<form method="POST" action="/login">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type="text" name="username" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td><input type="password" name="password" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<input type="submit" value="Login" class="button">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td 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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<font size="-1">© ircquotes 2024, All Rights Reserved.</font>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ description }}">
|
||||
<meta name="keywords" content="{{ keywords }}">
|
||||
128
templates/modapp.html
Normal file
128
templates/modapp.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Admin Panel</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
<!-- Navigation -->
|
||||
<center>
|
||||
<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>Admin Panel</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Main Content: All Quotes for Moderation -->
|
||||
<center>
|
||||
<h2>All Quotes for Moderation</h2>
|
||||
|
||||
<!-- Filter Options -->
|
||||
<form method="GET" action="/modapp">
|
||||
<label for="filter">Filter by:</label>
|
||||
<select name="filter" id="filter">
|
||||
<option value="pending" {% if filter_status == 'pending' %}selected{% endif %}>Pending</option>
|
||||
<option value="approved" {% if filter_status == 'approved' %}selected{% endif %}>Approved</option>
|
||||
<option value="rejected" {% if filter_status == 'rejected' %}selected{% endif %}>Rejected</option>
|
||||
</select>
|
||||
<input type="submit" value="Apply Filter">
|
||||
</form>
|
||||
|
||||
{% if quotes.items %}
|
||||
<!-- Table for Quotes -->
|
||||
<table border="1" cellpadding="5" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Quote ID</th>
|
||||
<th>Quote</th>
|
||||
<th>Status</th>
|
||||
<th>Submitted At</th>
|
||||
<th>IP Address</th>
|
||||
<th>User Agent</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<!-- Loop through quotes -->
|
||||
{% for quote in quotes.items %}
|
||||
<tr style="background-color:
|
||||
{% if quote.status == 1 %} #d4edda {% elif quote.status == 2 %} #f8d7da {% else %} #fff {% endif %}">
|
||||
<td>#{{ quote.id }}</td>
|
||||
<td>{{ quote.text }}</td>
|
||||
<td>
|
||||
{% if quote.status == 0 %}
|
||||
Pending
|
||||
{% elif quote.status == 1 %}
|
||||
Approved
|
||||
{% else %}
|
||||
Rejected
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ quote.submitted_at.strftime('%Y-%m-%d %H:%M:%S') if quote.submitted_at else 'N/A' }}</td>
|
||||
<td>{{ quote.ip_address }}</td>
|
||||
<td>{{ quote.user_agent }}</td>
|
||||
<td>
|
||||
<a href="/approve/{{ quote.id }}">Approve</a> |
|
||||
<a href="/reject/{{ quote.id }}">Reject</a> |
|
||||
<a href="/delete/{{ quote.id }}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<!-- Pagination Links -->
|
||||
<div id="pagination">
|
||||
{% if quotes.has_prev %}
|
||||
<a href="{{ url_for('modapp', page=quotes.prev_num, filter=filter_status) }}">« Previous</a>
|
||||
{% endif %}
|
||||
<span>Page {{ quotes.page }} of {{ quotes.pages }}</span>
|
||||
{% if quotes.has_next %}
|
||||
<a href="{{ url_for('modapp', page=quotes.next_num, filter=filter_status) }}">Next »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p>No quotes available for moderation.</p>
|
||||
{% endif %}
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td 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> /
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">
|
||||
{{ approved_count }} quotes approved; {{ pending_count }} quotes pending; {{ rejected_count }} quotes rejected
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +0,0 @@
|
||||
<div id="pagination">
|
||||
{% if quotes.has_prev %}
|
||||
<a href="{{ url_for('browse', page=quotes.prev_num) }}">« Previous</a>
|
||||
{% endif %}
|
||||
Page {{ quotes.page }} of {{ quotes.pages }}
|
||||
{% if quotes.has_next %}
|
||||
<a href="{{ url_for('browse', page=quotes.next_num) }}">Next »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,7 +1,47 @@
|
||||
{% extends 'base.html' %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
{% block content %}
|
||||
<center>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Quote #{{ quote.id }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
<!-- Top Navigation Bar -->
|
||||
<center>
|
||||
<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>Quote #{{ quote.id }}</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Navigation Links -->
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Quote Display -->
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
@@ -15,7 +55,33 @@
|
||||
|
||||
<p class="qt">{{ quote.text }}</p>
|
||||
</td>
|
||||
<td valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
{% endblock %}
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td 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> /
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<font size="-1">
|
||||
© ircquotes 2024, All Rights Reserved.
|
||||
</font>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
82
templates/random.html
Normal file
82
templates/random.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Random Quote</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
<center>
|
||||
<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>Random Quote</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<p class="quote">
|
||||
<a href="/quote?id={{ quote.id }}" title="Permanent link to this quote."><b>#{{ quote.id }}</b></a>
|
||||
<a href="/vote/{{ quote.id }}/upvote" class="qa">+</a>
|
||||
(<font color="green">{{ quote.votes }}</font>)
|
||||
<a href="/vote/{{ quote.id }}/downvote" class="qa">-</a>
|
||||
<a href="/flag/{{ quote.id }}" class="qa">[X]</a>
|
||||
</p>
|
||||
<p class="qt">{{ quote.text }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td 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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<font size="-1">
|
||||
© ircquotes 2024, All Rights Reserved.
|
||||
</font>
|
||||
</center>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
103
templates/search.html
Normal file
103
templates/search.html
Normal file
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Search & Read</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Header -->
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" class="header">
|
||||
<tr>
|
||||
<td class="header-left">
|
||||
<b><i>ircquotes</i></b>
|
||||
</td>
|
||||
<td class="header-right">
|
||||
<b>Search & Read Quotes</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Navigation Bar -->
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" class="nav-bar">
|
||||
<tr>
|
||||
<td align="right" 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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Content Section -->
|
||||
<center>
|
||||
<div class="content-box">
|
||||
<!-- Search for Quotes -->
|
||||
<h2>Search for Quotes by Keyword</h2>
|
||||
<form action="/search" method="GET">
|
||||
<input type="text" name="q" class="text" placeholder="Enter search term" required>
|
||||
<input type="submit" value="Search" class="button">
|
||||
</form>
|
||||
|
||||
<!-- Read Quote by Number -->
|
||||
<h2>Read a Quote by Number</h2>
|
||||
<form action="/read" method="GET">
|
||||
<input type="number" name="id" class="text" placeholder="Enter quote number" required>
|
||||
<input type="submit" value="Read" class="button">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Results Section -->
|
||||
<div class="results-box">
|
||||
{% if query %}
|
||||
<h3>Search Results for "{{ query }}"</h3>
|
||||
{% if quotes %}
|
||||
<table cellpadding="0" cellspacing="3" width="80%">
|
||||
<tr>
|
||||
<td class="bodytext" width="100%" valign="top">
|
||||
{% for quote in quotes %}
|
||||
<p class="quote">
|
||||
<a href="/quote?id={{ quote.id }}" title="Permanent link to this quote.">
|
||||
<b>#{{ quote.id }}</b>
|
||||
</a>
|
||||
<a href="/vote/{{ quote.id }}/upvote" class="qa">+</a>
|
||||
(<span class="votes">{{ quote.votes }}</span>)
|
||||
<a href="/vote/{{ quote.id }}/downvote" class="qa">-</a>
|
||||
</p>
|
||||
<p class="qt">{{ quote.text }}</p>
|
||||
<hr>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% else %}
|
||||
<h4>No quotes found for "{{ query }}".</h4>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" class="footer">
|
||||
<tr>
|
||||
<td class="footertext" align="right">{{ approved_count }} quotes approved; {{ pending_count }} quotes pending</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="copyright">
|
||||
© ircquotes 2024, All Rights Reserved.
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,16 +1,57 @@
|
||||
{% extends 'base.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') }}" />
|
||||
</head>
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000" onload="document.add.newquote.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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% block content %}
|
||||
<center>
|
||||
<!-- Add a Quote Form -->
|
||||
<form action="/submit" name="add" method="POST">
|
||||
<table cellpadding="2" cellspacing="0" width="60%">
|
||||
<tr>
|
||||
<td><textarea cols="100%" rows="10" name="quote" class="text"></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">
|
||||
<input type="reset" value="Reset" class="button">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -28,5 +69,17 @@
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
{% endblock %}
|
||||
|
||||
<!-- 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, All Rights Reserved.
|
||||
</font>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user