1
0

improve: the layout of video cards in the home page

This commit is contained in:
alikia2x (寒寒) 2025-12-26 18:20:30 +08:00
parent ac86ab6f75
commit 503dffd404
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 56209E0CCD8420C6
2 changed files with 29 additions and 24 deletions

View File

@ -86,34 +86,39 @@ export const MilestoneVideoCard = ({
<div className="flex gap-4">
<p>: {remainingViews.toLocaleString()}</p>
<p>: {Math.round(video.eta.speed)}/</p>
</div>
<div>
<p>: {addHoursToNow(video.eta.eta)}{formatHours(video.eta.eta)}</p>
<p>
: {addHoursToNow(video.eta.eta)}{formatHours(video.eta.eta)}
</p>
</div>
</div>
<div className="max-sm:grid-rows-2 max-sm:grid flex gap-1 sm:gap-4 text-xs text-muted-foreground">
{video.bilibili_metadata.publishedAt && (
<span className="stat-num">
: {formatDateTime(new Date(video.bilibili_metadata.publishedAt))}
</span>
)}
<span> {timeAgo(new Date(video.eta.updatedAt))}</span>
<a
href={`https://www.bilibili.com/video/av${video.bilibili_metadata.aid}`}
target="_blank"
rel="noopener noreferrer"
className="text-pink-400 text-xs hover:underline"
>
</a>
<a
href={`/song/av${video.bilibili_metadata.aid}/info`}
className="text-xs text-secondary-foreground hover:underline"
>
</a>
<div className="max-sm:grid-rows-2 max-sm:grid flex gap-1 sm:justify-between text-xs text-muted-foreground">
<div className="flex max-sm:justify-between gap-2 w-full">
{video.bilibili_metadata.publishedAt && (
<span className="stat-num">
: {formatDateTime(new Date(video.bilibili_metadata.publishedAt))}
</span>
)}
<span> {timeAgo(new Date(video.eta.updatedAt))}</span>
</div>
<div className="flex gap-4">
<a
href={`https://www.bilibili.com/video/av${video.bilibili_metadata.aid}`}
target="_blank"
rel="noopener noreferrer"
className="text-pink-400 max-sm:text-sm hover:underline whitespace-nowrap"
>
</a>
<a
href={`/song/av${video.bilibili_metadata.aid}/info`}
className="max-sm:text-sm text-secondary-foreground hover:underline whitespace-nowrap"
>
</a>
</div>
</div>
</Card>
);

View File

@ -19,7 +19,7 @@
},
"test": {},
"deploy": {
"cache": false,
"cache": true,
"dependsOn": ["temp_frontend#build"]
},
"build": {}