Skip to content

Latest commit

 

History

History
77 lines (69 loc) · 4.36 KB

README.md

File metadata and controls

77 lines (69 loc) · 4.36 KB

Glas

Glas - An ineractive Irish learning website

Table of Contents

  1. About
  2. Main Features
  3. Update Log
  4. Backend
  5. Special Thanks & FootNotes

About

Dia Dhaoibh! Glas was a very poor attemt to fix the bad sides of Duoligo. It gives you a detailed description of the topic. One of the things that I didn't like about the Duolingo system was the way it didn't show how you got your question wrong, so I tried my best so the experience feels like reading a book. Having said that, it's VERY bad. I guess it was too ambitious for a teenager to tackle on a multi-billion dollar co-operation. It's still open source if you want it, though. I'm thinking about paying repl so it doesn't take hours for the page to load. Link to Website

Main Features

Feature Explanation
Users The users are saved in a JSON file, using the Node Passport plugin. The password gets encoded, so it should be fine security wyse.
Achievements Achievements are saved onto LocalStorage1, where they are put into JSON format. They are all names of Albums I like. Give them a listen!
Posts A clean blog system with it's own programming language, similar to markdown.
Tests Tests pull a random quiz type, at the moment "muti-choice" and "text-input"
Realitively Good CSS I know nothing about front-end. I tried my best to make it responsive. (I am planning to make it easier on the eyes in the future)
Games You can play hangman and a colour matching game. Will add more.

Update Log

  • Make site mobile friendly
  • Update the website
  • Add more items

Backend

The whole system works with a series of JSON files, by using the Javascript fetch() funciton. Here is how they are all made, for the non existant people that want to work on my website. I also added square brackets to all of them, which made it harder to work with, but easier to look at, in my opinion. The descrption of the tags are in an about element. I understand it looks bad, but unfortunately, comments are illegal in JSON. The main database uses a headless cms, and pulls all of the data from the datocms website. This makes everything incredibly easy to edit. I used a read-only token, but if I really was smart enough, I could have added an in-site article editor

Database

The database uses a datocms headless cms. It's made so it's as easy as pie. If anyone wants to access it and edit the code, just ask me through reddit or github. It has about 6 properties including the post title2, URL3, content(in markdown)4, and tags5.

Achievement.JSON

The achievement JSON file is made to be as simple as possible, by only using the name and description. To trigger it, just put a completeAchievement function in the code, where you want it to be triggered, and put the achievement name in string6 form.

[
  {
    "name": [""],
    "description": [""]
  }
]

78

Questions.JSON

The Questions JSON file is.... Drum roll please.... FOR THE QUIZES! who could have guessed .

[
  {
    "question": [""],
    "posturl": [""],
    "questions": ["", "", "", ""],
    "correct": [],
  }
]

9101112

I don't even know why I'm putting this much effort for something no one is going to see. lol.

Footnotes

Special thanks

Special Thanks to : My Irish Teacher, H.A. and S.W.J.

Footnotes

Footnotes

  1. LocalStorage

  2. Post title. This will be displayed in the main page.

  3. Post URL can be changed through here. Make sure to use a term not used before, or else the whole thing falls to pieces.

  4. Post content. Does exactly what it says on the tin.

  5. Post Tags. this is an external link to another datocms block.

  6. strings

  7. Achievement Name

  8. Achievement Description

  9. Question

  10. URL for the quiz.

  11. If you want to add more questions, just add more strings.

  12. Correct answer. Answer in number form, except for when it's colour mode, where you type in a string. (E.g. [1] selects the first question element.)