summaryrefslogtreecommitdiff
path: root/examples/portfolio/src/pages/projects.astro
blob: 44047117a49317ce50b1bdcc5e7b9ba577134639 (plain) (blame)
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
---
import MainHead from '../components/MainHead.astro';
import Footer from '../components/Footer/index.jsx';
import Nav from '../components/Nav/index.jsx';
import PortfolioPreview from '../components/PortfolioPreview/index.jsx';

interface MarkdownFrontmatter {
  publishDate: number;
}

const projects = Astro.fetchContent<MarkdownFrontmatter>('./project/**/*.md')
  .filter(({ publishDate }) => !!publishDate)
  .sort((a, b) => new Date(b.publishDate).valueOf() - new Date(a.publishDate).valueOf());
---

<html lang="en">
  <head>
    <MainHead title="All Projects | Jeanine White" description="Learn about Jenine White's most recent projects" />
    <style lang="scss">
      .grid {
        display: grid;
        grid-gap: 3rem;
      }
    </style>
  </head>
  <body>
    <Nav />
    <div class="wrapper">
      <h1 class="title mt4 mb4">All Projects</h1>
      <div class="grid">
        {projects.map((project) => (
          <PortfolioPreview project={project} />
        ))}
      </div>
    </div>
    <Footer />
  </body>
</html>