Version 0.1.1 - Ajout d'une page de login et de style
This commit is contained in:
35
public/javascripts/basics.js
Normal file
35
public/javascripts/basics.js
Normal file
@ -0,0 +1,35 @@
|
||||
// Get Document ID
|
||||
|
||||
function getID(string) {
|
||||
|
||||
return document.getElementById(string)
|
||||
}
|
||||
|
||||
class InfoPop {
|
||||
constructor(name) {
|
||||
this.name = name
|
||||
this.element = getID(this.name)
|
||||
this.element.style.fontSize = "14px"
|
||||
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
||||
this.element.innerHTML = ""
|
||||
}
|
||||
|
||||
err(text) {
|
||||
|
||||
this.element.classList.add("yellow")
|
||||
this.element.innerHTML = "<i class='fa fa-warning'></i> " + text
|
||||
|
||||
}
|
||||
|
||||
info(text) {
|
||||
|
||||
this.element.classList.remove("yellow")
|
||||
|
||||
this.element.innerHTML = "<i class='fa fa-info-circle'></i> " + text
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user