L'index.html et l'index.js doivent se trouver à la racine du projet.
Ensuite:
- Les feuilles de styles à la racine du dossier css/
- Les scripts à la racine du dossier js/
- Les fragments de code html à la racine du dossier html/
{ | |
"grammar": [], | |
"vocabulary": { | |
"categories": ["family","flowers","colors","numbers"], | |
"words": [ | |
{ | |
"mother": { | |
"id": "573d4c6d-13dd-4037-9528-808a850bc75e", | |
"category": 0, | |
"french": "mère", |
{ | |
"status": "ok", | |
"totalResults": 70, | |
"articles": [ | |
{ | |
"source": { | |
"id": "google-news", | |
"name": "Google News" | |
}, | |
"author": null, |
/** | |
* Override of console.log: just another way to display log with style. | |
* | |
* @author Michael CORNILLON <ei.dwaps@gmail.com> | |
* @version 1.0 | |
*/ | |
export default class Logger { | |
/** | |
* Initilize properties for log message and its style(s) |
<!DOCTYPE html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>TITLE</title> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>TITLE</title> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body> |
if ('geolocation' in navigator) { | |
const { geolocation } = navigator; | |
geolocation.getCurrentPosition(success, error); | |
function success(position) { | |
const { coords } = position; | |
const p = document.querySelector('p'); | |
p.innerHTML = ` | |
<strong>LAT:</strong> ${coords.latitude}<br> | |
<strong>LNG:</strong> ${coords.longitude} |
// Model | |
class User { | |
constructor(name, role) { | |
this.name = name; | |
this.role = role; | |
} | |
} | |
// BDD | |
const users = [ |
// CLASSE | |
class Todo { | |
constructor(text) { | |
this.text = text; | |
this.done = false; | |
} | |
} | |
// RECUP DES TODOS | |
const todos = [ |