diff --git a/odyseescraper/views.py b/odyseescraper/views.py index fc365d9..6b37176 100644 --- a/odyseescraper/views.py +++ b/odyseescraper/views.py @@ -5,8 +5,10 @@ from odyseescraper.models import OdyseeChannel, OdyseeRelease class OdyseeReleaseListView(ListView): model = OdyseeRelease + paginate_by = 3 * 5 template_name = 'release_list.html' class OdyseeChannelListView(ListView): model = OdyseeChannel + paginate_by = 10 template_name = 'channel_list.html' diff --git a/static/styles.css b/static/styles.css index d6cdc36..a5199c2 100644 --- a/static/styles.css +++ b/static/styles.css @@ -55,6 +55,25 @@ a:hover { margin: 0; } +/* Footer stuff */ +#footer { + margin: 1em; + padding: 1em; + color: var(--foreground-dim); + font-size: 80%; + text-align: center; +} + +/* Paginator stuff */ +#paginator { + margin: 1em 0; + padding: 1em; + text-align: center; + background: var(--background-bright); + color: var(--foreground-dim); + border-radius: 8px; +} + /* Card and card container layout */ div.cardcontainer { display: grid; diff --git a/templates/base.html b/templates/base.html index a5a5cfc..c15c313 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,6 +15,26 @@
{% block content %} {% endblock %} + {% if page_obj %} +
+ {% if page_obj.has_previous %} + first| + previous + {% endif %} + {{ page_obj.number }}/{{ page_obj.paginator.num_pages }} + {% if page_obj.has_next %} + next| + last + {% endif %} +
+ {% endif %} +