Use djLint
This commit is contained in:
@ -11,4 +11,3 @@ body {
|
|||||||
max-height: 450px;
|
max-height: 450px;
|
||||||
overflow-y: auto
|
overflow-y: auto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} | Add new feed{% endblock %}
|
{% block title %}
|
||||||
|
| Add new feed
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 border border-dark">
|
<div class="p-2 border border-dark">
|
||||||
<form action="/add" method="post">
|
<form action="/add" method="post">
|
||||||
@ -7,30 +9,35 @@
|
|||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
<label for="feed_url" class="col-sm-2 col-form-label">Feed URL</label>
|
<label for="feed_url" class="col-sm-2 col-form-label">Feed URL</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="feed_url" type="text" class="form-control bg-dark border-dark text-muted" id="feed_url"
|
<input name="feed_url"
|
||||||
placeholder="https://www.reddit.com/r/FreeGameFindings.rss">
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="feed_url"
|
||||||
|
placeholder="https://www.reddit.com/r/FreeGameFindings.rss"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Webhook dropdown -->
|
<!-- Webhook dropdown -->
|
||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
<label for="webhook_dropdown"
|
<label for="webhook_dropdown" class="col-sm-2 col-form-label">Which webhook should we send entries to?</label>
|
||||||
class="col-sm-2 col-form-label">Which webhook should we send entries to?</label>
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select class="col-auto form-select bg-dark border-dark text-muted" id="webhook_dropdown"
|
<select class="col-auto form-select bg-dark border-dark text-muted"
|
||||||
|
id="webhook_dropdown"
|
||||||
name="webhook_dropdown">
|
name="webhook_dropdown">
|
||||||
<option selected>Choose webhook...</option>
|
<option selected>
|
||||||
|
Choose webhook...
|
||||||
|
</option>
|
||||||
{% for hook in webhooks %}
|
{% for hook in webhooks %}
|
||||||
<option value="{{ hook.name }}">{{ hook.name }}</option>
|
<option value="{{ hook.name }}">
|
||||||
|
{{ hook.name }}
|
||||||
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Submit button -->
|
<!-- Submit button -->
|
||||||
<div class="d-md-flex">
|
<div class="d-md-flex">
|
||||||
<button class="btn btn-dark btn-sm">Add feed</button>
|
<button class="btn btn-dark btn-sm">Add feed</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,47 +1,55 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
<meta name="description"
|
||||||
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
|
content="Stay updated with the latest news and events with our easy-to-use RSS bot. Never miss a message or announcement again with real-time notifications directly to your Discord server."/>
|
||||||
crossorigin="anonymous">
|
<meta name="keywords"
|
||||||
<link href="/static/styles.css" rel="stylesheet">
|
content="discord, rss, bot, notifications, announcements, updates, real-time, server, messages, news, events, feed."/>
|
||||||
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
||||||
<title>discord-rss-bot{% block title %}{% endblock %}</title>
|
rel="stylesheet"
|
||||||
{% block head %}{% endblock %}
|
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
|
||||||
</head>
|
crossorigin="anonymous"/>
|
||||||
<body class="text-white-50">
|
<link href="/static/styles.css" rel="stylesheet"/>
|
||||||
{% include "nav.html" %}
|
<link rel="icon" href="/static/favicon.ico" type="image/x-icon"/>
|
||||||
<div class="p-2 mb-2">
|
<title>discord-rss-bot
|
||||||
<div class="container-fluid">
|
{% block title %}
|
||||||
<div class="d-grid p-2">
|
{% endblock title %}
|
||||||
{% block content %}{% endblock %}
|
</title>
|
||||||
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
|
{% block head %}
|
||||||
<p class="col-md-4 mb-0 text-muted d-none d-md-block">Made by
|
{% endblock head %}
|
||||||
<a class="text-muted"
|
</head>
|
||||||
href="https://github.com/TheLovinator1">TheLovinator</a>
|
<body class="text-white-50">
|
||||||
</p>
|
{% include "nav.html" %}
|
||||||
<ul class="nav col-md-4 justify-content-end">
|
<div class="p-2 mb-2">
|
||||||
<li class="nav-item">
|
<div class="container-fluid">
|
||||||
<a href="mailto:tlovinator@gmail.com" class="nav-link px-2 text-muted">Email</a>
|
<div class="d-grid p-2">
|
||||||
</li>
|
{% block content %}
|
||||||
<li class="nav-item">
|
{% endblock content %}
|
||||||
<a href="https://github.com/TheLovinator1/discord-rss-bot/issues"
|
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
|
||||||
class="nav-link px-2 text-muted">Report an issue</a>
|
<p class="col-md-4 mb-0 text-muted d-none d-md-block">
|
||||||
</li>
|
Made by
|
||||||
<li class="nav-item">
|
<a class="text-muted" href="https://github.com/TheLovinator1">TheLovinator</a>
|
||||||
<a href="https://github.com/TheLovinator1/discord-rss-bot/issues"
|
</p>
|
||||||
class="nav-link px-2 text-muted">Send feedback</a>
|
<ul class="nav col-md-4 justify-content-end">
|
||||||
</li>
|
<li class="nav-item">
|
||||||
</ul>
|
<a href="mailto:tlovinator@gmail.com" class="nav-link px-2 text-muted">Email</a>
|
||||||
</footer>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="https://github.com/TheLovinator1/discord-rss-bot/issues"
|
||||||
|
class="nav-link px-2 text-muted">Report an issue</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="https://github.com/TheLovinator1/discord-rss-bot/issues"
|
||||||
|
class="nav-link px-2 text-muted">Send feedback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous">
|
||||||
</div>
|
</script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"
|
</body>
|
||||||
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
|
|
||||||
crossorigin="anonymous">
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
@ -1,20 +1,21 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} | Blacklist{% endblock %}
|
{% block title %}
|
||||||
|
| Blacklist
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 border border-dark">
|
<div class="p-2 border border-dark">
|
||||||
<form action="/blacklist" method="post">
|
<form action="/blacklist" method="post">
|
||||||
<!-- Feed URL -->
|
<!-- Feed URL -->
|
||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="form-text">
|
<div class="form-text">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li>Comma separated list of words to blacklist. If a word is found in the
|
<li>
|
||||||
|
Comma separated list of words to blacklist. If a word is found in the
|
||||||
corresponding blacklists, the feed will not be sent.
|
corresponding blacklists, the feed will not be sent.
|
||||||
</li>
|
</li>
|
||||||
<li>Whitelist always takes precedence over blacklist. Leave empty to disable.</li>
|
<li>Whitelist always takes precedence over blacklist. Leave empty to disable.</li>
|
||||||
<li>Words are case-insensitive. No spaces should be used before or after the comma.</li>
|
<li>Words are case-insensitive. No spaces should be used before or after the comma.</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
Correct:
|
Correct:
|
||||||
<code>
|
<code>
|
||||||
@ -28,30 +29,40 @@
|
|||||||
</code>
|
</code>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<label for="blacklist_title" class="col-sm-6 col-form-label">Blacklist - Title</label>
|
<label for="blacklist_title" class="col-sm-6 col-form-label">Blacklist - Title</label>
|
||||||
<input name="blacklist_title" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="blacklist_title"
|
||||||
id="blacklist_title" value="{% if blacklist_title %}{{ blacklist_title }}{% endif %}">
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="blacklist_title"
|
||||||
|
value="{% if blacklist_title %}
|
||||||
|
{{ blacklist_title }}
|
||||||
|
{% endif %}"/>
|
||||||
<label for="blacklist_summary" class="col-sm-6 col-form-label">Blacklist - Summary</label>
|
<label for="blacklist_summary" class="col-sm-6 col-form-label">Blacklist - Summary</label>
|
||||||
<input name="blacklist_summary" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="blacklist_summary"
|
||||||
id="blacklist_summary" value="{% if blacklist_summary %}{{ blacklist_summary }}{% endif %}">
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="blacklist_summary"
|
||||||
|
value="{% if blacklist_summary %}
|
||||||
|
{{ blacklist_summary }}
|
||||||
|
{% endif %}"/>
|
||||||
<label for="blacklist_content" class="col-sm-6 col-form-label">Blacklist - Content (Not implemented yet)</label>
|
<label for="blacklist_content" class="col-sm-6 col-form-label">Blacklist - Content (Not implemented yet)</label>
|
||||||
<input name="blacklist_content" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="blacklist_content"
|
||||||
id="blacklist_content" value="{% if blacklist_content %}{{ blacklist_content }}{% endif %}" disabled>
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="blacklist_content"
|
||||||
|
value="{% if blacklist_content %}
|
||||||
|
{{ blacklist_content }}
|
||||||
|
{% endif %}"
|
||||||
|
disabled/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Add a hidden feed_url field to the form -->
|
<!-- Add a hidden feed_url field to the form -->
|
||||||
<input type="hidden" name="feed_url" value="{{ feed.url }}">
|
<input type="hidden" name="feed_url" value="{{ feed.url }}"/>
|
||||||
|
|
||||||
<!-- Submit button -->
|
<!-- Submit button -->
|
||||||
<div class="d-md-flex">
|
<div class="d-md-flex">
|
||||||
<button class="btn btn-dark btn-sm">Update blacklist</button>
|
<button class="btn btn-dark btn-sm">Update blacklist</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,77 +1,241 @@
|
|||||||
{% extends "base.html" %}(
|
{% extends "base.html" %}
|
||||||
{% block title %} | Custom message{% endblock %}
|
{% block title %}
|
||||||
|
| Custom message
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 border border-dark">
|
<div class="p-2 border border-dark">
|
||||||
<form action="/custom" method="post">
|
<form action="/custom" method="post">
|
||||||
<!-- Feed URL -->
|
<!-- Feed URL -->
|
||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="form-text">
|
<div class="form-text">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li>You can modify the message that is sent to Discord.</li>
|
<li>You can modify the message that is sent to Discord.</li>
|
||||||
<br>
|
<br/>
|
||||||
<li><code>{% raw %}{{feed_url}}{% endraw %}</code> will be replaced with the feed URL. You can use <code>\n</code> for new lines.</li>
|
<li>
|
||||||
<br>
|
<code>
|
||||||
<li><code>{% raw %}{{feed_author}}{% endraw %}</code> - {{feed.author}}</li>
|
{% raw %}
|
||||||
<li><code>{% raw %}{{feed_added}}{% endraw %}</code> - {{feed.added}}</li>
|
{{ feed_author }}
|
||||||
<li><code>{% raw %}{{feed_last_exception}}{% endraw %}</code> - {{feed.last_exception}}</li>
|
{% endraw %}
|
||||||
<li><code>{% raw %}{{feed_last_updated}}{% endraw %}</code> - {{feed.last_updated}}</li>
|
</code>{{ feed.author }}
|
||||||
<li><code>{% raw %}{{feed_link}}{% endraw %}</code> - {{feed.link}}</li>
|
</li>
|
||||||
<li><code>{% raw %}{{feed_subtitle}}{% endraw %}</code> - {{feed.subtitle}}</li>
|
<li>
|
||||||
<li><code>{% raw %}{{feed_title}}{% endraw %}</code> - {{feed.title}}</li>
|
<code>
|
||||||
<li><code>{% raw %}{{feed_updated}}{% endraw %}</code> - {{feed.updated}}</li>
|
{% raw %}
|
||||||
<li><code>{% raw %}{{feed_updates_enabled}}{% endraw %}</code> - {{feed.updates_enabled}}</li>
|
{{ feed_added }}
|
||||||
<li><code>{% raw %}{{feed_url}}{% endraw %}</code> - {{feed.url}}</li>
|
{% endraw %}
|
||||||
<li><code>{% raw %}{{feed_user_title}}{% endraw %}</code> - {{feed.user_title}}</li>
|
</code>{{ feed.added }}
|
||||||
<li><code>{% raw %}{{feed_version}}{% endraw %}</code> - {{feed.version}}</li>
|
</li>
|
||||||
<br>
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_last_exception }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.last_exception }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_last_updated }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.last_updated }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_link }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.link }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_subtitle }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.subtitle }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_title }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.title }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_updated }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.updated }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_updates_enabled }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.updates_enabled }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_url }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.url }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_user_title }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.user_title }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ feed_version }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ feed.version }}
|
||||||
|
</li>
|
||||||
|
<br/>
|
||||||
{% if entry %}
|
{% if entry %}
|
||||||
<li><code>{% raw %}{{entry_added}}{% endraw %}</code> - {{entry.added}}</li>
|
<li>
|
||||||
<li><code>{% raw %}{{entry_author}}{% endraw %}</code> - {{entry.author}}</li>
|
<code>
|
||||||
<li><code>{% raw %}{{entry_content}}{% endraw %}</code> - {{entry.content[0].value|discord_markdown}}</li>
|
{% raw %}
|
||||||
<li><code>{% raw %}{{entry_content_raw}}{% endraw %}</code> - {{entry.content[0].value}}</li>
|
{{ entry_added }}
|
||||||
<li><code>{% raw %}{{entry_id}}{% endraw %}</code> - {{entry.id}}</li>
|
{% endraw %}
|
||||||
<li><code>{% raw %}{{entry_important}}{% endraw %}</code> - {{entry.important}}</li>
|
</code>{{ entry.added }}
|
||||||
<li><code>{% raw %}{{entry_link}}{% endraw %}</code> - {{entry.link}}</li>
|
</li>
|
||||||
<li><code>{% raw %}{{entry_published}}{% endraw %}</code> - {{entry.published}}</li>
|
<li>
|
||||||
<li><code>{% raw %}{{entry_read}}{% endraw %}</code> - {{entry.read}}</li>
|
<code>
|
||||||
<li><code>{% raw %}{{entry_read_modified}}{% endraw %}</code> - {{entry.read_modified}}</li>
|
{% raw %}
|
||||||
<li><code>{% raw %}{{entry_summary}}{% endraw %}</code> - {{entry.summary|discord_markdown}}</li>
|
{{ entry_author }}
|
||||||
<li><code>{% raw %}{{entry_summary_raw}}{% endraw %}</code> - {{entry.summary}}</li>
|
{% endraw %}
|
||||||
<li><code>{% raw %}{{entry_title}}{% endraw %}</code> - {{entry.title}}</li>
|
</code>{{ entry.author }}
|
||||||
<li><code>{% raw %}{{entry_updated}}{% endraw %}</code> - {{entry.updated}}</li>
|
</li>
|
||||||
|
<li>
|
||||||
</ul>
|
<code>
|
||||||
<ul class="list-inline">
|
{% raw %}
|
||||||
<li>Examples:</li>
|
{{ entry_content }}
|
||||||
<li><code>{% raw %}Hello {{entry_author}}\n{{feed_title}}\n{{entry_read}}{% endraw %}</code></li>
|
{% endraw %}
|
||||||
<br>
|
</code>{{ entry.content[0].value|discord_markdown }}
|
||||||
<li>Will become:</li>
|
</li>
|
||||||
<li><code style="white-space: pre-line">
|
<li>
|
||||||
Hello {{entry.author}}
|
<code>
|
||||||
{{feed.title}}
|
{% raw %}
|
||||||
{{entry.read}}
|
{{ entry_content_raw }}
|
||||||
</code></li>
|
{% endraw %}
|
||||||
</ul>
|
</code>{{ entry.content[0].value }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_id }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.id }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_important }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.important }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_link }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.link }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_published }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.published }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_read }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.read }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_read_modified }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.read_modified }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_summary }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.summary|discord_markdown }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_summary_raw }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.summary }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_title }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.title }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
{{ entry_updated }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>{{ entry.updated }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="list-inline">
|
||||||
|
<li>Examples:</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
{% raw %}
|
||||||
|
Hello {{ entry_author }}\n{{ feed_title }}\n{{ entry_read }}
|
||||||
|
{% endraw %}
|
||||||
|
</code>
|
||||||
|
</li>
|
||||||
|
<br/>
|
||||||
|
<li>Will become:</li>
|
||||||
|
<li>
|
||||||
|
<code>
|
||||||
|
<pre>
|
||||||
|
Hello {{ entry.author }}
|
||||||
|
{{ feed.title }}
|
||||||
|
{{ entry.read }}
|
||||||
|
</pre>
|
||||||
|
</code>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
Something went wrong, there was no entry found. If this feed has entries and you still see this message, please contact the developer.
|
Something went wrong, there was no entry found. If this feed has entries and you still see this message, please contact the developer.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="custom_message" class="col-sm-6 col-form-label">Message</label>
|
<label for="custom_message" class="col-sm-6 col-form-label">Message</label>
|
||||||
<input name="custom_message" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="custom_message"
|
||||||
id="custom_message" value="{% if custom_message %}{{ custom_message }}{% endif %}">
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="custom_message"
|
||||||
|
value="{% if custom_message %} {{ custom_message }}{% endif %}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Add a hidden feed_url field to the form -->
|
<!-- Add a hidden feed_url field to the form -->
|
||||||
<input type="hidden" name="feed_url" value="{{ feed.url }}">
|
<input type="hidden" name="feed_url" value="{{ feed.url }}"/>
|
||||||
|
|
||||||
<!-- Submit button -->
|
<!-- Submit button -->
|
||||||
<div class="d-md-flex">
|
<div class="d-md-flex">
|
||||||
<button class="btn btn-dark btn-sm">Update message</button>
|
<button class="btn btn-dark btn-sm">Update message</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,26 +1,27 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} | {{ feed.title }}{% endblock %}
|
{% block title %}
|
||||||
|
| {{ feed.title }}
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 mb-2 border border-dark">
|
<div class="p-2 mb-2 border border-dark">
|
||||||
<!-- The feed title. -->
|
<!-- The feed title. -->
|
||||||
<h2><a class="text-muted text-decoration-none" href="{{ feed.link }}">{{ feed.title }}</a></h2>
|
<h2>
|
||||||
|
<a class="text-muted text-decoration-none" href="{{ feed.link }}">{{ feed.title }}</a>
|
||||||
|
</h2>
|
||||||
{% if not feed.updates_enabled %}<span class="text-danger">Disabled</span>{% endif %}
|
{% if not feed.updates_enabled %}<span class="text-danger">Disabled</span>{% endif %}
|
||||||
|
|
||||||
{% if feed.last_exception %}
|
{% if feed.last_exception %}
|
||||||
<h3 class="text-danger">{{ feed.last_exception.type_name }}:</h3>
|
<h3 class="text-danger">{{ feed.last_exception.type_name }}:</h3>
|
||||||
<code>{{ feed.last_exception.value_str }}</code>
|
<code>{{ feed.last_exception.value_str }}</code>
|
||||||
|
<pre><code>{{ feed.last_exception.traceback_str }}</code></pre>
|
||||||
<pre><code>{{ feed.last_exception.traceback_str }}</code></pre>
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form action="/remove" method="post">
|
<form action="/remove" method="post">
|
||||||
<button class="btn btn-danger btn-sm" name="feed_url" value="{{ feed.url }}"
|
<button class="btn btn-danger btn-sm"
|
||||||
onclick="return confirm('Are you sure you want to delete this feed?')">Remove
|
name="feed_url"
|
||||||
|
value="{{ feed.url }}"
|
||||||
|
onclick="return confirm('Are you sure you want to delete this feed?')">
|
||||||
|
Remove
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% if not feed.updates_enabled %}
|
{% if not feed.updates_enabled %}
|
||||||
<form action="/unpause" method="post">
|
<form action="/unpause" method="post">
|
||||||
<button class="btn btn-dark btn-sm" name="feed_url" value="{{ feed.url }}">Unpause</button>
|
<button class="btn btn-dark btn-sm" name="feed_url" value="{{ feed.url }}">Unpause</button>
|
||||||
@ -30,46 +31,30 @@
|
|||||||
<button class="btn btn-danger btn-sm" name="feed_url" value="{{ feed.url }}">Pause</button>
|
<button class="btn btn-danger btn-sm" name="feed_url" value="{{ feed.url }}">Pause</button>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="text-muted" href="/whitelist?feed_url={{ feed.url|encode_url }}">Whitelist</a>
|
<a class="text-muted"
|
||||||
<a class="text-muted" href="/blacklist?feed_url={{ feed.url|encode_url }}">Blacklist</a>
|
href="/whitelist?feed_url={{ feed.url|encode_url }}">Whitelist</a>
|
||||||
|
<a class="text-muted"
|
||||||
|
href="/blacklist?feed_url={{ feed.url|encode_url }}">Blacklist</a>
|
||||||
<a class="text-muted" href="/custom?feed_url={{ feed.url|encode_url }}">Custom message</a>
|
<a class="text-muted" href="/custom?feed_url={{ feed.url|encode_url }}">Custom message</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% for entry in entries %}
|
{% for entry in entries %}
|
||||||
<div class="p-2 mb-2 border border-dark">
|
<div class="p-2 mb-2 border border-dark">
|
||||||
{% if entry|entry_is_blacklisted %}
|
{% if entry|entry_is_blacklisted %}<span class="text-danger">Blacklisted</span>{% endif %}
|
||||||
<span class="text-danger">Blacklisted</span>
|
{% if entry|entry_is_whitelisted %}<span class="text-success">Whitelisted</span>{% endif %}
|
||||||
{% endif %}
|
|
||||||
{% if entry|entry_is_whitelisted %}
|
|
||||||
<span class="text-success">Whitelisted</span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
<a class="text-muted text-decoration-none" href="{{ entry.link }}">
|
<a class="text-muted text-decoration-none" href="{{ entry.link }}">{{ entry.title }}</a>
|
||||||
{{ entry.title }}
|
|
||||||
</a>
|
|
||||||
</h2>
|
</h2>
|
||||||
{% if entry.author %}
|
{% if entry.author %}By {{ entry.author }} @{% endif %}
|
||||||
By {{ entry.author }} @
|
|
||||||
{% endif %}
|
|
||||||
{% if entry.published %}
|
{% if entry.published %}
|
||||||
{{ entry.published.strftime('%Y-%m-%d, %T') }}
|
{{ entry.published.strftime('%Y-%m-%d, %T') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if entry.summary %}
|
||||||
{% if entry.summary%}
|
<div class="text-muted">{{ entry.summary|discord_markdown }}</div>
|
||||||
<div class="text-muted">
|
|
||||||
{{ entry.summary|discord_markdown }}
|
|
||||||
</div>
|
|
||||||
{% elif entry.content[0].value %}
|
{% elif entry.content[0].value %}
|
||||||
<div class="text-muted">
|
<div class="text-muted">{{ entry.content[0].value|discord_markdown }}</div>
|
||||||
{{ entry.content[0].value|discord_markdown }}
|
|
||||||
</div>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="text-muted">
|
<div class="text-muted">No content available.</div>
|
||||||
No content available.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -9,67 +9,62 @@
|
|||||||
<!-- How many broken feeds -->
|
<!-- How many broken feeds -->
|
||||||
<!-- Make broken feed text red if true. -->
|
<!-- Make broken feed text red if true. -->
|
||||||
{% if feed_count.broken %}
|
{% if feed_count.broken %}
|
||||||
- <span class="text-danger">
|
- <span class="text-danger">
|
||||||
{% else %}
|
{% else %}
|
||||||
- <span>
|
-<span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ feed_count.broken }} broken</span>
|
{{ feed_count.broken }} broken
|
||||||
|
</span>
|
||||||
<!-- How many enabled feeds -->
|
<!-- How many enabled feeds -->
|
||||||
<!-- Make amount of enabled feeds yellow if some are disabled. -->
|
<!-- Make amount of enabled feeds yellow if some are disabled. -->
|
||||||
{% if feed_count.total != feed_count.updates_enabled %}
|
{% if feed_count.total != feed_count.updates_enabled %}
|
||||||
- <span class="text-warning">
|
- <span class="text-warning">
|
||||||
{% else %}
|
{% else %}
|
||||||
- <span>
|
- <span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ feed_count.updates_enabled }} enabled
|
{{ feed_count.updates_enabled }} enabled</span>
|
||||||
</span>
|
<!-- How many entries -->
|
||||||
|
- {{ entry_count.total }} entries
|
||||||
<!-- How many entries -->
|
<abbr title="Average entries per day for the past 1, 3 and 12 months">
|
||||||
- {{ entry_count.total }} entries
|
({{ entry_count.averages[0]|round(1) }},
|
||||||
<abbr title="Average entries per day for the past 1, 3 and 12 months">
|
{{ entry_count.averages[1]|round(1) }},
|
||||||
({{ entry_count.averages[0]|round(1) }},
|
{{ entry_count.averages[2]|round(1) }})
|
||||||
{{ entry_count.averages[1]|round(1) }},
|
</abbr>
|
||||||
{{ entry_count.averages[2]|round(1) }})
|
</p>
|
||||||
</abbr>
|
<!-- Loop through the webhooks and add the feeds connected to them. -->
|
||||||
</p>
|
{% for hook_from_context in webhooks %}
|
||||||
|
<div class="p-2 mb-2 border border-dark">
|
||||||
<!-- Loop through the webhooks and add the feeds connected to them. -->
|
<ul class="list-group">
|
||||||
{% for hook_from_context in webhooks %}
|
{{ hook_from_context.name }}
|
||||||
<div class="p-2 mb-2 border border-dark">
|
{% for feed_webhook in feeds %}
|
||||||
<ul class="list-group">{{ hook_from_context.name }}
|
{% set feed = feed_webhook["feed"] %}
|
||||||
{% for feed_webhook in feeds %}
|
{% set hook_from_feed = feed_webhook["webhook"] %}
|
||||||
{% set feed = feed_webhook["feed"] %}
|
{% if hook_from_context.url == hook_from_feed %}
|
||||||
{% set hook_from_feed = feed_webhook["webhook"] %}
|
<a class="text-muted" href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}
|
||||||
{% if hook_from_context.url == hook_from_feed %}
|
{% if not feed.updates_enabled %}<span class="text-warning">Disabled</span>{% endif %}
|
||||||
<a class="text-muted"
|
{% if feed.last_exception %}<span class="text-danger">({{ feed.last_exception.value_str }})</span>{% endif %}
|
||||||
href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}
|
</a>
|
||||||
{% if not feed.updates_enabled %}<span class="text-warning"> Disabled</span>{% endif %}
|
{% endif %}
|
||||||
{% if feed.last_exception %}
|
{% endfor %}
|
||||||
<span class="text-danger">({{ feed.last_exception.value_str }})</span>
|
</ul>
|
||||||
{% endif %}
|
</div>
|
||||||
</a>
|
{% endfor %}
|
||||||
{% endif %}
|
{% else %}
|
||||||
{% endfor %}
|
<p>
|
||||||
</ul>
|
No feeds yet. Add one <a class="text-muted" href="/add">here</a>.
|
||||||
</div>
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
<!-- Show feeds without webhooks -->
|
||||||
|
{% if broken_feeds %}
|
||||||
|
<div class="p-2 mb-2 border border-dark">
|
||||||
|
<ul class="list-group text-danger">
|
||||||
|
Feeds without webhook:
|
||||||
|
{% for broken_feed in broken_feeds %}
|
||||||
|
<a class="text-muted"
|
||||||
|
href="/feed?feed_url={{ broken_feed.url|encode_url }}">{{ broken_feed.url }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
</ul>
|
||||||
<p>
|
</div>
|
||||||
No feeds yet. Add one <a class="text-muted" href="/add">here</a>.
|
{% endif %}
|
||||||
</p>
|
</ul>
|
||||||
{% endif %}
|
{% endblock content %}
|
||||||
|
|
||||||
<!-- Show feeds without webhooks -->
|
|
||||||
{% if broken_feeds %}
|
|
||||||
<div class="p-2 mb-2 border border-dark">
|
|
||||||
<ul class="list-group text-danger">Feeds without webhook:
|
|
||||||
{% for broken_feed in broken_feeds %}
|
|
||||||
<a class="text-muted"
|
|
||||||
href="/feed?feed_url={{ broken_feed.url|encode_url }}">{{ broken_feed.url }}</a>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<nav class="navbar navbar-expand-md navbar-dark p-2 mb-3 border-bottom border-warning">
|
<nav class="navbar navbar-expand-md navbar-dark p-2 mb-3 border-bottom border-warning">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" data-bs-target="#collapseNavbar">
|
<button class="navbar-toggler ms-auto"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapseNavbar">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="navbar-collapse collapse" id="collapseNavbar">
|
<div class="navbar-collapse collapse" id="collapseNavbar">
|
||||||
@ -17,13 +20,13 @@
|
|||||||
<a class="nav-link" href="/webhooks">Add webhook</a>
|
<a class="nav-link" href="/webhooks">Add webhook</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{# Search #}
|
{# Search #}
|
||||||
<form action="/search" method="get" class="ms-auto w-50 input-group">
|
<form action="/search" method="get" class="ms-auto w-50 input-group">
|
||||||
<input name="query" class="form-control bg-dark border-dark text-muted" type="search"
|
<input name="query"
|
||||||
placeholder="Search">
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
type="search"
|
||||||
|
placeholder="Search"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{# Donate button #}
|
{# Donate button #}
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav ms-auto">
|
||||||
<li class="nav-item d-none d-md-block">
|
<li class="nav-item d-none d-md-block">
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} | Search{% endblock %}
|
{% block title %}
|
||||||
|
| Search
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 border border-dark text-muted">
|
<div class="p-2 border border-dark text-muted">
|
||||||
Your search for "{{ query }}" returned {{ search_amount.total }} results.
|
Your search for "{{ query }}" returned {{ search_amount.total }} results.
|
||||||
</div>
|
</div>
|
||||||
{{ search_html | safe }}
|
{{ search_html | safe }}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} | Add new webhook{% endblock %}
|
{% block title %}
|
||||||
|
| Add new webhook
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 border border-dark">
|
<div class="p-2 border border-dark">
|
||||||
<form action="/add_webhook" method="post">
|
<form action="/add_webhook" method="post">
|
||||||
@ -7,27 +9,28 @@
|
|||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
<label for="webhook_name" class="col-sm-2 col-form-label">Webhook Name</label>
|
<label for="webhook_name" class="col-sm-2 col-form-label">Webhook Name</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="webhook_name" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="webhook_name"
|
||||||
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
id="webhook_name"
|
id="webhook_name"
|
||||||
placeholder="TheLovinator #RSS">
|
placeholder="TheLovinator #RSS"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Webhook URL #}
|
{# Webhook URL #}
|
||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
<label for="webhook_url" class="col-sm-2 col-form-label">Webhook URL</label>
|
<label for="webhook_url" class="col-sm-2 col-form-label">Webhook URL</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="webhook_url" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="webhook_url"
|
||||||
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
id="webhook_url"
|
id="webhook_url"
|
||||||
placeholder="https://discord.com/api/webhooks/1011224189471124054/CQMa4hJN4gz...">
|
placeholder="https://discord.com/api/webhooks/1011224189471124054/CQMa4hJN4gz..."/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Submit button #}
|
{# Submit button #}
|
||||||
<div class="d-md-flex">
|
<div class="d-md-flex">
|
||||||
<button class="btn btn-dark btn-sm">Add webhook</button>
|
<button class="btn btn-dark btn-sm">Add webhook</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} | Blacklist{% endblock %}
|
{% block title %}
|
||||||
|
| Blacklist
|
||||||
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="p-2 border border-dark">
|
<div class="p-2 border border-dark">
|
||||||
<form action="/whitelist" method="post">
|
<form action="/whitelist" method="post">
|
||||||
<!-- Feed URL -->
|
<!-- Feed URL -->
|
||||||
<div class="row pb-2">
|
<div class="row pb-2">
|
||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="form-text">
|
<div class="form-text">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li>Comma separated list of words to whitelist. Only send message to
|
<li>
|
||||||
|
Comma separated list of words to whitelist. Only send message to
|
||||||
Discord if one of these words are present in the corresponding fields.
|
Discord if one of these words are present in the corresponding fields.
|
||||||
</li>
|
</li>
|
||||||
<li>Whitelist always takes precedence over blacklist. Leave empty to disable.</li>
|
<li>Whitelist always takes precedence over blacklist. Leave empty to disable.</li>
|
||||||
<li>Words are case-insensitive. No spaces should be used before or after the comma.</li>
|
<li>Words are case-insensitive. No spaces should be used before or after the comma.</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
Correct:
|
Correct:
|
||||||
<code>
|
<code>
|
||||||
@ -29,28 +30,33 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="whitelist_title" class="col-sm-6 col-form-label">Whitelist - Title</label>
|
<label for="whitelist_title" class="col-sm-6 col-form-label">Whitelist - Title</label>
|
||||||
<input name="whitelist_title" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="whitelist_title"
|
||||||
id="whitelist_title" value="{% if whitelist_title %}{{ whitelist_title }}{% endif %}">
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="whitelist_title"
|
||||||
|
value="{% if whitelist_title %} {{ whitelist_title }}{% endif %}"/>
|
||||||
<label for="whitelist_summary" class="col-sm-6 col-form-label">Whitelist - Summary</label>
|
<label for="whitelist_summary" class="col-sm-6 col-form-label">Whitelist - Summary</label>
|
||||||
<input name="whitelist_summary" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="whitelist_summary"
|
||||||
id="whitelist_summary" value="{% if whitelist_summary %}{{ whitelist_summary }}{% endif %}">
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="whitelist_summary"
|
||||||
|
value="{% if whitelist_summary %} {{ whitelist_summary }}{% endif %}"/>
|
||||||
<label for="whitelist_content" class="col-sm-6 col-form-label">Whitelist - Content (Not implemented yet)</label>
|
<label for="whitelist_content" class="col-sm-6 col-form-label">Whitelist - Content (Not implemented yet)</label>
|
||||||
<input name="whitelist_content" type="text" class="form-control bg-dark border-dark text-muted"
|
<input name="whitelist_content"
|
||||||
id="whitelist_content" value="{% if whitelist_content %}{{ whitelist_content }}{% endif %}" disabled>
|
type="text"
|
||||||
|
class="form-control bg-dark border-dark text-muted"
|
||||||
|
id="whitelist_content"
|
||||||
|
value="{% if whitelist_content %} {{ whitelist_content }}{% endif %}"
|
||||||
|
disabled/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Add a hidden feed_url field to the form -->
|
<!-- Add a hidden feed_url field to the form -->
|
||||||
<input type="hidden" name="feed_url" value="{{ feed.url }}">
|
<input type="hidden" name="feed_url" value="{{ feed.url }}"/>
|
||||||
|
|
||||||
<!-- Submit button -->
|
<!-- Submit button -->
|
||||||
<div class="d-md-flex">
|
<div class="d-md-flex">
|
||||||
<button class="btn btn-dark btn-sm">Update whitelist</button>
|
<button class="btn btn-dark btn-sm">Update whitelist</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -32,3 +32,9 @@ profile = "black"
|
|||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 120
|
line-length = 120
|
||||||
target-version = ["py311"]
|
target-version = ["py311"]
|
||||||
|
|
||||||
|
[tool.djlint]
|
||||||
|
ignore = "D018,J018"
|
||||||
|
profile = "jinja"
|
||||||
|
max_line_length = 120
|
||||||
|
format_attribute_template_tags = true
|
||||||
|
Reference in New Issue
Block a user