diff --git a/eleventy.config.js b/eleventy.config.js index 88fd4bf2..59bbe0d1 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -24,7 +24,7 @@ module.exports = function (eleventyConfig) { eleventyConfig.addCollection("posts", collections.posts); eleventyConfig.addCollection("feed", collections.feed); eleventyConfig.addCollection("latest", collections.latest); - eleventyConfig.addCollection("spot", collections.spot); + eleventyConfig.addCollection("featured", collections.featured); // Filters eleventyConfig.addFilter("dateToDMY", filters.dateToDMY); diff --git a/src/_11ty/collections.js b/src/_11ty/collections.js index d9254904..7ce736fd 100644 --- a/src/_11ty/collections.js +++ b/src/_11ty/collections.js @@ -1,12 +1,12 @@ // Collection for posts const posts = i => i.getFilteredByGlob("./src/content/posts/*.md").reverse(); const latest = i => i.getFilteredByGlob("./src/content/posts/*.md").reverse().slice(0, 3); -const spot = i => i.getFilteredByGlob("./src/content/posts/*.md").reverse().slice(0, 1); +const featured = i => i.getFilteredByGlob("./src/content/posts/*.md").reverse().slice(0, 1); const feed = i => i.getFilteredByGlob("./src/content/posts/*.md").reverse(); module.exports = { posts, feed, latest, - spot, + featured, }; diff --git a/src/_includes/layouts/index.njk b/src/_includes/layouts/index.njk index 6b478c8f..8b6b0ff5 100644 --- a/src/_includes/layouts/index.njk +++ b/src/_includes/layouts/index.njk @@ -13,7 +13,15 @@

Latest recipes

diff --git a/src/_includes/layouts/list.njk b/src/_includes/layouts/list.njk index a36cddac..d2b4c0d8 100644 --- a/src/_includes/layouts/list.njk +++ b/src/_includes/layouts/list.njk @@ -5,8 +5,13 @@

{{ title }}

diff --git a/src/_styles/base/sections.css b/src/_styles/base/sections.css index f66f5317..f1547bfe 100644 --- a/src/_styles/base/sections.css +++ b/src/_styles/base/sections.css @@ -23,6 +23,7 @@ h1 { h2 { @extend %heading-2; + margin-bottom: 0.25em; } h3 { diff --git a/src/_styles/components/recipe-list.css b/src/_styles/components/recipe-list.css index 6a02b4b2..4784457f 100644 --- a/src/_styles/components/recipe-list.css +++ b/src/_styles/components/recipe-list.css @@ -21,12 +21,21 @@ ul.recipe-ul { ul.recipe-ul { grid-template-columns: 1fr 1fr; } + aside ul.recipe-ul { + grid-template-columns: 1fr 1fr; + } } @media only screen and (min-width: 960px) { ul.recipe-ul { grid-template-columns: 1fr 1fr 1fr 1fr; } + aside ul.recipe-ul { + grid-template-columns: 1fr 1fr 1fr; + } +} + +@media only screen and (min-width: 1100px) { aside ul.recipe-ul { grid-template-columns: 1fr; } diff --git a/src/_styles/layout/content.css b/src/_styles/layout/content.css index 04c758fb..1dc85484 100644 --- a/src/_styles/layout/content.css +++ b/src/_styles/layout/content.css @@ -30,5 +30,4 @@ padding: var(--space-l); border-radius: var(--border-radius-small); background-color: var(--color-surface-secondary); - max-width: var(--measure-default); } diff --git a/src/content/index.md b/src/content/index.md index 1b370482..e0e0019a 100644 --- a/src/content/index.md +++ b/src/content/index.md @@ -1,11 +1,20 @@ --- layout: "layouts/index" permalink: "/index.html" +eleventyImport: + collections: ["featured"] --- Welcome to our AI-Generated Vegan Recipe Page, a unique culinary destination where the fusion of technology and diverse global flavors brings you an exclusive range of vegan recipes. We are thrilled to introduce you to our four AI-created chef personas, each representing a different corner of the world, infusing their unique cultural touch into vegan cooking. +## Newest Recipe +{% set latestRecipe = collections.featured[0].data %} + +{% figure %} + {% picture latestRecipe.figureRecipe.imageSrc, latestRecipe.figureRecipe.imageTitle, latestRecipe.figureRecipe.imageAlt, latestRecipe.figureRecipe.loading %} +{% endfigure %} + ## Meet Our Chefs