From f96b059314a6f135142b3e2305591f44240eb9d9 Mon Sep 17 00:00:00 2001 From: Sascha Trifunovic Date: Fri, 21 Jun 2024 21:38:41 +0200 Subject: [PATCH 1/2] Update content, add benefits and apps --- ...eaturesSummary.astro => FeatureGrid.astro} | 9 +- src/components/Header.astro | 12 +- src/content/apps/chat.md | 19 +++ src/content/docs/docs/guides/javascript.md | 5 + src/content/docs/docs/guides/vanilla.md | 5 - src/content/docs/docs/guides/vue.md | 4 +- src/content/features/permissions.md | 6 +- .../features/privacy-and-data-protection.md | 2 +- src/content/features/social.md | 36 +++++ src/content/features/subscriptions.md | 23 ++++ src/content/features/truly-backendless.md | 2 +- src/pages/apps.astro | 12 ++ src/pages/apps/[slug].astro | 21 +++ src/pages/benefits.astro | 127 ++++++++++++++++++ src/pages/features.astro | 4 +- src/pages/index.astro | 4 +- 16 files changed, 268 insertions(+), 23 deletions(-) rename src/components/{FeaturesSummary.astro => FeatureGrid.astro} (81%) create mode 100644 src/content/apps/chat.md create mode 100644 src/content/docs/docs/guides/javascript.md delete mode 100644 src/content/docs/docs/guides/vanilla.md create mode 100644 src/content/features/social.md create mode 100644 src/content/features/subscriptions.md create mode 100644 src/pages/apps.astro create mode 100644 src/pages/apps/[slug].astro create mode 100644 src/pages/benefits.astro diff --git a/src/components/FeaturesSummary.astro b/src/components/FeatureGrid.astro similarity index 81% rename from src/components/FeaturesSummary.astro rename to src/components/FeatureGrid.astro index 25ae01b..01ba197 100644 --- a/src/components/FeaturesSummary.astro +++ b/src/components/FeatureGrid.astro @@ -2,15 +2,20 @@ import { getCollection } from "astro:content"; import LogoOutlineSVG from "./LogoOutlineSVG.astro"; -const allFeatures = await getCollection("features"); + +let { collection, limit } = Astro.props; +const allFeatures = await getCollection(collection); const orderedFeatures = allFeatures.sort((a, b) => a.data.order < b.data.order ? -1 : 1, ); +if(!limit) { + limit = orderedFeatures.length +} ---
{ - orderedFeatures.map((f) => ( + orderedFeatures.map((f, i) => ( i < limit &&
diff --git a/src/components/Header.astro b/src/components/Header.astro index e1364ba..7cbf666 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -6,7 +6,7 @@ import FeaturesLinkItems from "./FeaturesLinkItems.astro";