@@ -6,7 +6,7 @@ import { components } from '@/components/mdx/index.astro';
66import { iconMap } from ' @/consts' ;
77import { Icon } from ' astro-icon/components' ;
88
9- // This is a dynamic route that generates a page for every Markdown file in src/content/
9+ // This is a dynamic route that generates a page for every Markdown file in src/content/work/
1010// Read more about dynamic routes and this `getStaticPaths` function in the Astro docs:
1111// https://docs.astro.build/en/core-concepts/routing/#dynamic-routes
1212export async function getStaticPaths() {
@@ -27,24 +27,27 @@ const { Content } = await render(entry);
2727<BaseLayout {... entry .data }>
2828 <div class =" grid-cols-12 lg:grid" >
2929 <div class =" col-span-3" >
30- <h1 class =" mb-1 text-4xl font-medium dark:text-white" >{ title } </h1 >
31- <p class =" opacity-50" >
32- <FormattedDate date ={ pubDate } />
33- </p >
34- { description && <p class = " mb-12" >{ description } </p >}
35- <div class =" mb-1 text-lg dark:text-white" >Tools used</div >
36- <ul class =" mb-6 flex list-none flex-wrap gap-2" >
37- {
38- tags .map ((tag ) => (
39- <li >
40- <span class = " inline-block rounded-md px-2 py-1 text-xs font-medium dark:bg-gray-500 dark:text-white" >
41- { iconMap [tag ] && <Icon name = { iconMap [tag ]} size = { 16 } class = " me-1" />} { tag }
42- </span >
43- </li >
44- ))
45- }
46- </ul >
30+ <div class =" sticky top-12" >
31+ <h1 class =" mb-1 text-4xl font-medium dark:text-white" >{ title } </h1 >
32+ <p class =" opacity-50" >
33+ <FormattedDate date ={ pubDate } />
34+ </p >
35+ { description && <p class = " mb-12" >{ description } </p >}
36+ <div class =" mb-1 text-lg dark:text-white" >Tools used</div >
37+ <ul class =" mb-6 flex list-none flex-wrap gap-2" >
38+ {
39+ tags .map ((tag ) => (
40+ <li >
41+ <span class = " inline-block rounded-md px-2 py-1 text-xs font-medium dark:bg-gray-500 dark:text-white" >
42+ { iconMap [tag ] && <Icon name = { iconMap [tag ]} size = { 16 } class = " me-1" />} { tag }
43+ </span >
44+ </li >
45+ ))
46+ }
47+ </ul >
48+ </div >
4749 </div >
50+
4851 <div class =" col-span-8 col-start-5" >
4952 <Content components ={ components } />
5053 </div >
0 commit comments