|
1 | 1 | --- |
2 | 2 | import type { VideoFileType } from '../lib/video'; |
3 | | -import YouTubeAlert from "./YouTubeAlert.astro"; |
| 3 | +import YouTubeAlert from './YouTubeAlert.astro'; |
4 | 4 |
|
5 | 5 | export interface Props { |
6 | 6 | video: VideoFileType; |
7 | 7 | } |
8 | 8 |
|
9 | 9 | const { video } = Astro.props; |
10 | | -const { frontmatter } = video; |
11 | | -const { author } = frontmatter; |
| 10 | +const { frontmatter, author } = video; |
12 | 11 | --- |
13 | 12 |
|
14 | | -<div class='bg-white border-b py-5 sm:py-12'> |
| 13 | +<div class='border-b bg-white py-5 sm:py-12'> |
15 | 14 | <div class='container text-left sm:text-center'> |
16 | 15 | <p |
17 | | - class='text-gray-400 hidden sm:flex items-center justify-start sm:justify-center' |
| 16 | + class='hidden items-center justify-start text-gray-400 sm:flex sm:justify-center' |
18 | 17 | > |
19 | 18 | <a |
20 | | - href={author.url} |
21 | | - target='_blank' |
22 | | - class='font-medium hover:text-gray-600 inline-flex items-center hover:underline' |
| 19 | + href={`/authors/${author.id}`} |
| 20 | + class='inline-flex items-center font-medium hover:text-gray-600 hover:underline' |
23 | 21 | > |
24 | 22 | <img |
25 | | - alt={author.name} |
26 | | - src={author.imageUrl} |
27 | | - class='w-5 h-5 inline mr-2 rounded-full' |
| 23 | + alt={author.frontmatter.name} |
| 24 | + src={author.frontmatter.imageUrl} |
| 25 | + class='mr-2 inline h-5 w-5 rounded-full' |
28 | 26 | /> |
29 | | - {author.name} |
| 27 | + {author.frontmatter.name} |
30 | 28 | </a> |
31 | 29 | <span class='mx-1.5'>·</span> |
32 | 30 | <span class='capitalize'>Illustrated Video</span> |
33 | 31 | </p> |
34 | | - <h1 class='text-2xl sm:text-5xl my-0 sm:my-3.5 font-bold'> |
| 32 | + <h1 class='my-0 text-2xl font-bold sm:my-3.5 sm:text-5xl'> |
35 | 33 | {frontmatter.title} |
36 | 34 | </h1> |
37 | | - <p class='hidden sm:block text-gray-400 text-md'> |
| 35 | + <p class='text-md hidden text-gray-400 sm:block'> |
38 | 36 | {frontmatter.description} |
39 | 37 | </p> |
40 | 38 | </div> |
|
0 commit comments