computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1016 B
40 lines
1016 B
--- |
|
import type { VideoFileType } from '../lib/video'; |
|
|
|
export interface Props { |
|
video: VideoFileType; |
|
} |
|
|
|
const { video } = Astro.props; |
|
const { frontmatter, id } = video; |
|
--- |
|
|
|
<a |
|
class:list={[ |
|
'block no-underline py-2 group text-md items-center text-gray-600 hover:text-blue-600 flex justify-between border-b', |
|
]} |
|
href={`/videos/${id}`} |
|
> |
|
<span class='group-hover:translate-x-2 transition-transform'> |
|
{frontmatter.title} |
|
|
|
{ |
|
frontmatter.isNew && ( |
|
<span class='bg-green-300 text-green-900 text-xs font-medium px-1.5 py-0.5 rounded-sm uppercase ml-1.5'> |
|
New |
|
<span class='hidden sm:inline'> |
|
· |
|
{new Date(frontmatter.date).toLocaleString('default', { |
|
month: 'long', |
|
})} |
|
</span> |
|
</span> |
|
) |
|
} |
|
</span> |
|
<span class='capitalize text-gray-500 text-xs hidden sm:block'> |
|
{frontmatter.duration} |
|
</span> |
|
|
|
<span class='text-gray-400 text-xs block sm:hidden'> »</span> |
|
</a>
|
|
|