File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424.card-product {
2525 border-radius : 5px ;
2626 overflow : hidden;
27- /* height: 80px; */
2827 background : white;
29- /* box-shadow: 0 0 15px rgba(0,0,0,0.2); */
3028 display : flex;
3129 align-items : center;
3230}
3533 font-size : 16px ;
3634 font-weight : bold;
3735 margin : 0 ;
36+ margin-bottom : 5px ;
3837}
3938
4039.card-product .card-product-infos {
4140 padding : 16px ;
41+ display : flex;
42+ flex-direction : row;
43+ justify-content : space-between;
44+ width : 100% ;
45+ gap : 8px ;
46+ flex-wrap : wrap;
4247}
4348
4449.card-product : hover {
4550 background-color : # f4f4f4 ;
4651}
47-
52+
53+ .keyword {
54+ border-radius : 2px ;
55+ font-size : 14px ;
56+ background-color : # f4f4f4 ;
57+ padding : 2px 4px ;
58+ }
Original file line number Diff line number Diff line change @@ -35,56 +35,6 @@ a:hover {
3535 padding : 2px 4px ;
3636}
3737
38- /* .card-category {
39- flex-direction: column;
40- display: flex;
41- justify-content: center;
42- align-items: center;
43- font-size: 18px;
44- border-radius: 5px;
45- }
46-
47- .card-category i {
48- font-size: 36px;
49- padding-top: 20px;
50- }
51-
52- .cards {
53- display: grid;
54- grid-template-columns: 1fr 1fr;
55- grid-gap: 16px;
56- }
57-
58- @media (min-width: 100px) and (max-width: 575px) {
59- .cards {
60- grid-template-columns: 1fr;
61- }
62- }
63-
64- @media (min-width: 576px) {
65- .cards {
66- grid-template-columns: 1fr;
67- }
68- }
69-
70- @media (min-width: 768px) {
71- .cards {
72- grid-template-columns: 1fr 1fr;
73- }
74- }
75-
76- @media (min-width: 992px) {
77- .cards {
78- grid-template-columns: 1fr 1fr;
79- }
80- }
81-
82- @media (min-width: 1200px) {
83- .cards {
84- grid-template-columns: 1fr 1fr;
85- }
86- } */
87-
8838table {
8939 width : 100% ; /* Make the table span the full width of its container */
9040 border-collapse : collapse; /* Remove gaps between table cells */
Original file line number Diff line number Diff line change 1212< body >
1313 < div class ="container ">
1414 < h1 > Available algorithms</ h1 >
15- {% for algorithm in algorithms %}
15+ {% for algorithm, algo_info in algorithms_and_infos %}
1616 < a href ="/{{ algorithm }}/info ">
1717 < div class ="card-product ">
1818 < div class ="card-product-infos ">
1919 < h2 > {{ algorithm }}</ h2 >
20+ < div >
21+ {% for tag in algo_info.tags %}
22+ < span class ="keyword "> {{ tag }}</ span >
23+ {% endfor %}
24+ </ div >
2025 </ div >
2126 </ div >
2227 </ a >
Original file line number Diff line number Diff line change @@ -88,11 +88,15 @@ def _register_routes(self):
8888 )
8989 async def home (request : Request ):
9090 if len (self .algorithms ) > 1 :
91+ algo_infos = []
92+ for algo in self .algorithms :
93+ algo_infos .append (self .algorithms_dict [algo ].algo_info )
94+
9195 return templates .TemplateResponse (
9296 request = request ,
9397 name = "index.html" ,
9498 context = {
95- "algorithms " : self .algorithms ,
99+ "algorithms_and_infos " : zip ( self .algorithms , algo_infos ) ,
96100 },
97101 )
98102 elif len (self .algorithms ) == 1 :
You can’t perform that action at this time.
0 commit comments