diff options
author | 2021-07-21 07:11:57 -0700 | |
---|---|---|
committer | 2021-07-21 07:11:57 -0700 | |
commit | f67e8f5f559ecb37db71fbea1b60b570bc6bfd47 (patch) | |
tree | 21678a7af13c256bf8c7fa8b539cbf7c3765ea38 /examples/portfolio/src/pages/projects.astro | |
parent | 5fcd466d95f9694a758239d254e3d81f4ed289fa (diff) | |
download | astro-f67e8f5f559ecb37db71fbea1b60b570bc6bfd47.tar.gz astro-f67e8f5f559ecb37db71fbea1b60b570bc6bfd47.tar.zst astro-f67e8f5f559ecb37db71fbea1b60b570bc6bfd47.zip |
New Collections API (#703)
* updated createCollection API
* Update examples/portfolio/src/pages/projects.astro
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
* Update docs/reference/api-reference.md
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
* fix(docs): collection doc typos (#758)
* keep cleaning up docs and adding tests
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
Co-authored-by: Mark Pinero <markspinero@gmail.com>
Diffstat (limited to 'examples/portfolio/src/pages/projects.astro')
-rw-r--r-- | examples/portfolio/src/pages/projects.astro | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/portfolio/src/pages/projects.astro b/examples/portfolio/src/pages/projects.astro new file mode 100644 index 000000000..6da3b423f --- /dev/null +++ b/examples/portfolio/src/pages/projects.astro @@ -0,0 +1,34 @@ +--- +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'; + +const projects = Astro.fetchContent('./project/*.md') + .filter(({ published_at }) => !!published_at) + .sort((a, b) => new Date(b.published_at) - new Date(a.published_at)); +--- + +<html lang="en"> + <head> + <MainHead title="All Projects | Jeanine White" /> + <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> |