aboutsummaryrefslogtreecommitdiff
path: root/app/models/forums.js
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2019-12-23 00:24:21 +0100
committerBen Beltran <ben@nsovocal.com>2019-12-23 00:24:21 +0100
commit890274a7b3ac70848ba9973ef33d53ed58ff88a8 (patch)
treeb003c6eb5e97d7f7060ddd2170fd3a098ba40e30 /app/models/forums.js
parent49d43aa3ace56dc28d4d2b30cafcd064e53a42d9 (diff)
Add svelte frontend
Diffstat (limited to 'app/models/forums.js')
-rw-r--r--app/models/forums.js85
1 files changed, 85 insertions, 0 deletions
diff --git a/app/models/forums.js b/app/models/forums.js
new file mode 100644
index 0000000..211181e
--- /dev/null
+++ b/app/models/forums.js
@@ -0,0 +1,85 @@
+import { writable } from 'svelte/store';
+
+const internals = {};
+
+internals.forums = [
+ {
+ id: 'life',
+ kanji: '命',
+ label: 'Life'
+ },
+ {
+ id: 'the-world',
+ kanji: '世',
+ label: 'The World'
+ },
+ {
+ id: 'online',
+ kanji: '直結',
+ label: 'Online'
+ },
+ {
+ id: 'experience',
+ kanji: '体験',
+ label: 'Experience'
+ },
+ {
+ id: 'belief',
+ kanji: '信念',
+ label: 'Belief'
+ },
+ {
+ id: 'movement',
+ kanji: '動',
+ label: 'Movement'
+ },
+ {
+ id: 'emotion',
+ kanji: '情',
+ label: 'Emotion'
+ },
+ {
+ id: 'interaction',
+ kanji: '交流',
+ label: 'Interaction'
+ },
+ {
+ id: 'structure',
+ kanji: '構造',
+ label: 'Structure'
+ },
+ {
+ id: 'sound',
+ kanji: '音',
+ label: 'Sound'
+ },
+ {
+ id: 'words',
+ kanji: '言葉',
+ label: 'Words'
+ },
+ {
+ id: 'us',
+ kanji: '一同',
+ label: 'Us'
+ },
+ {
+ id: 'everything',
+ kanji: '何事も',
+ label: 'Everything'
+ }
+];
+
+export const forums = writable(internals.forums);
+
+export function addForum() {
+ const id = Math.random();
+
+ forums.update((forums) => ([...forums,
+ {
+ id,
+ kanji: 'の',
+ label: `Woah ${id}`
+ }
+ ]));
+};