2026-03-07 06:20:39 +00:00
{{template "base" .}}
2026-03-08 06:06:38 +00:00
{{define "title"}}GoWebMail — Sign In{{end}}
2026-03-07 06:20:39 +00:00
{{define "body_class"}}auth-page{{end}}
{{define "body"}}
< div class = "auth-card" >
< div class = "logo" >
< div class = "logo-icon" > < svg viewBox = "0 0 24 24" > < path d = "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" / > < / svg > < / div >
2026-03-08 06:06:38 +00:00
< span class = "logo-text" > GoWebMail< / span >
2026-03-07 06:20:39 +00:00
< / div >
< h1 > Welcome back< / h1 >
2026-03-08 06:06:38 +00:00
< p class = "subtitle" > Sign in to your Web Mail Client< / p >
2026-03-07 06:20:39 +00:00
< div id = "err" class = "alert error" style = "display:none" > < / div >
< form method = "POST" action = "/auth/login" >
< div class = "field" > < label > Username or Email< / label > < input type = "text" name = "username" placeholder = "admin" required autocomplete = "username" > < / div >
< div class = "field" > < label > Password< / label > < input type = "password" name = "password" placeholder = "••••••••" required autocomplete = "current-password" > < / div >
< button class = "btn-primary" type = "submit" style = "width:100%;padding:13px;font-size:15px;margin-top:8px" > Sign In< / button >
< / form >
< / div >
{{end}}
{{define "scripts"}}
< script >
2026-03-08 17:54:13 +00:00
const msgs = { invalid _credentials : 'Invalid username or password.' , missing _fields : 'Please fill in all fields.' , location _not _authorized : 'Access from your current location is not permitted for this account.' } ;
2026-03-07 06:20:39 +00:00
const k = new URLSearchParams ( location . search ) . get ( 'error' ) ;
if ( k ) { const b = document . getElementById ( 'err' ) ; b . textContent = msgs [ k ] || 'An error occurred.' ; b . style . display = 'block' ; }
< / script >
{{end}}