Skip to content

rhaskia/JelyMe.github.io

 
 

Repository files navigation

Conventions Used Within This Codebase

  1. Please commit to the dev-branch! All commits to the main branch will be automatically rejected!

  2. For all languages that is not HTML and CSS, use camelCase for all names, including variables and functions. For HTML and CSS, classes and IDs must be named where each word is separated by a dash, and all the letters have to be lowercase.

  3. Make sure that the CSS styling is grouped by attribute to avoid clustered CSS code! For example, all the code that has to do with fonts are grouped together in a class, and all the border stuff is grouped together, and so on!

  4. Every object needs to be somewhat modular so that we can copy paste without problems.

  5. all backend must be spaghetti It's about the front end user experience, if it doesn't feel nice, fix it.

  6. Curly braces shall start on the same line as the expression. Eg:

if (expression) {
   //Stuff
}
  1. Don't delete other's stuff without asking what it was used for. However, if you think that other's code can be written more cleanly, please make sure that you know exactly what their code is doing (along with potentially little things) before refactoring.

  2. COMMENT EVERYTHING Please do not over document code. Document when something needs to be explained explicitly. An example can be found in script.js.

Why we use autocomplete.textContent instead of innerHTML: This is because Earth & Space Science has an ampersand, which is displayed as & in HTML. If we use autocomplete.innerHTML, then we are comparing searchText.value (which is plain) text, with HTML markup. This leads to errors such as when autocompleting for Earth & Space Science, the searchText will be displayed as "Earth & Space Science". To avoid this we have to use the raw plain text of autocomplete. Hence, we use textContent.

  1. All of these rules apply in retrospect, with a grace period. The refactoring should be done before you push to this repo.

HAVE FUN

About

Hosting all the NZQA files you could ever want

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 65.8%
  • JavaScript 22.6%
  • HTML 11.6%