attach popularity and last_modified data into package thumbnail html

This commit is contained in:
neil 2022-10-21 14:07:15 +08:00
parent 65d2c350da
commit fd8b02e8fa
2 changed files with 37 additions and 13 deletions

View file

@ -7,7 +7,9 @@
"version": "2.5.1",
"installs": 3986221,
"maintainer": "",
"thumb_image_url": "/Images/package-thumb-nolabel.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel.jpg",
"dl_count": 1,
"last_modified": "2022-09-26T19:46:25.000Z"
},
{
"name": "svg2png",
@ -17,7 +19,9 @@
"version": "0.1.3",
"installs": 1233,
"maintainer": "pascal",
"thumb_image_url": "/Images/package-thumb-nolabel4.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel4.jpg",
"dl_count": 2,
"last_modified": "2022-09-30T15:39:15.000Z"
},
{
"name": "cmake",
@ -27,7 +31,9 @@
"version": "3.24.2",
"installs": 1729267,
"maintainer": "pascal",
"thumb_image_url": "/Images/package-thumb-nolabel3.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel3.jpg",
"dl_count": 3,
"last_modified": "2022-09-27:39:15.000Z"
},
{
"name": "h2c",
@ -37,7 +43,9 @@
"version": "1.0",
"installs": 96,
"maintainer": "h2o",
"thumb_image_url": "/Images/package-thumb-nolabel.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel.jpg",
"dl_count": 4,
"last_modified": "2022-09-25:39:15.000Z"
},
{
"name": "libmagic",
@ -47,7 +55,9 @@
"version": "5.43",
"installs": 162436,
"maintainer": "",
"thumb_image_url": "/Images/package-thumb-nolabel3.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel3.jpg",
"dl_count": 5,
"last_modified": "2022-09-24:39:15.000Z"
},
{
"name": "deno",
@ -57,7 +67,9 @@
"version": "1.26.1",
"installs": 204033,
"maintainer": "Ryan Dahl",
"thumb_image_url": "/Images/package-thumb-nolabel2.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel2.jpg",
"dl_count": 6,
"last_modified": "2022-09-23:39:15.000Z"
},
{
"name": "fontconfig",
@ -67,7 +79,9 @@
"version": "2.14.0",
"installs": 2485083,
"maintainer": "Max Miedinger",
"thumb_image_url": "/Images/package-thumb-nolabel.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel.jpg",
"dl_count": 7,
"last_modified": "2022-09-22:39:15.000Z"
},
{
"name": "pkg-config",
@ -77,7 +91,9 @@
"version": "0.29.2",
"installs": 2634164,
"maintainer": "pascal",
"thumb_image_url": "/Images/package-thumb-nolabel4.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel4.jpg",
"dl_count": 8,
"last_modified": "2022-09-21:39:15.000Z"
},
{
"name": "shared-mime-info",
@ -87,7 +103,9 @@
"version": "2.2",
"installs": 642619,
"maintainer": "Mr.Mime",
"thumb_image_url": "/Images/package-thumb-nolabel3.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel3.jpg",
"dl_count": 9,
"last_modified": "2022-09-21:39:15.000Z"
},
{
"name": "ttfautohint",
@ -97,7 +115,9 @@
"version": "1.8.4",
"installs": 4696,
"maintainer": "pascal",
"thumb_image_url": "/Images/package-thumb-nolabel.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel.jpg",
"dl_count": 10,
"last_modified": "2022-09-20:39:15.000Z"
},
{
"name": "numactl",
@ -107,7 +127,9 @@
"version": "2.0.16",
"installs": 1120,
"maintainer": "FSS",
"thumb_image_url": "/Images/package-thumb-nolabel2.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel2.jpg",
"dl_count": 11,
"last_modified": "2022-09-19:39:15.000Z"
},
{
"name": "flex",
@ -117,6 +139,8 @@
"version": "2.6.4",
"installs": 35001,
"maintainer": "",
"thumb_image_url": "/Images/package-thumb-nolabel4.jpg"
"thumb_image_url": "/Images/package-thumb-nolabel4.jpg",
"dl_count": 12,
"last_modified": "2022-09-18:39:15.000Z"
}
]

View file

@ -1,4 +1,4 @@
<div class="card card-thumbnail" style="width: 100%">
<div class="card card-thumbnail" style="width: 100%" popularity="{{- .dl_count -}}" last_modified="{{- .last_modified -}}">
<figure class="card-img-top" >
<img class="package-image" src="{{- .thumb_image_url -}}" alt="{{- .name -}}" style="width:100%; height:100%;">
<article class="card-thumb-label">