fix(#3): add last commit time to card

This commit is contained in:
Daylin Morgan 2024-11-18 09:14:20 -06:00
parent 520b3b0461
commit f8b3c959bd
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -42,7 +42,11 @@ proc card*(pkg: NimPackage): VNode =
h2(class = (textStyle & "font-black md:text-2xl text-lg font-casual").kstring): h2(class = (textStyle & "font-black md:text-2xl text-lg font-casual").kstring):
text pkg.name text pkg.name
if not pkg.isAlias: if not pkg.isAlias:
pkg.projectUrl tdiv(class="flex flex-col md:items-end items-start"):
pkg.projectUrl
if not pkg.deleted:
span(class="md:text-sm text-xs text-nowrap text-ctp-subtextzero"):
text "last commit: " & pkg.lastCommitTime.format("MMM d, YYYY")
if pkg.isAlias: if pkg.isAlias:
tdiv: tdiv:
text "alias for: " text "alias for: "
@ -50,14 +54,13 @@ proc card*(pkg: NimPackage): VNode =
class = "link"): class = "link"):
text pkg.alias text pkg.alias
else: else:
span(class = "md:text-xl my-2"): text pkg.description span(class = "md:text-xl my-2 "): text pkg.description
tdiv(class = "flex flex-col text-xs md:text-lg overflow-x-auto"): tdiv(class = "flex flex-wrap text-xs md:text-md overflow-x-auto"):
tdiv(class = "flex flex-wrap"): for t in pkg.tags:
for t in pkg.tags: tdiv(
tdiv( onClick = setSearchUrl("tag:" & t.replace(" ", "-")),
onClick = setSearchUrl("tag:" & t.replace(" ", "-")), class = "link"):
class = "link"): t.renderTag
t.renderTag
proc recentAddedPackagesList*(): VNode = proc recentAddedPackagesList*(): VNode =
let pkgs = recentPackagesList() let pkgs = recentPackagesList()