forked from nilbuild/developer-roadmap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuideHeader.astro
More file actions
53 lines (49 loc) · 1.58 KB
/
GuideHeader.astro
File metadata and controls
53 lines (49 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
import type { GuideFileType } from '../lib/guide';
import { replaceVariables } from '../lib/markdown';
export interface Props {
guide: GuideFileType;
}
const { guide } = Astro.props;
const { frontmatter, author } = guide;
return undefined;
---
<div class='border-b bg-white py-5 sm:py-12'>
<div class='container text-left sm:text-center'>
<p
class='hidden items-center justify-start text-gray-400 sm:flex sm:justify-center'
>
{
author?.frontmatter && (
<>
<a
href={`/authors/${author.id}`}
class='inline-flex items-center font-medium hover:text-gray-600 hover:underline'
>
<img
alt={author.frontmatter.name}
src={author.frontmatter.imageUrl}
class='mr-2 inline h-5 w-5 rounded-full'
/>
{author.frontmatter.name}
</a>
<span class='mx-1.5'>·</span>
</>
)
}
<span class='capitalize'>{frontmatter.type} Guide</span>
<span class='mx-1.5'>·</span>
<a
class='text-blue-400 hover:text-blue-500 hover:underline'
href={`https://github.com/kamranahmedse/developer-roadmap/tree/master/src/data/guides/${guide.id}.md`}
target='_blank'>Improve this Guide</a
>
</p>
<h1 class='my-0 text-balance text-2xl font-bold sm:my-3.5 sm:text-5xl'>
{replaceVariables(frontmatter.title)}
</h1>
<p class='hidden text-xl text-gray-400 sm:block'>
{replaceVariables(frontmatter.description)}
</p>
</div>
</div>