diff --git a/.vscode/settings.json b/.vscode/settings.json index 27f795d..f489718 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ { - "prettier.documentSelectors": [ - "**/*.svelte" - ], + "prettier.documentSelectors": ["**/*.svelte"], "tailwindCSS.classAttributes": [ "class", "accent", @@ -108,4 +106,4 @@ "width", "zIndex" ] -} \ No newline at end of file +} diff --git a/lessons/lesson-1.json b/lessons/lesson-1.json index 1f84171..023356c 100644 --- a/lessons/lesson-1.json +++ b/lessons/lesson-1.json @@ -1,22 +1,22 @@ { - "id": 1, - "title": "Lesson 1", - "description": "Use basic phrases, talk about food and drink", - "content": [ - { - "type": "match", - "options": { - "man": "misier", - "woman": "madam", - "bread": "dipain", - "girl": "tifi" - } - }, - { - "type": "multipleChoice", - "question": "How do you say 'girl'?", - "answer": "tifi", - "options": ["tifi", "diri", "misier"] - } - ] -} \ No newline at end of file + "id": 1, + "title": "Lesson 1", + "description": "Use basic phrases, talk about food and drink", + "content": [ + { + "type": "match", + "options": { + "man": "misier", + "woman": "madam", + "bread": "dipain", + "girl": "tifi" + } + }, + { + "type": "multipleChoice", + "question": "How do you say 'girl'?", + "answer": "tifi", + "options": ["tifi", "diri", "misier"] + } + ] +} diff --git a/lessons/lesson-2.json b/lessons/lesson-2.json index b2617f0..43cb875 100644 --- a/lessons/lesson-2.json +++ b/lessons/lesson-2.json @@ -1,20 +1,20 @@ { - "id": 2, - "title": "Lesson 2", - "description": "Greet people, use affirmative phrases", - "content": [ - { - "type": "fillBlank", - "question": ["Mo", "Jean"], - "answer": "apel", - "options": ["dipain", "bwar", "apel"], - "translation": "I'm called Jean" - }, - { - "type": "multipleChoice", - "question": "How do you say 'rice'?", - "answer": "diri", - "options": ["tifi", "diri", "misier"] - } - ] -} \ No newline at end of file + "id": 2, + "title": "Lesson 2", + "description": "Greet people, use affirmative phrases", + "content": [ + { + "type": "fillBlank", + "question": ["Mo", "Jean"], + "answer": "apel", + "options": ["dipain", "bwar", "apel"], + "translation": "I'm called Jean" + }, + { + "type": "multipleChoice", + "question": "How do you say 'rice'?", + "answer": "diri", + "options": ["tifi", "diri", "misier"] + } + ] +} diff --git a/lessons/lesson-3.json b/lessons/lesson-3.json index 3964639..3e84672 100644 --- a/lessons/lesson-3.json +++ b/lessons/lesson-3.json @@ -1,20 +1,20 @@ { - "id": 3, - "title": "Lesson 3", - "description": "Say what you don't do, use articles", - "content": [ - { - "type": "fillBlank", - "question": ["Mo", "koné"], - "answer": "pa", - "options": ["pa", "bwar", "delo"], - "translation": "I don't know" - }, - { - "type": "translate", - "question": "A boy", - "answer": "Ene garson", - "options": ["tifi", "Ene", "pa", "garson"] - } - ] -} \ No newline at end of file + "id": 3, + "title": "Lesson 3", + "description": "Say what you don't do, use articles", + "content": [ + { + "type": "fillBlank", + "question": ["Mo", "koné"], + "answer": "pa", + "options": ["pa", "bwar", "delo"], + "translation": "I don't know" + }, + { + "type": "translate", + "question": "A boy", + "answer": "Ene garson", + "options": ["tifi", "Ene", "pa", "garson"] + } + ] +} diff --git a/lessons/lesson-4.json b/lessons/lesson-4.json index 716e5ac..261602e 100644 --- a/lessons/lesson-4.json +++ b/lessons/lesson-4.json @@ -1,20 +1,20 @@ { - "id": 4, - "title": "Lesson 4", - "description": "Discuss food and drink, talk about animals", - "content": [ - { - "type": "fillBlank", - "question": ["Mo", "delo"], - "answer": "bwar", - "options": ["dipain", "bwar", "apel"], - "translation": "I drink water" - }, - { - "type": "multipleChoice", - "question": "How do you say 'rice'?", - "answer": "diri", - "options": ["tifi", "diri", "misier"] - } - ] -} \ No newline at end of file + "id": 4, + "title": "Lesson 4", + "description": "Discuss food and drink, talk about animals", + "content": [ + { + "type": "fillBlank", + "question": ["Mo", "delo"], + "answer": "bwar", + "options": ["dipain", "bwar", "apel"], + "translation": "I drink water" + }, + { + "type": "multipleChoice", + "question": "How do you say 'rice'?", + "answer": "diri", + "options": ["tifi", "diri", "misier"] + } + ] +} diff --git a/src/app.postcss b/src/app.postcss index 7c10188..e0c544a 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -8,4 +8,4 @@ body { font-family: 'Quicksand'; src: url('/fonts/Quicksand.ttf'); font-display: swap; -} \ No newline at end of file +} diff --git a/src/lib/components/HeaderLead.svelte b/src/lib/components/HeaderLead.svelte index e35ad89..18d3622 100644 --- a/src/lib/components/HeaderLead.svelte +++ b/src/lib/components/HeaderLead.svelte @@ -1,22 +1,22 @@
Created by Laurie Lim Sam
-+ Created by Laurie Lim Sam +
+ diff --git a/src/lib/data/lessons.ts b/src/lib/data/lessons.ts index 1320176..fa199ef 100644 --- a/src/lib/data/lessons.ts +++ b/src/lib/data/lessons.ts @@ -1,33 +1,33 @@ -import fs from "fs"; -import path from "path"; -const lessonsDirectory = path.join(process.cwd(), 'lessons') +import fs from 'fs'; +import path from 'path'; +const lessonsDirectory = path.join(process.cwd(), 'lessons'); export function getAllLessons() { - const fileNames = fs.readdirSync(lessonsDirectory); - const allLessonsData = fileNames.map((fileName: string) => { - // Remove ".json" from file name to get id - const slug = fileName.replace(/\.json$/, ''); + const fileNames = fs.readdirSync(lessonsDirectory); + const allLessonsData = fileNames.map((fileName: string) => { + // Remove ".json" from file name to get id + const slug = fileName.replace(/\.json$/, ''); - const lesson = getLessonBySlug(slug); + const lesson = getLessonBySlug(slug); - return { - slug, - ...lesson, - } - }) - return allLessonsData; + return { + slug, + ...lesson + }; + }); + return allLessonsData; } export function getLessonBySlug(slug: string) { - // Read file content - const fileName = `${slug}.json` - const fullPath = path.join(lessonsDirectory, fileName) - try { - if (fs.existsSync(fullPath)) { - const fileContents = fs.readFileSync(fullPath, 'utf8') - return JSON.parse(fileContents); - } - } catch(err) { - return null - } -} \ No newline at end of file + // Read file content + const fileName = `${slug}.json`; + const fullPath = path.join(lessonsDirectory, fileName); + try { + if (fs.existsSync(fullPath)) { + const fileContents = fs.readFileSync(fullPath, 'utf8'); + return JSON.parse(fileContents); + } + } catch (err) { + return null; + } +} diff --git a/src/lib/exercises/FillBlank.svelte b/src/lib/exercises/FillBlank.svelte index 4ef62de..6ec1e80 100644 --- a/src/lib/exercises/FillBlank.svelte +++ b/src/lib/exercises/FillBlank.svelte @@ -1,57 +1,55 @@It looks like you're trying to access a page that has been deleted or never even existed.
- - Back to home - ++ It looks like you're trying to access a page that has been deleted or never even existed. +
+ Back to home- A Duolingo ripoff to help you learn Mauritian Creole. - I made this application to help my partner learn my mother tongue, maybe it - can help you too. + A Duolingo ripoff to help you learn Mauritian Creole. I made this application to help my + partner learn my mother tongue, maybe it can help you too.
You've either reached the end or you tried to access a lesson that does not exist.
-This is a work in progress so there will be more lessons in the future.
-Meanwhile, go back and practice previous lessons to solidify your learnings.
- - Back to home - ++ You've either reached the end or you tried to access a lesson that does not exist. +
+This is a work in progress so there will be more lessons in the future.
+Meanwhile, go back and practice previous lessons to solidify your learnings.
+ Back to home{data.description}
- Inspired by the renowned language-learning platform Duolingo, Kreolingo is a user-friendly web app designed to help people learn Mauritian Creole. -
-- Kreolingo was born out of love and a desire to connect. I wanted to help my partner learn my mother tongue. I believe that learning each other's languages can create a profound bond, and I want to make that possible for everyone. -
-- Whether you are a fellow Mauritian or a curious learner from afar, I invite you to contribute – be it by adding lessons, improving the app, or just sharing your ideas. -
-+ Inspired by the renowned language-learning platform Duolingo, Kreolingo is a user-friendly web app designed to help people learn Mauritian Creole. +
++ Kreolingo was born out of love and a desire to connect. I wanted to help my partner learn my + mother tongue. I believe that learning each other's languages can create a profound bond, and I + want to make that possible for everyone. +
++ Whether you are a fellow Mauritian or a curious learner from afar, I invite you to contribute – be it by adding lessons, improving the app, or just sharing your ideas. +
+