- html/css split into tokens.css (custom properties), base.css (reset, typography, focus, skip link), components.css (buttons, inputs, tables, status cards, popups, menu, log lines) and layout.css (shell, sidebar, header, breakpoints); screen.css removed. Selectors and declarations moved as-is; three pairs of conflicting rules resolved in favour of the one that already won the cascade, two empty rules dropped. - Every literal colour outside tokens.css is now a token (category badge borders excepted). color-scheme set so native controls follow. - Light theme under prefers-color-scheme: light, with explicit data-theme="light"/"dark" overrides on :root for a future toggle. Body text 13.6:1, muted text 5.4:1, accent 5.1:1 on the light background. - HTML: lang="en" everywhere, one h1 per page, maintenance page uses <main>, an id typo fixed.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
function login() {
|
||||
var err:Boolean = false
|
||||
var data = new Object()
|
||||
var div:any = document.getElementById("content")
|
||||
var form:any = document.getElementById("authentication")
|
||||
|
||||
var inputs:any = div.getElementsByTagName("INPUT")
|
||||
|
||||
console.log(inputs)
|
||||
|
||||
for (var i = inputs.length - 1; i >= 0; i--) {
|
||||
|
||||
var key:string = (inputs[i] as HTMLInputElement).name
|
||||
var value:string = (inputs[i] as HTMLInputElement).value
|
||||
|
||||
if (value.length == 0) {
|
||||
inputs[i].style.borderColor = "red"
|
||||
err = true
|
||||
} else {
|
||||
inputs[i].style.borderColor = ""
|
||||
}
|
||||
|
||||
data[key] = value
|
||||
|
||||
}
|
||||
|
||||
if (err == true) {
|
||||
data = new Object()
|
||||
return
|
||||
}
|
||||
|
||||
if (data.hasOwnProperty("confirm")) {
|
||||
|
||||
if (data["confirm"] != data["password"]) {
|
||||
document.getElementById('password').style.borderColor = "red"
|
||||
document.getElementById('confirm').style.borderColor = "red"
|
||||
|
||||
document.getElementById("err").innerHTML = "Password does not match"
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
|
||||
form.submit();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user