44All Packages
55{% endblock %}
66
7+ {% block extra-head %}
8+ < style >
9+ /* Remove the border below the table header */
10+ thead th {
11+ border-bottom : none !important ;
12+ }
13+
14+ tbody tr : hover {
15+ background-color : # e0e0e0 !important ;
16+ cursor : pointer;
17+ }
18+
19+ tbody tr : nth-child (even): hover {
20+ background-color : # d3d3d3 !important ;
21+ }
22+ </ style >
23+ {% endblock %}
24+
725{% block content %}
826< div class ="columns ">
927 < div class ="column ">
1028 </ div >
1129
1230 < div class ="column is-two-thirds ">
1331 < div class ="content is-normal ">
14- < h1 > Package List </ h1 >
32+ < h1 > Discover Packages </ h1 >
1533 < hr />
1634 </ div >
17- < form method ="get " class ="has-text-centered box " action ="">
18- {{ form }}
19- < button type ="submit " class ="button is-link is-rounded "> Search</ button >
20- </ form >
21- {% for package in package_list %}
22- < article class ="media box mt-4 ">
23- < div class ="media-left has-text-centered ">
24- < h4 > Number of Followers</ h4 >
25- < p > {{ package.followers_count }}</ p >
26- </ div >
27- < div class ="media-content ">
28- < div class ="content " style ="border-left: 4px solid black; ">
29- < h4 class ="ml-3 mr-3 "> < a href ="{% url 'purl-profile' package.purl %} "> {{ package.purl }} </ a > </ h4 >
30- < small class ="ml-2 "> Created by @{{ package.service.user.username }}</ small >
31- < br >
35+ < form method ="get " class ="box px-6 mx-0 " action ="">
36+ < div class ="field has-addons ">
37+ < div class ="control is-expanded ">
38+ {{ form.search }}
39+ </ div >
40+ < div class ="control ">
41+ < button type ="submit " class ="button is-info "> Search</ button >
3242 </ div >
3343 </ div >
34- </ article >
35- {% endfor %}
44+ </ form >
45+ < div class ="box ">
46+ < table class ="table is-striped is-hoverable is-fullwidth ">
47+ < thead >
48+ < tr >
49+ < th colspan ="3 ">
50+ < div class ="box is-small ">
51+ < div class ="columns ">
52+ < div class ="column is-three-fifths "> Package URL</ div >
53+ < div class ="column is-one-fifth "> Activity</ div >
54+ < div class ="column is-one-fifth "> Followers</ div >
55+ </ div >
56+ </ div >
57+ </ th >
58+ </ tr >
59+ </ thead >
60+ < tbody >
61+ {% for package in package_list %}
62+ < tr >
63+ < td colspan ="3 ">
64+ < a href ="{% url 'purl-profile' package.purl %} " class ="has-text-info ">
65+ < div class ="columns px-5 ">
66+ < div class ="column is-three-fifths "> {{ package.purl }}</ div >
67+ < div class ="column is-one-fifth "> {{ package.notes_count }}</ div >
68+ < div class ="column is-one-fifth "> {{ package.followers_count }}</ div >
69+ </ div >
70+ </ a >
71+ </ td >
72+ </ tr >
73+ {% empty %}
74+ < tr >
75+ < td colspan ="3 " class ="has-text-centered "> No packages found.</ td >
76+ </ tr >
77+ {% endfor %}
78+ </ tbody >
79+ </ table >
80+ </ div >
3681 {% if is_paginated %}
37- < nav class ="pagination is-centered " role ="navigation " aria-label ="pagination ">
82+ < nav class ="pagination is-centered px-5 " role ="navigation " aria-label ="pagination ">
3883 {% if page_obj.has_previous %}
3984 < a class ="pagination-previous " href ="?page={{ page_obj.previous_page_number }} "> Previous</ a >
4085 {% endif %}
@@ -51,7 +96,6 @@ <h4 class="ml-3 mr-3"><a href="{% url 'purl-profile' package.purl %}"> {{ packag
5196 </ nav >
5297 {% endif %}
5398 </ div >
54-
5599 < div class ="column "> </ div >
56100</ div >
57101{% endblock %}
0 commit comments