Add paginator and footer
This commit is contained in:
parent
f1890cd1b0
commit
aae9586127
@ -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'
|
||||
|
@ -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;
|
||||
|
@ -15,6 +15,26 @@
|
||||
<div id="content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% if page_obj %}
|
||||
<div id="paginator">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="?page=1">first</a>|
|
||||
<a href="?page={{ page_obj.previous_page_number }}">previous</a>
|
||||
{% endif %}
|
||||
{{ page_obj.number }}/{{ page_obj.paginator.num_pages }}
|
||||
{% if page_obj.has_next %}
|
||||
<a href="?page={{ page_obj.next_page_number }}">next</a>|
|
||||
<a href="?page={{ page_obj.paginator.num_pages }}">last</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="footer">
|
||||
{% block footer %}
|
||||
<p>All content on this page is provided as-is. No warranties are provided, express or implied, including warranties of accuracy, merchantability, and fitness for a particular purpose. A majority of content displayed here is proxied/cached from other websites -- names, descriptions, and depictions of items are (c) copyright their original holders as linked in each entry.</p>
|
||||
<p>No original content on this page is to be used or offerred commercially for any reason, including tags, categorization, and services such as indexing and searching.</p>
|
||||
<p>DEFCAD can choke on my entire cock. No DEFCAD-exclusive content is contained on this website.</p>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user