Make the login and register forms look better in the dark theme

This commit is contained in:
Timur Ismagilov 2021-05-16 13:37:35 +05:00
parent 7dded44887
commit 39e7f0b880
4 changed files with 92 additions and 78 deletions

View File

@ -322,11 +322,13 @@ caption { caption-side: top; font-size: small; }
::-webkit-file-upload-button, ::-webkit-file-upload-button,
.btn { line-height: normal; display: inline-block; border: 1px #999 solid; border-radius: .25rem; text-decoration: none; padding: .25rem; font-size: 1rem; margin: 0; } .btn { line-height: normal; display: inline-block; border: 1px #999 solid; border-radius: .25rem; text-decoration: none; padding: .25rem; font-size: 1rem; margin: 0; }
.btn_weak { border: 1px #999 dashed; }
/* Color stuff */ /* Color stuff */
/* Lighter stuff #eee */ /* Lighter stuff #eee */
::-webkit-file-upload-button, .btn { background-color: #eee; color: black; } ::-webkit-file-upload-button, .btn { background-color: #eee; color: black; }
.btn:visited { color: black; } .btn:visited { color: black; }
.btn_weak { background-color: transparent; }
article code, article code,
article .codeblock, article .codeblock,
@ -395,6 +397,7 @@ blockquote { border-left: 4px #ddd solid; }
.transclusion .transclusion__link { color: #ddd; } .transclusion .transclusion__link { color: #ddd; }
input[type="text"], input[type="password"],
::-webkit-file-upload-button, ::-webkit-file-upload-button,
.btn, .btn,
article code, article code,
@ -409,6 +412,9 @@ textarea,
table { border: 0; background-color: #444444; color: #ddd; } table { border: 0; background-color: #444444; color: #ddd; }
.btn:visited { color: #ddd;} .btn:visited { color: #ddd;}
.btn { border: #444 solid 1px; border-radius: .25rem; }
.btn_weak { background-color: transparent; }
.transclusion code, .transclusion code,
.transclusion .codeblock { background-color: #454545; } .transclusion .codeblock { background-color: #454545; }
mark { background: rgba(130, 80, 30, 5); color: inherit; } mark { background: rgba(130, 80, 30, 5); color: inherit; }

View File

@ -207,11 +207,13 @@ caption { caption-side: top; font-size: small; }
::-webkit-file-upload-button, ::-webkit-file-upload-button,
.btn { line-height: normal; display: inline-block; border: 1px #999 solid; border-radius: .25rem; text-decoration: none; padding: .25rem; font-size: 1rem; margin: 0; } .btn { line-height: normal; display: inline-block; border: 1px #999 solid; border-radius: .25rem; text-decoration: none; padding: .25rem; font-size: 1rem; margin: 0; }
.btn_weak { border: 1px #999 dashed; }
/* Color stuff */ /* Color stuff */
/* Lighter stuff #eee */ /* Lighter stuff #eee */
::-webkit-file-upload-button, .btn { background-color: #eee; color: black; } ::-webkit-file-upload-button, .btn { background-color: #eee; color: black; }
.btn:visited { color: black; } .btn:visited { color: black; }
.btn_weak { background-color: transparent; }
article code, article code,
article .codeblock, article .codeblock,
@ -280,6 +282,7 @@ blockquote { border-left: 4px #ddd solid; }
.transclusion .transclusion__link { color: #ddd; } .transclusion .transclusion__link { color: #ddd; }
input[type="text"], input[type="password"],
::-webkit-file-upload-button, ::-webkit-file-upload-button,
.btn, .btn,
article code, article code,
@ -294,6 +297,9 @@ textarea,
table { border: 0; background-color: #444444; color: #ddd; } table { border: 0; background-color: #444444; color: #ddd; }
.btn:visited { color: #ddd;} .btn:visited { color: #ddd;}
.btn { border: #444 solid 1px; border-radius: .25rem; }
.btn_weak { background-color: transparent; }
.transclusion code, .transclusion code,
.transclusion .codeblock { background-color: #454545; } .transclusion .codeblock { background-color: #454545; }
mark { background: rgba(130, 80, 30, 5); color: inherit; } mark { background: rgba(130, 80, 30, 5); color: inherit; }

View File

@ -20,16 +20,16 @@
<input type="password" required name="password"> <input type="password" required name="password">
<p>The server stores your password in an encrypted form; even administrators cannot read it.</p> <p>The server stores your password in an encrypted form; even administrators cannot read it.</p>
<p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p> <p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p>
<input class="modal__action modal__submit" type="submit"> <input class="btn" type="submit" value="Register">
<a class="modal__action modal__cancel" href="/">Cancel</a> <a class="btn btn_weak" href="/{%s rq.URL.RawQuery %}">Cancel</a>
</fieldset> </fieldset>
</form> </form>
{% elseif cfg.UseFixedAuth %} {% elseif cfg.UseFixedAuth %}
<p>Administrators have forbidden registration for this wiki. Administrators can make an account for you by hand; contact them.</p> <p>Administrators have forbidden registration for this wiki. Administrators can make an account for you by hand; contact them.</p>
<p><a href="{%s rq.URL.RawQuery %}">← Go back</a></p> <p><a href="/{%s rq.URL.RawQuery %}">← Go back</a></p>
{% else %} {% else %}
<p>Administrators of this wiki have not configured any authorization method. You can make edits anonymously.</p> <p>Administrators of this wiki have not configured any authorization method. You can make edits anonymously.</p>
<p><a href="{%s rq.URL.RawQuery %}">← Go back</a></p> <p><a href="/{%s rq.URL.RawQuery %}">← Go back</a></p>
{% endif %} {% endif %}
</section> </section>
</main> </main>
@ -44,7 +44,6 @@
<form class="modal" method="post" action="/login-data" id="login-form" enctype="multipart/form-data" autocomplete="on"> <form class="modal" method="post" action="/login-data" id="login-form" enctype="multipart/form-data" autocomplete="on">
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title">Log in to {%s cfg.WikiName %}</legend> <legend class="modal__title">Log in to {%s cfg.WikiName %}</legend>
<p>Use the data you were given by an administrator.</p>
<label for="login-form__username">Username</label> <label for="login-form__username">Username</label>
<br> <br>
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username"> <input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
@ -53,8 +52,8 @@
<br> <br>
<input type="password" required name="password" autocomplete="current-password"> <input type="password" required name="password" autocomplete="current-password">
<p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p> <p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p>
<input class="modal__action modal__submit" type="submit"> <input class="btn" type="submit" value="Log in">
<a class="modal__action modal__cancel" href="/">Cancel</a> <a class="btn btn_weak" href="/">Cancel</a>
</fieldset> </fieldset>
</form> </form>
{% else %} {% else %}

View File

@ -59,8 +59,12 @@ func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) {
<input type="password" required name="password"> <input type="password" required name="password">
<p>The server stores your password in an encrypted form; even administrators cannot read it.</p> <p>The server stores your password in an encrypted form; even administrators cannot read it.</p>
<p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p> <p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p>
<input class="modal__action modal__submit" type="submit"> <input class="btn" type="submit" value="Register">
<a class="modal__action modal__cancel" href="/">Cancel</a> <a class="btn btn_weak" href="/`)
//line views/auth.qtpl:24
qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:24
qw422016.N().S(`">Cancel</a>
</fieldset> </fieldset>
</form> </form>
`) `)
@ -69,7 +73,7 @@ func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) {
//line views/auth.qtpl:27 //line views/auth.qtpl:27
qw422016.N().S(` qw422016.N().S(`
<p>Administrators have forbidden registration for this wiki. Administrators can make an account for you by hand; contact them.</p> <p>Administrators have forbidden registration for this wiki. Administrators can make an account for you by hand; contact them.</p>
<p><a href="`) <p><a href="/`)
//line views/auth.qtpl:29 //line views/auth.qtpl:29
qw422016.E().S(rq.URL.RawQuery) qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:29 //line views/auth.qtpl:29
@ -80,7 +84,7 @@ func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) {
//line views/auth.qtpl:30 //line views/auth.qtpl:30
qw422016.N().S(` qw422016.N().S(`
<p>Administrators of this wiki have not configured any authorization method. You can make edits anonymously.</p> <p>Administrators of this wiki have not configured any authorization method. You can make edits anonymously.</p>
<p><a href="`) <p><a href="/`)
//line views/auth.qtpl:32 //line views/auth.qtpl:32
qw422016.E().S(rq.URL.RawQuery) qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:32 //line views/auth.qtpl:32
@ -142,7 +146,6 @@ func StreamLoginHTML(qw422016 *qt422016.Writer) {
qw422016.E().S(cfg.WikiName) qw422016.E().S(cfg.WikiName)
//line views/auth.qtpl:46 //line views/auth.qtpl:46
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<p>Use the data you were given by an administrator.</p>
<label for="login-form__username">Username</label> <label for="login-form__username">Username</label>
<br> <br>
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username"> <input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
@ -151,182 +154,182 @@ func StreamLoginHTML(qw422016 *qt422016.Writer) {
<br> <br>
<input type="password" required name="password" autocomplete="current-password"> <input type="password" required name="password" autocomplete="current-password">
<p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p> <p>By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.</p>
<input class="modal__action modal__submit" type="submit"> <input class="btn" type="submit" value="Log in">
<a class="modal__action modal__cancel" href="/">Cancel</a> <a class="btn btn_weak" href="/">Cancel</a>
</fieldset> </fieldset>
</form> </form>
`) `)
//line views/auth.qtpl:60 //line views/auth.qtpl:59
} else { } else {
//line views/auth.qtpl:60 //line views/auth.qtpl:59
qw422016.N().S(` qw422016.N().S(`
<p>Administrators of this wiki have not configured any authorization method. You can make edits anonymously.</p> <p>Administrators of this wiki have not configured any authorization method. You can make edits anonymously.</p>
<p><a class="modal__cancel" href="/"> Go home</a></p> <p><a class="modal__cancel" href="/"> Go home</a></p>
`) `)
//line views/auth.qtpl:63 //line views/auth.qtpl:62
} }
//line views/auth.qtpl:63 //line views/auth.qtpl:62
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div> </div>
`) `)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
} }
//line views/auth.qtpl:67 //line views/auth.qtpl:66
func WriteLoginHTML(qq422016 qtio422016.Writer) { func WriteLoginHTML(qq422016 qtio422016.Writer) {
//line views/auth.qtpl:67 //line views/auth.qtpl:66
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
StreamLoginHTML(qw422016) StreamLoginHTML(qw422016)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
} }
//line views/auth.qtpl:67 //line views/auth.qtpl:66
func LoginHTML() string { func LoginHTML() string {
//line views/auth.qtpl:67 //line views/auth.qtpl:66
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:67 //line views/auth.qtpl:66
WriteLoginHTML(qb422016) WriteLoginHTML(qb422016)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:67 //line views/auth.qtpl:66
return qs422016 return qs422016
//line views/auth.qtpl:67 //line views/auth.qtpl:66
} }
//line views/auth.qtpl:69 //line views/auth.qtpl:68
func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) { func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) {
//line views/auth.qtpl:69 //line views/auth.qtpl:68
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
`) `)
//line views/auth.qtpl:73 //line views/auth.qtpl:72
switch err { switch err {
//line views/auth.qtpl:74 //line views/auth.qtpl:73
case "unknown username": case "unknown username":
//line views/auth.qtpl:74 //line views/auth.qtpl:73
qw422016.N().S(` qw422016.N().S(`
<p class="error">Unknown username.</p> <p class="error">Unknown username.</p>
`) `)
//line views/auth.qtpl:76 //line views/auth.qtpl:75
case "wrong password": case "wrong password":
//line views/auth.qtpl:76 //line views/auth.qtpl:75
qw422016.N().S(` qw422016.N().S(`
<p class="error">Wrong password.</p> <p class="error">Wrong password.</p>
`) `)
//line views/auth.qtpl:78 //line views/auth.qtpl:77
default: default:
//line views/auth.qtpl:78 //line views/auth.qtpl:77
qw422016.N().S(` qw422016.N().S(`
<p class="error">`) <p class="error">`)
//line views/auth.qtpl:79 //line views/auth.qtpl:78
qw422016.E().S(err) qw422016.E().S(err)
//line views/auth.qtpl:79 //line views/auth.qtpl:78
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line views/auth.qtpl:80 //line views/auth.qtpl:79
} }
//line views/auth.qtpl:80 //line views/auth.qtpl:79
qw422016.N().S(` qw422016.N().S(`
<p><a href="/login"> Try again</a></p> <p><a href="/login"> Try again</a></p>
</section> </section>
</main> </main>
</div> </div>
`) `)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
} }
//line views/auth.qtpl:85 //line views/auth.qtpl:84
func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) { func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) {
//line views/auth.qtpl:85 //line views/auth.qtpl:84
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
StreamLoginErrorHTML(qw422016, err) StreamLoginErrorHTML(qw422016, err)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
} }
//line views/auth.qtpl:85 //line views/auth.qtpl:84
func LoginErrorHTML(err string) string { func LoginErrorHTML(err string) string {
//line views/auth.qtpl:85 //line views/auth.qtpl:84
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:85 //line views/auth.qtpl:84
WriteLoginErrorHTML(qb422016, err) WriteLoginErrorHTML(qb422016, err)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:85 //line views/auth.qtpl:84
return qs422016 return qs422016
//line views/auth.qtpl:85 //line views/auth.qtpl:84
} }
//line views/auth.qtpl:87 //line views/auth.qtpl:86
func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) { func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) {
//line views/auth.qtpl:87 //line views/auth.qtpl:86
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
`) `)
//line views/auth.qtpl:91 //line views/auth.qtpl:90
if can { if can {
//line views/auth.qtpl:91 //line views/auth.qtpl:90
qw422016.N().S(` qw422016.N().S(`
<h1>Log out?</h1> <h1>Log out?</h1>
<p><a href="/logout-confirm"><strong>Confirm</strong></a></p> <p><a href="/logout-confirm"><strong>Confirm</strong></a></p>
<p><a href="/">Cancel</a></p> <p><a href="/">Cancel</a></p>
`) `)
//line views/auth.qtpl:95 //line views/auth.qtpl:94
} else { } else {
//line views/auth.qtpl:95 //line views/auth.qtpl:94
qw422016.N().S(` qw422016.N().S(`
<p>You cannot log out because you are not logged in.</p> <p>You cannot log out because you are not logged in.</p>
<p><a href="/login">Login</a></p> <p><a href="/login">Login</a></p>
<p><a href="/login"> Home</a></p> <p><a href="/login"> Home</a></p>
`) `)
//line views/auth.qtpl:99 //line views/auth.qtpl:98
} }
//line views/auth.qtpl:99 //line views/auth.qtpl:98
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div> </div>
`) `)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
} }
//line views/auth.qtpl:103 //line views/auth.qtpl:102
func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) { func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) {
//line views/auth.qtpl:103 //line views/auth.qtpl:102
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
StreamLogoutHTML(qw422016, can) StreamLogoutHTML(qw422016, can)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
} }
//line views/auth.qtpl:103 //line views/auth.qtpl:102
func LogoutHTML(can bool) string { func LogoutHTML(can bool) string {
//line views/auth.qtpl:103 //line views/auth.qtpl:102
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:103 //line views/auth.qtpl:102
WriteLogoutHTML(qb422016, can) WriteLogoutHTML(qb422016, can)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:103 //line views/auth.qtpl:102
return qs422016 return qs422016
//line views/auth.qtpl:103 //line views/auth.qtpl:102
} }