Move site news to own file

This commit is contained in:
2024-07-08 20:55:00 +02:00
parent b547a70cdb
commit 11d9d1022e
4 changed files with 48 additions and 37 deletions

View File

@ -10,6 +10,7 @@
<div class="col-lg-3">{% include "partials/toc.html" %}</div>
<div class="col-lg-9">
{% include "partials/info_box.html" %}
{% include "partials/news.html" %}
{% for game in games %}
{% include "partials/game_card.html" %}
{% endfor %}

View File

@ -5,48 +5,12 @@
<h2 class="card-title h2">Information</h2>
<div class="mb-3">
<p>
This site allows users to subscribe to Twitch drops. You can either get notified when the website finds a new drop on the Twitch site or get notified when the drops begin to be farmable.
This site allows users to subscribe to Twitch drops notifications. You can choose to be alerted when new drops are found on Twitch or when the drops become available for farming.
</p>
<p>
You can add a Discord Webhook <a href="{% url 'core:webhooks' %}">here</a>.
</p>
</div>
<div class="mt-auto">
<h3 class="h4">Webhooks</h3>
{% for webhook in webhooks %}
<div class="mt-3">
<img src="{{ webhook.avatar }}?size=32"
alt="{{ webhook.name }}"
class="rounded-circle"
height="32"
width="32">
<a href="{{ webhook.url }}" target="_blank">{{ webhook.name }}</a>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-daily">
<label class="form-check-label" for="new-drop-switch-daily">Daily notification of newly added games to TTVdrops</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-weekly">
<label class="form-check-label" for="new-drop-switch-weekly">
Weekly notification of newly added games to TTVdrops
</label>
</div>
<br>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-daily">
<label class="form-check-label" for="new-org-switch-daily">
Daily notification of newly added <abbr title="Organizations are the companies that own the games.">organizations</abbr> to TTVdrops
</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-weekly">
<label class="form-check-label" for="new-org-switch-weekly">
Weekly notification of newly added <abbr title="Organizations are the companies that own the games.">organizations</abbr> to TTVdrops
</label>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,44 @@
<div class="card mb-4 shadow-sm" id="info-box">
<div class="row g-0">
<div class="col-md-10">
<div class="card-body">
<h2 class="card-title h2">Site news</h2>
<div class="mt-auto">
{% for webhook in webhooks %}
<div class="mt-3">
<img src="{{ webhook.avatar }}?size=32"
alt="{{ webhook.name }}"
class="rounded-circle"
height="32"
width="32">
<a href="{{ webhook.url }}" target="_blank">{{ webhook.name }}</a>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-daily">
<label class="form-check-label" for="new-drop-switch-daily">Daily notification of newly added games to TTVdrops</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-drop-switch-weekly">
<label class="form-check-label" for="new-drop-switch-weekly">
Weekly notification of newly added games to TTVdrops
</label>
</div>
<br>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-daily">
<label class="form-check-label" for="new-org-switch-daily">
Daily notification of newly added <abbr title="Organizations are the companies that own the games.">organizations</abbr> to TTVdrops
</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="new-org-switch-weekly">
<label class="form-check-label" for="new-org-switch-weekly">
Weekly notification of newly added <abbr title="Organizations are the companies that own the games.">organizations</abbr> to TTVdrops
</label>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>

View File

@ -4,6 +4,8 @@
<div id="toc-list" class="list-group">
<a class="list-group-item list-group-item-action plain-text-item"
href="#info-box">Information</a>
<a class="list-group-item list-group-item-action plain-text-item"
href="#game-list">Site news</a>
{% for game in games %}
<a class="list-group-item list-group-item-action plain-text-item"
href="#game-{{ game.game_id }}">{{ game.display_name }}</a>