Improve index page
This commit is contained in:
@ -5,58 +5,55 @@
|
|||||||
<!-- Check if any feeds -->
|
<!-- Check if any feeds -->
|
||||||
{% if feeds %}
|
{% if feeds %}
|
||||||
<p>
|
<p>
|
||||||
{{ feed_count.total }} feeds
|
{{ feed_count.total }} feed{{'s' if feed_count.total > 1 else "" }}
|
||||||
<!-- 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">{{ feed_count.broken }} broken</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
-<span>
|
- {{ feed_count.broken }} broken
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ feed_count.broken }} broken
|
<!-- How many enabled feeds -->
|
||||||
</span>
|
<!-- Make amount of enabled feeds yellow if some are disabled. -->
|
||||||
<!-- How many enabled feeds -->
|
{% if feed_count.total != feed_count.updates_enabled %}
|
||||||
<!-- Make amount of enabled feeds yellow if some are disabled. -->
|
- <span class="text-warning">{{ feed_count.updates_enabled }} enabled</span>
|
||||||
{% if feed_count.total != feed_count.updates_enabled %}
|
{% else %}
|
||||||
- <span class="text-warning">
|
- {{ feed_count.updates_enabled }} enabled
|
||||||
{% else %}
|
{% endif %}
|
||||||
- <span>
|
<!-- How many entries -->
|
||||||
{% endif %}
|
- {{ entry_count.total }} entries
|
||||||
{{ feed_count.updates_enabled }} enabled</span>
|
<abbr title="Average entries per day for the past 1, 3 and 12 months">
|
||||||
<!-- How many entries -->
|
({{ entry_count.averages[0]|round(1) }},
|
||||||
- {{ entry_count.total }} entries
|
{{ entry_count.averages[1]|round(1) }},
|
||||||
<abbr title="Average entries per day for the past 1, 3 and 12 months">
|
{{ entry_count.averages[2]|round(1) }})
|
||||||
({{ entry_count.averages[0]|round(1) }},
|
</abbr>
|
||||||
{{ entry_count.averages[1]|round(1) }},
|
</p>
|
||||||
{{ entry_count.averages[2]|round(1) }})
|
<!-- Loop through the webhooks and add the feeds connected to them. -->
|
||||||
</abbr>
|
{% for hook_from_context in webhooks %}
|
||||||
</p>
|
<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">
|
{% set feed = feed_webhook["feed"] %}
|
||||||
{{ hook_from_context.name }}
|
{% set hook_from_feed = feed_webhook["webhook"] %}
|
||||||
{% for feed_webhook in feeds %}
|
{% if hook_from_context.url == hook_from_feed %}
|
||||||
{% set feed = feed_webhook["feed"] %}
|
<a class="text-muted" href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}
|
||||||
{% set hook_from_feed = feed_webhook["webhook"] %}
|
{% if not feed.updates_enabled %}<span class="text-warning">Disabled</span>{% endif %}
|
||||||
{% if hook_from_context.url == hook_from_feed %}
|
{% if feed.last_exception %}<span class="text-danger">({{ feed.last_exception.value_str }})</span>{% endif %}
|
||||||
<a class="text-muted" 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 %}<span class="text-danger">({{ feed.last_exception.value_str }})</span>{% endif %}
|
{% endfor %}
|
||||||
</a>
|
</ul>
|
||||||
{% endif %}
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
{% else %}
|
||||||
</div>
|
<p>
|
||||||
{% endfor %}
|
Hello there!
|
||||||
{% else %}
|
</br>
|
||||||
<p>
|
You need to add a webhook to get started and then add a feed. You can find both options in the menu above.
|
||||||
Hello there!
|
</br>
|
||||||
</br>
|
</br>
|
||||||
You need to add a webhook to get started and then add a feed. You can find both options in the menu above.
|
If you have any questions or suggestions, feel free to contact me on <a class="text-muted" href="mailto:tlovinator@gmail.com">tlovinator@gmail.com</a> or TheLovinator#9276 on Discord.
|
||||||
</br>
|
|
||||||
</br>
|
|
||||||
If you have any questions or suggestions, feel free to contact me on <a class="text-muted" href="mailto:tlovinator@gmail.com">tlovinator@gmail.com</a> or TheLovinator#9276 on Discord.
|
|
||||||
</br>
|
</br>
|
||||||
Thanks!
|
Thanks!
|
||||||
</p>
|
</p>
|
||||||
|
Reference in New Issue
Block a user