From ac64ca4241fc5e9ce912c1d09bddcfd10d585926 Mon Sep 17 00:00:00 2001
From: FloatingGhost
Date: Fri, 2 Dec 2022 12:38:48 +0000
Subject: [PATCH] Add easier way to maintain instance recommendations
---
README.md | 10 ++++++++++
src/RECOMMENDED_INSTANCES.json | 22 ++++++++++++++++++++++
src/components/CallToAction.jsx | 23 ++++++++---------------
3 files changed, 40 insertions(+), 15 deletions(-)
create mode 100644 src/RECOMMENDED_INSTANCES.json
diff --git a/README.md b/README.md
index e69de29..2a65168 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,10 @@
+# Akkoma.social
+
+A non-technical landing page
+
+## Adding instances to the list of "recommended instances"
+
+To add an instance to the list of "recommended instances", add an
+entry to the `instances` array in `src/RECOMMENDED_INSTANCES.json`. The entry
+should consist of a name (including your primary language), and
+the URL of the instance.
diff --git a/src/RECOMMENDED_INSTANCES.json b/src/RECOMMENDED_INSTANCES.json
new file mode 100644
index 0000000..f9d34e3
--- /dev/null
+++ b/src/RECOMMENDED_INSTANCES.json
@@ -0,0 +1,22 @@
+[
+ {
+ "name": "Outer Heaven [EN]",
+ "link": "https://outerheaven.club"
+ },
+ {
+ "name": "Light Novel Dungeon [DE]",
+ "link": "https://ak.lightnovel-dungeon.de"
+ },
+ {
+ "name": "Snowdin Town [EN]",
+ "link": "https://snowdin.town"
+ },
+ {
+ "name" : "Coral Castle [EN]",
+ "link": "https://seafoam.space"
+ },
+ {
+ "name": "Luna Nova [EN]",
+ "link": "https://akko.wtf"
+ }
+]
diff --git a/src/components/CallToAction.jsx b/src/components/CallToAction.jsx
index 04bbf0a..d232881 100644
--- a/src/components/CallToAction.jsx
+++ b/src/components/CallToAction.jsx
@@ -2,6 +2,7 @@ import { AppStoreLink } from '@/components/AppStoreLink'
import { CircleBackground } from '@/components/CircleBackground'
import { Container } from '@/components/Container'
import Link from 'next/link'
+import RecommendedInstances from '@/RECOMMENDED_INSTANCES.json'
export function CallToAction() {
return (
@@ -23,21 +24,13 @@ export function CallToAction() {
- -
- Outer Heaven [EN]
-
- -
- Light Novel Dungeon [DE]
-
- -
- Snowdin Town [EN]
-
- -
- Coral Castle [EN]
-
- -
- Luna Nova [EN]
-
+ {RecommendedInstances.map((instance) => (
+ -
+
+ {instance.name}
+
+
+ ))}