From 428f49879d94e217e11cf1b18a05932fb0f99015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Helle=C5=9Ben?= Date: Sun, 22 Mar 2026 05:09:27 +0100 Subject: [PATCH] Add breadcrumb navigation --- kick/views.py | 6 - templates/core/dashboard.html | 5 +- templates/core/docs_rss.html | 4 +- templates/kick/campaign_detail.html | 165 ++++++------- templates/kick/campaign_list.html | 8 +- templates/kick/category_detail.html | 52 +--- templates/kick/category_list.html | 3 + templates/kick/dashboard.html | 17 +- templates/kick/org_list.html | 5 +- templates/kick/organization_detail.html | 14 +- templates/twitch/badge_list.html | 3 + templates/twitch/badge_set_detail.html | 11 +- templates/twitch/campaign_detail.html | 66 +++-- templates/twitch/campaign_list.html | 5 +- templates/twitch/channel_detail.html | 34 ++- templates/twitch/channel_list.html | 3 + templates/twitch/dashboard.html | 9 +- templates/twitch/emote_gallery.html | 4 + templates/twitch/game_detail.html | 26 +- templates/twitch/games_grid.html | 9 +- templates/twitch/games_list.html | 4 + templates/twitch/org_list.html | 4 + templates/twitch/organization_detail.html | 18 +- templates/twitch/reward_campaign_detail.html | 243 ++++++++----------- templates/twitch/reward_campaign_list.html | 16 +- templates/youtube/index.html | 6 +- twitch/feeds.py | 6 +- twitch/views.py | 22 +- 28 files changed, 351 insertions(+), 417 deletions(-) diff --git a/kick/views.py b/kick/views.py index be7df1c..511447f 100644 --- a/kick/views.py +++ b/kick/views.py @@ -289,9 +289,6 @@ def campaign_detail_view(request: HttpRequest, kick_id: str) -> HttpResponse: campaign.rewards.order_by("required_units").select_related("category"), # type: ignore[union-attr] ) channels: list[KickChannel] = list(campaign.channels.select_related("user")) - reward_count: int = len(rewards) - channels_count: int = len(channels) - total_watch_minutes: int = sum(reward.required_units for reward in rewards) breadcrumb_schema: str = _build_breadcrumb_schema([ {"name": "Home", "url": request.build_absolute_uri("/")}, @@ -360,9 +357,6 @@ def campaign_detail_view(request: HttpRequest, kick_id: str) -> HttpResponse: "campaign": campaign, "rewards": rewards, "channels": channels, - "reward_count": reward_count, - "channels_count": channels_count, - "total_watch_minutes": total_watch_minutes, "now": now, "breadcrumb_schema": breadcrumb_schema, **seo_context, diff --git a/templates/core/dashboard.html b/templates/core/dashboard.html index b634498..c563b8c 100644 --- a/templates/core/dashboard.html +++ b/templates/core/dashboard.html @@ -114,7 +114,6 @@ {% for channel in campaign_data.allowed_channels|slice:":5" %}
  • {{ channel.display_name }} Go to a participating live channel @@ -144,7 +142,6 @@ {% if campaign_data.campaign.game.twitch_directory_url %}
  • Go to a participating live channel @@ -321,7 +318,7 @@ {% if campaign_data.channels %} {% for channel in campaign_data.channels|slice:":5" %}
  • - + {% if channel.user %} {{ channel.user.username }} {% else %} diff --git a/templates/core/docs_rss.html b/templates/core/docs_rss.html index 41011a1..13de544 100644 --- a/templates/core/docs_rss.html +++ b/templates/core/docs_rss.html @@ -41,7 +41,7 @@ - Latest Twitch drop campaigns + Latest Twitch drops https://ttvdrops.lovinator.space/rss/campaigns/ @@ -77,7 +77,7 @@ - Latest Kick campaigns + Latest Kick drops https://ttvdrops.lovinator.space/kick/rss/campaigns/ diff --git a/templates/kick/campaign_detail.html b/templates/kick/campaign_detail.html index 376d25f..b93cb98 100644 --- a/templates/kick/campaign_detail.html +++ b/templates/kick/campaign_detail.html @@ -20,11 +20,6 @@ {% endblock extra_head %} {% block content %}
    -
    {{ campaign.name }} - {% if campaign.category %} -
    - [rss] - [atom] - [discord] - [explain] -
    - {% endif %} -

    - Status: {{ campaign.status|default:"unknown"|capfirst }} - {% if campaign.rule_name %}- Rule: {{ campaign.rule_name }}{% endif %} -

    - {% if campaign.category or campaign.organization %} -

    - {% if campaign.category %} - {{ campaign.category.name }} - {% endif %} - {% if campaign.organization %} - {% if campaign.category %}-{% endif %} - {{ campaign.organization.name }} - {% endif %} -

    - {% endif %} -

    - ID: {{ campaign.kick_id }} - {% if campaign.rule_id %}- Rule ID: {{ campaign.rule_id }}{% endif %} - - Added: - ({{ campaign.added_at|timesince }} ago) - - Updated: - ({{ campaign.updated_at|timesince }} ago) -

    +
    + Kick > + Campaigns > + {{ campaign.name }} +
    +
    + {% if campaign.category %} + Category: + {{ campaign.category.name }} + {% endif %} +
    +
    + {% if campaign.organization %} + Organization: + {{ campaign.organization.name }} + {% endif %} +
    {% if campaign.ends_at %} -

    - Ends: +

    + {% if campaign.ends_at > now %} + Ends + {% else %} + Ended at + {% endif %} {% if campaign.ends_at < now %} @@ -97,11 +77,15 @@ {% else %} (in {{ campaign.ends_at|timeuntil }}) {% endif %} -

    +
    {% endif %} {% if campaign.starts_at %} -

    - Starts: +

    + {% if campaign.starts_at > now %} + Starts + {% else %} + Started at + {% endif %} {% if campaign.starts_at < now %} @@ -109,56 +93,37 @@ {% else %} (in {{ campaign.starts_at|timeuntil }}) {% endif %} -

    +
    {% endif %} - {% if campaign.duration %} -

    - Duration: {{ campaign.duration }} -

    - {% endif %} -

    - {% if reward_count %} - {{ reward_count }} reward{{ reward_count|pluralize }} - ({{ total_watch_minutes }} total watch minute{{ total_watch_minutes|pluralize }}) - {% else %} - No rewards - {% endif %} -

    -
    - Participating channels: + {% if campaign.duration %}
    Duration: {{ campaign.duration }}
    {% endif %} +
    + Added + ({{ campaign.added_at|timesince }} ago) +
    +
    + Updated + ({{ campaign.updated_at|timesince }} ago) +
    +
    {% if campaign.channels.all %} -
      - {% for channel in campaign.channels.all|slice:":5" %} -
    • - {% if channel.user %} - {{ channel.user.username }} - {% else %} - {{ channel.name }} - {% endif %} -
    • - {% endfor %} - {% if campaign.channels.count > 5 %} -
    • ... and {{ campaign.channels.count|add:"-5" }} more
    • + Participating channels: + {% for channel in campaign.channels.all|slice:":5" %} + {% if channel.user %} + {{ channel.user.username }} + {% else %} + {{ channel.name }} {% endif %} -
    - {% else %} -

    - - {{ campaign.category.name }} is game wide. -

    + {% endfor %} + {% if campaign.channels.count > 5 %}and {{ campaign.channels.count|add:"-5" }} more{% endif %} {% endif %}
    {% if campaign.created_at %}

    {% endif %} @@ -166,19 +131,27 @@

    {% endif %} -

    - {% if campaign.url %}Details{% endif %} +

    + [rss] + [atom] + [discord] + [explain] {% if campaign.connect_url %} - {% if campaign.url %}-{% endif %} Connect account + title="Connect URL for {{ campaign.name }}">[connect] {% endif %} -

    + {% if campaign.url %}[about]{% endif %} + {% if campaign.channels.count == 0 %} + {% if campaign.rule_name == "Watch to redeem" %}[watch]{% endif %} + {% endif %} +

    @@ -210,9 +183,9 @@

    {{ reward.name }}

    {% if reward.required_units %} -

    {{ reward.required_units }} minutes watched

    +

    Watch {{ reward.required_units }} minutes to earn

    {% else %} -

    No watch-time requirement

    +

    No watch-time requirement

    {% endif %}
    diff --git a/templates/kick/campaign_list.html b/templates/kick/campaign_list.html index 8b58cc8..6af7660 100644 --- a/templates/kick/campaign_list.html +++ b/templates/kick/campaign_list.html @@ -18,7 +18,13 @@ {% endblock extra_head %} {% block content %}
    -

    Kick Drop Campaigns

    +

    List of Kick drops

    +
    + Kick > Campaigns +
    +
    + Scraped from Kick API. +
    [rss] diff --git a/templates/kick/category_detail.html b/templates/kick/category_detail.html index 113479b..d77e751 100644 --- a/templates/kick/category_detail.html +++ b/templates/kick/category_detail.html @@ -60,9 +60,7 @@
    {% if category.kick_url %}

    - {{ category.kick_url }} + {{ category.kick_url }}

    {% endif %}

    @@ -161,9 +159,7 @@ {% endif %} {% if campaign.connect_url %}

    - Connect account + Connect account

    {% endif %}
    @@ -173,13 +169,9 @@ {% for channel in campaign.channels.all|slice:":5" %}
  • {% if channel.user %} - {{ channel.user.username }} + {{ channel.user.username }} {% else %} - {{ channel.slug }} + {{ channel.slug }} {% endif %}
  • {% endfor %} @@ -190,9 +182,7 @@ {% else %}

    {% if category.kick_url %} - {{ category.name }} is game wide. + {{ category.name }} is game wide. {% else %} Game wide. {% endif %} @@ -304,9 +294,7 @@ {% endif %} {% if campaign.connect_url %}

    - Connect account + Connect account

    {% endif %}
    @@ -316,13 +304,9 @@ {% for channel in campaign.channels.all|slice:":5" %}
  • {% if channel.user %} - {{ channel.user.username }} + {{ channel.user.username }} {% else %} - {{ channel.slug }} + {{ channel.slug }} {% endif %}
  • {% endfor %} @@ -333,9 +317,7 @@ {% else %}

    {% if category.kick_url %} - {{ category.name }} is game wide. + {{ category.name }} is game wide. {% else %} Game wide. {% endif %} @@ -447,9 +429,7 @@ {% endif %} {% if campaign.connect_url %}

    - Connect account + Connect account

    {% endif %}
    @@ -459,13 +439,9 @@ {% for channel in campaign.channels.all|slice:":5" %}
  • {% if channel.user %} - {{ channel.user.username }} + {{ channel.user.username }} {% else %} - {{ channel.slug }} + {{ channel.slug }} {% endif %}
  • {% endfor %} @@ -476,9 +452,7 @@ {% else %}

    {% if category.kick_url %} - {{ category.name }} is game wide. + {{ category.name }} is game wide. {% else %} Game wide. {% endif %} diff --git a/templates/kick/category_list.html b/templates/kick/category_list.html index b09c3bf..5eadb02 100644 --- a/templates/kick/category_list.html +++ b/templates/kick/category_list.html @@ -19,6 +19,9 @@ {% block content %}

    Kick Games

    +
    + Kick > Games +
    [rss] -

    Active Kick Drop Campaigns

    +

    Active Kick Drops

    +
    - Connect account + Connect account

    {% endif %}
    @@ -126,13 +127,9 @@ {% for channel in campaign.channels.all|slice:":5" %}
  • {% if channel.user %} - {{ channel.user.username }} + {{ channel.user.username }} {% else %} - {{ channel.slug }} + {{ channel.slug }} {% endif %}
  • {% endfor %} diff --git a/templates/kick/org_list.html b/templates/kick/org_list.html index 9e92e52..5f0f1aa 100644 --- a/templates/kick/org_list.html +++ b/templates/kick/org_list.html @@ -19,6 +19,9 @@ {% block content %}

    Kick Organizations

    +
    + Kick > Organizations +
    [rss] @@ -34,7 +37,7 @@
  • {{ org.name }} {% if org.campaign_count %}- {{ org.campaign_count }} campaign{{ org.campaign_count|pluralize }}{% endif %} - {% if org.url %}- {{ org.url }}{% endif %} + {% if org.url %}- {{ org.url }}{% endif %}
  • {% endfor %} diff --git a/templates/kick/organization_detail.html b/templates/kick/organization_detail.html index 0634ba5..46562dd 100644 --- a/templates/kick/organization_detail.html +++ b/templates/kick/organization_detail.html @@ -28,7 +28,7 @@ {% if org.restricted %}

    Restricted

    {% endif %} {% if org.url %}

    - {{ org.url }} + {{ org.url }}

    {% endif %}

    @@ -121,9 +121,7 @@ {% endif %} {% if campaign.connect_url %}

    - Connect account + Connect account

    {% endif %}
    @@ -133,13 +131,9 @@ {% for channel in campaign.channels.all|slice:":5" %}
  • {% if channel.user %} - {{ channel.user.username }} + {{ channel.user.username }} {% else %} - {{ channel.slug }} + {{ channel.slug }} {% endif %}
  • {% endfor %} diff --git a/templates/twitch/badge_list.html b/templates/twitch/badge_list.html index 0a9e41c..a91b3cc 100644 --- a/templates/twitch/badge_list.html +++ b/templates/twitch/badge_list.html @@ -5,6 +5,9 @@ {% endblock title %} {% block content %}

    {{ badge_sets.count }} Twitch Chat Badges

    +
    + Twitch > Badges +
    {% if badge_sets %} {% for data in badge_data %}

    diff --git a/templates/twitch/badge_set_detail.html b/templates/twitch/badge_set_detail.html index c14bc1d..427e940 100644 --- a/templates/twitch/badge_set_detail.html +++ b/templates/twitch/badge_set_detail.html @@ -5,6 +5,9 @@ {% endblock title %} {% block content %}

    {{ badge_set.set_id }}

    +
    + Twitch > Badges > {{ badge_set.set_id }} +
    {% if badges %} @@ -19,12 +22,12 @@ {% if badge.award_campaigns %} diff --git a/templates/twitch/campaign_detail.html b/templates/twitch/campaign_detail.html index 6eda59b..6251304 100644 --- a/templates/twitch/campaign_detail.html +++ b/templates/twitch/campaign_detail.html @@ -31,71 +31,70 @@

    {{ campaign.clean_name }}

    +
    - {% if campaign.game %} - {{ campaign.game.get_game_name }} - {% endif %} - {% if owners %} - - - - {% for org in owners %} - {{ org.name }} - {% endfor %} - {% endif %} + Twitch > Campaigns > {{ campaign.game.display_name }} > {{ campaign.clean_name }}
    + + {% if owners %} +
    + Owned by + {% for owner in owners %} + {{ owner.name }} + {% if not forloop.last %}-{% endif %} + {% endfor %} +
    + {% endif %}

    {{ campaign.description|linebreaksbr }}

    - - Published: +
    + Published - · Last updated: + title="{{ campaign.added_at|date:'DATETIME_FORMAT' }}">{{ campaign.added_at|date:"M d, Y H:i" }} ({{ campaign.added_at|timesince }} ago) +
    +
    + Last updated - + title="{{ campaign.updated_at|date:'DATETIME_FORMAT' }}">{{ campaign.updated_at|date:"M d, Y H:i" }} ({{ campaign.updated_at|timesince }} ago) +
    {% if campaign.end_at < now %} + Ended + title="{{ campaign.end_at|date:'DATETIME_FORMAT' }}">{{ campaign.end_at|date:"M d, Y H:i" }} ({{ campaign.end_at|timesince }} ago) {% else %} + Ends in + title="{{ campaign.end_at|date:'DATETIME_FORMAT' }}">{{ campaign.end_at|date:"M d, Y H:i" }} (in {{ campaign.end_at|timeuntil }}) {% endif %}
    {% if campaign.start_at > now %} + Starts in + title="{{ campaign.start_at|date:'DATETIME_FORMAT' }}">{{ campaign.start_at|date:"M d, Y H:i" }} (in {{ campaign.start_at|timeuntil }}) {% else %} + Started + title="{{ campaign.start_at|date:'DATETIME_FORMAT' }}">{{ campaign.start_at|date:"M d, Y H:i" }} ({{ campaign.start_at|timesince }} ago) {% endif %}
    + Duration is
    - {% if campaign.details_url %}[details]{% endif %} + {% if campaign.details_url %}[details]{% endif %} - {% if campaign.account_link_url %} - [connect] - {% endif %} + {% if campaign.account_link_url %}[connect]{% endif %} {% if campaign.game %} Go to a participating live channel diff --git a/templates/twitch/campaign_list.html b/templates/twitch/campaign_list.html index 9e17073..219217a 100644 --- a/templates/twitch/campaign_list.html +++ b/templates/twitch/campaign_list.html @@ -21,7 +21,10 @@ {% block content %}
    -

    Drop Campaigns

    +

    List of Twitch Drop Campaigns

    +
    + Dashboard > Drops +

    {{ channel.display_name }}

    + +
    + Twitch > Channels > {{ channel.display_name }} +
    {% if channel.display_name != channel.name %} -

    +

    Username: {{ channel.name }} -

    +
    {% endif %} + +
    Channel ID: {{ channel.twitch_id }}
    +
    + Published + ({{ channel.added_at|timesince }} ago) +
    +
    + Last updated + ({{ channel.updated_at|timesince }} ago) +
    - -

    Channel ID: {{ channel.twitch_id }}

    -

    - Published: - - · Last updated: - -

    {% if active_campaigns %}
    Active Campaigns
    {{ badge.title }} {{ badge.description }} - [18px] - [36px] - [72px] + [18px] + [36px] + [72px] - {% if badge.click_url %}{{ badge.click_action }}{% endif %} + {% if badge.click_url %}{{ badge.click_action }}{% endif %}
    diff --git a/templates/twitch/channel_list.html b/templates/twitch/channel_list.html index ec03c19..aab3dce 100644 --- a/templates/twitch/channel_list.html +++ b/templates/twitch/channel_list.html @@ -5,6 +5,9 @@ {% endblock title %} {% block content %}

    Channels

    +
    + Twitch > Channels +

    Browse all channels that can participate in drop campaigns

    -

    Active Twitch Drops Campaigns

    +

    List of all active Twitch drops.

    - This page lists all currently active Twitch Drops campaigns - organized by game. -
    Click on a campaign for more details about it and how to earn drops.
    @@ -108,7 +105,6 @@ {% for channel in campaign_data.allowed_channels|slice:":5" %}

  • {{ channel.display_name }} Browse {{ campaign_data.campaign.game.display_name }} category @@ -139,7 +134,6 @@ {% if campaign_data.campaign.game.twitch_directory_url %}
  • Go to a participating live channel @@ -236,7 +230,6 @@ {% if campaign.external_url %}
    Twitch > Emotes +
    {% for emote in emotes %} ({{ game.name }}){% endif %} + +
    + Twitch > Games > {{ game.display_name }} +
    {% if owners %} - +
    Owned by {% for owner in owners %} {{ owner.name }} - {% if not forloop.last %},{% endif %} + {% if not forloop.last %}-{% endif %} {% endfor %} - +
    {% endif %}
    - Twitch ID: {{ game.twitch_id }} -
    -
    Twitch slug: {{ game.slug }}
    - - Published: + Published - · Last updated: + title="{{ game.added_at|date:'DATETIME_FORMAT' }}">{{ game.added_at|date:"M d, Y H:i" }} ({{ game.added_at|timesince }} ago) + +
    + Last updated - + title="{{ game.updated_at|date:'DATETIME_FORMAT' }}">{{ game.updated_at|date:"M d, Y H:i" }} ({{ game.updated_at|timesince }} ago) +
    -

    All Games

    +

    All Games

    + +
    + Twitch > Games +
    [list] [rss] @@ -40,8 +44,7 @@
    {% for organization, games in games_by_org.items %} {% for item in games %} -
    diff --git a/templates/twitch/games_list.html b/templates/twitch/games_list.html index a2ac080..3497856 100644 --- a/templates/twitch/games_list.html +++ b/templates/twitch/games_list.html @@ -19,6 +19,10 @@ {% block content %}

    Games List

    + +
    + Twitch > Games +
    [grid] [rss] diff --git a/templates/twitch/org_list.html b/templates/twitch/org_list.html index 7b2b465..911e08a 100644 --- a/templates/twitch/org_list.html +++ b/templates/twitch/org_list.html @@ -4,6 +4,10 @@ {% endblock title %} {% block content %}

    Organizations

    + +
    + Twitch > Organizations +
    [rss] diff --git a/templates/twitch/organization_detail.html b/templates/twitch/organization_detail.html index f460edc..33573d1 100644 --- a/templates/twitch/organization_detail.html +++ b/templates/twitch/organization_detail.html @@ -22,14 +22,20 @@ {% endblock extra_head %} {% block content %}

    {{ organization.name }}

    -

    - Published: + +

    + Dashboard > Organizations > {{ organization.name }} +
    +
    + Published - · Last updated: + title="{{ organization.added_at|date:'DATETIME_FORMAT' }}">{{ organization.added_at|date:"M d, Y H:i" }} ({{ organization.added_at|timesince }} ago) +
    +
    + Last updated -

    + title="{{ organization.updated_at|date:'DATETIME_FORMAT' }}">{{ organization.updated_at|date:"M d, Y H:i" }} ({{ organization.updated_at|timesince }} ago) +

    Games by {{ organization.name }}

    diff --git a/templates/twitch/reward_campaign_detail.html b/templates/twitch/reward_campaign_detail.html index f5c937c..40cb357 100644 --- a/templates/twitch/reward_campaign_detail.html +++ b/templates/twitch/reward_campaign_detail.html @@ -19,150 +19,107 @@ href="{% url 'core:reward_campaign_feed_discord' %}" /> {% endblock extra_head %} {% block content %} - - {% if reward_campaign.brand %} -

    {{ reward_campaign.brand }}: {{ reward_campaign.name }}

    - {% else %} -

    {{ reward_campaign.name }}

    - {% endif %} - -

    - ← Back to Reward Campaigns -

    - - {% if reward_campaign.image_best_url %} - {% picture reward_campaign.image_best_url alt=reward_campaign.name width=160 %} - {% endif %} - - - - {% if reward_campaign.summary %}

    {{ reward_campaign.summary|linebreaksbr }}

    {% endif %} - -
    Status
    -
  • - - - - - - - - - - - - - - {% if reward_campaign.game %} - - - - - {% elif reward_campaign.is_sitewide %} - - - - +
    + +
    + {% if reward_campaign.image_best_url %} + {% picture reward_campaign.image_best_url alt=reward_campaign.name width=160 %} {% endif %} -
    -
    - Status: - - {% if is_active %} - Active - {% elif reward_campaign.starts_at > now %} - Upcoming - {% else %} - Expired - {% endif %} -
    - Starts: - - -
    - Ends: - - -
    - Game: - - {{ reward_campaign.game.display_name }} -
    - Type: - Site-wide reward campaign
    - - {% if reward_campaign.instructions %} -
    Instructions
    -

    {{ reward_campaign.instructions|linebreaksbr }}

    - {% endif %} - - {% if reward_campaign.external_url or reward_campaign.about_url %} -

    - {% if reward_campaign.external_url %} - Claim Reward → - {% endif %} - {% if reward_campaign.about_url %} - Learn More → - {% endif %} -

    - {% endif %} - -
    Campaign Information
    - - + +
    + {% if reward_campaign.brand %} -
    - - - +

    {{ reward_campaign.brand }}: {{ reward_campaign.name }}

    + {% else %} +

    {{ reward_campaign.name }}

    {% endif %} - - - - - - - - - - - - - -
    - Brand: - {{ reward_campaign.brand }}
    - Twitch ID: - - {{ reward_campaign.twitch_id }} -
    - Added to tracker: - - -
    - Last updated: - - -
    + +
    + Game eligibility: + {% if reward_campaign.game %} + {{ reward_campaign.game.display_name }} + {% elif reward_campaign.is_sitewide %} + Site-wide + {% else %} + None + {% endif %} +
    + +
    + Twitch > Reward Campaigns > {{ reward_campaign.name }} +
    + + {% if reward_campaign.summary %}

    {{ reward_campaign.summary|linebreaksbr }}

    {% endif %} + +
    + Status: + {% if is_active %} + Active + {% elif reward_campaign.starts_at > now %} + Upcoming + {% else %} + Expired + {% endif %} +
    +
    Added at {{ reward_campaign.added_at|date:"M d, Y H:i" }} ({{ reward_campaign.added_at|timesince }} ago)
    +
    + Last updated at {{ reward_campaign.updated_at|date:"M d, Y H:i" }} ({{ reward_campaign.updated_at|timesince }} ago) +
    + +
    + {% if reward_campaign.starts_at > now %} + Starts + {% else %} + Started at + {% endif %} + +
    + +
    + {% if reward_campaign.ends_at > now %} + Ends + {% else %} + Ended at + {% endif %} + +
    +
    + {% if reward_campaign.instructions %}{{ reward_campaign.instructions|linebreaksbr }}{% endif %} +
    + +
    + [rss] + [atom] + [discord] + [explain] + {% if reward_campaign.external_url %} + [external] + {% endif %} + {% if reward_campaign.about_url %} + [about] + {% endif %} +
    +
    +
    {% endblock content %} diff --git a/templates/twitch/reward_campaign_list.html b/templates/twitch/reward_campaign_list.html index 1704dd2..377776a 100644 --- a/templates/twitch/reward_campaign_list.html +++ b/templates/twitch/reward_campaign_list.html @@ -18,7 +18,16 @@ href="{% url 'core:reward_campaign_feed_discord' %}" /> {% endblock extra_head %} {% block content %} -

    Reward Campaigns

    +

    List of Twitch Reward Campaigns

    + +
    + Twitch > Reward Campaigns +
    +

    This is an archive of old Twitch reward campaigns because we currently do not scrape them.

    +

    + Feel free to submit a pull request on GitHub + with a working implementation :-). +

    -

    This is an archive of old Twitch reward campaigns because we do not monitor them.

    -

    - Feel free to submit a pull request on GitHub - with a working implementation :-). -

    {% if reward_campaigns %} {% comment %}
    Active Reward Campaigns
    diff --git a/templates/youtube/index.html b/templates/youtube/index.html index cda0134..7e8d5e3 100644 --- a/templates/youtube/index.html +++ b/templates/youtube/index.html @@ -6,9 +6,7 @@

    YouTube channels with rewards.

    - YouTube Help Center has the following channels listed where you can earn rewards: + YouTube Help Center has the following channels listed where you can earn rewards:

    @@ -22,7 +20,7 @@ {% for item in group.channels %} diff --git a/twitch/feeds.py b/twitch/feeds.py index 498db75..dda8a71 100644 --- a/twitch/feeds.py +++ b/twitch/feeds.py @@ -918,11 +918,11 @@ class GameFeed(TTVDropsBaseFeed): # MARK: /rss/campaigns/ class DropCampaignFeed(TTVDropsBaseFeed): - """RSS feed for latest drop campaigns.""" + """RSS feed for latest Twitch drops.""" - title: str = "Twitch Drop Campaigns" + title: str = "Twitch Drops" link: str = "/" - description: str = "Latest Twitch drop campaigns on TTVDrops" + description: str = "Latest Twitch drops" item_guid_is_permalink = True _limit: int | None = None diff --git a/twitch/views.py b/twitch/views.py index 2b492f8..a541e29 100644 --- a/twitch/views.py +++ b/twitch/views.py @@ -457,7 +457,7 @@ def drop_campaign_list_view(request: HttpRequest) -> HttpResponse: # noqa: PLR0 except EmptyPage: campaigns = paginator.page(paginator.num_pages) - title = "Twitch Drop Campaigns" + title = "Twitch Drops" if status_filter: title += f" ({status_filter.capitalize()})" if game_filter: @@ -467,13 +467,13 @@ def drop_campaign_list_view(request: HttpRequest) -> HttpResponse: # noqa: PLR0 except Game.DoesNotExist: pass - description = "Browse Twitch drop campaigns" + description = "Browse Twitch drops" if status_filter == "active": - description = "Browse active Twitch drop campaigns." + description = "Browse active Twitch drops." elif status_filter == "upcoming": - description = "View upcoming Twitch drop campaigns starting soon." + description = "View upcoming Twitch drops starting soon." elif status_filter == "expired": - description = "Browse expired Twitch drop campaigns." + description = "Browse expired Twitch drops." # Build base URL for pagination base_url = "/campaigns/" @@ -965,7 +965,7 @@ class GameDetailView(DetailView): owners: list[Organization] = list(game.owners.all()) game_name: str = game.display_name or game.name or game.twitch_id - game_description: str = f"Twitch drop campaigns for {game_name}." + game_description: str = f"Twitch drops for {game_name}." game_image: str | None = game.box_art_best_url game_image_width: int | None = game.box_art_width if game.box_art_file else None game_image_height: int | None = ( @@ -1129,7 +1129,7 @@ def dashboard(request: HttpRequest) -> HttpResponse: seo_context: dict[str, Any] = _build_seo_context( page_title="Twitch Drops", - page_description="Overview of active Twitch drop campaigns and rewards.", + page_description="Overview of active Twitch drops and rewards.", seo_meta={ "og_type": "website", "schema_data": website_schema, @@ -1186,17 +1186,17 @@ def reward_campaign_list_view(request: HttpRequest) -> HttpResponse: except EmptyPage: reward_campaigns = paginator.page(paginator.num_pages) - title = "Twitch Reward Campaigns" + title = "Twitch Rewards" if status_filter: title += f" ({status_filter.capitalize()})" description = "Twitch rewards." if status_filter == "active": - description = "Browse active Twitch reward campaigns." + description = "Browse active Twitch rewards." elif status_filter == "upcoming": - description = "Browse upcoming Twitch reward campaigns." + description = "Browse upcoming Twitch rewards." elif status_filter == "expired": - description = "Browse expired Twitch reward campaigns." + description = "Browse expired Twitch rewards." # Build base URL for pagination base_url = "/reward-campaigns/"
    - {{ item.channel }} + {{ item.channel }} {{ group.organization }}