@@ -9,32 +9,38 @@ let allPosts = await Astro.glob('../../data/work/*.{md,mdx}');
99allPosts = allPosts .sort ((a , b ) => new Date (b .frontmatter .publishDate ).valueOf () - new Date (a .frontmatter .publishDate ).valueOf ());
1010---
1111
12- <BaseLayout title ={ title } description ={ description } permalink ={ permalink } current =" blog" >
12+ <BaseLayout title ={ title } description ={ description } permalink ={ permalink } current =" work" >
13+ <div class =" row row-cols-1 row-cols-md-3 g-4" >
14+
15+
16+ </div >
17+
1318 <div >
14- <h1 >{ title } </h1 >
15- <div class =" flex-container" >
19+ <div class =" row row-cols-1 row-cols-md-2 g-4" >
1620 { allPosts .map ((post , index ) => {
1721 const href = (post .frontmatter .direct_link && post .frontmatter .direct_link !== ' ' ) ? post .frontmatter .direct_link : ` /work/${post .file .split (' /' ).pop ().split (' .' ).shift ()} ` ;
1822 const target = (post .frontmatter .direct_link && post .frontmatter .direct_link !== ' ' ) ? ' _blank' : ' _self' ;
1923 const tags = post .frontmatter .tags .split (' , ' );
2024 const thumbnail = ` /assets/work/${post .frontmatter .thumbnail } ` ;
25+
2126 return (
22- <article >
23- <div class = " post-item" >
24- <h2 ><a href = { href } target = { target } >{ post .frontmatter .title } </a ></h2 >
25- <p >{ post .frontmatter .description } </p >
26- <br />
27- <a href = { href } target = { target } >
28- <div class = " thumbnail" ></div >
29- </a >
30- <ul class = " tags" >
31- { tags .map (t => ( <li class = " tag" >{ t } </li > ) )}
32- </ul >
33- { /* <div class="post-item-footer">
34- <span class="post-item-date">— {post.frontmatter.publishDate}</span>
35- </div> */ }
27+ <div class = " col" >
28+ <div class = " card" >
29+ <div class = " overflow-hidden thumbnail border-none" >
30+ <img src = { thumbnail } class = " card-img-top object-fit-cover" alt = { post .frontmatter .description } >
31+ </div >
32+ <div class = " card-body" >
33+ <h5 class = " card-title" >{ post .frontmatter .title } </h5 >
34+ <p class = " card-text" >{ post .frontmatter .description } </p >
35+ <a href = { href } target = { target } class = " btn btn-primary stretched-link" >Read more</a >
36+ </div >
37+ <div class = " card-footer" >
38+ <small class = " text-body-secondary" >
39+ { tags .map (t => ( <span class = " badge rounded-pill text-bg-light" >{ t } </span > ) )}
40+ </small >
41+ </div >
3642 </div >
37- </article >
43+ </div >
3844 )
3945 })}
4046 </div >
@@ -45,7 +51,6 @@ allPosts = allPosts.sort((a, b) => new Date(b.frontmatter.publishDate).valueOf()
4551
4652 h2,
4753 .post-item-footer {
48- font-family: var(--font-family-mono);
4954 font - weight : 700 ;
5055 }
5156
0 commit comments