summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-08-06 10:07:02 +0100
committerVincent Sanders <vince@kyllikki.org>2019-08-06 10:07:35 +0100
commit6a1c64ff7b45dd830bfdb5e1295830b75c531f61 (patch)
tree76d8b13ed9b7429d268724422b581338a374fbe3
parentea549da8df0ab4ebed2b1f79cd215ac2bd0918e2 (diff)
downloadnetsurf-6a1c64ff7b45dd830bfdb5e1295830b75c531f61.tar.gz
netsurf-6a1c64ff7b45dd830bfdb5e1295830b75c531f61.tar.bz2
improve css formatting in about scheme query handlers
-rw-r--r--content/fetchers/about.c7
-rw-r--r--resources/internal.css29
2 files changed, 33 insertions, 3 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index b922708a9..2cbb60407 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -737,6 +737,9 @@ static bool fetch_about_query_auth_handler(struct fetch_about_context *ctx)
"<h1>%s</h1>\n",
title, title);
+ slen += snprintf(buffer + slen, sizeof(buffer) - slen,
+ "<form method=\"post\" enctype=\"multipart/form-data\">");
+
res = get_login_description(siteurl,
realm,
username,
@@ -749,8 +752,6 @@ static bool fetch_about_query_auth_handler(struct fetch_about_context *ctx)
free(description);
}
- slen += snprintf(buffer + slen, sizeof(buffer) - slen,
- "<form method=\"post\" enctype=\"multipart/form-data\">");
slen += snprintf(buffer + slen, sizeof(buffer) - slen,
"<div>"
@@ -769,7 +770,7 @@ static bool fetch_about_query_auth_handler(struct fetch_about_context *ctx)
messages_get("Password"), password);
slen += snprintf(buffer + slen, sizeof(buffer) - slen,
- "<div>"
+ "<div align=\"right\">"
"<input type=\"submit\" id=\"cancel\" name=\"cancel\" "
"value=\"%s\">"
"<input type=\"submit\" id=\"login\" name=\"login\" "
diff --git a/resources/internal.css b/resources/internal.css
index c72dfac06..f49f1bbfb 100644
--- a/resources/internal.css
+++ b/resources/internal.css
@@ -237,3 +237,32 @@ p.imagecachelist span {
display: table-cell;
}
+/*
+ * authentication styling
+ */
+
+body#authentication form {
+ /* Just to center the form on the page */
+ margin: 0 auto;
+ width: 400px;
+ /* To see the outline of the form */
+ padding: 1em;
+ border: 1px solid #CCC;
+ border-radius: 1em;
+}
+
+body#authentication label {
+ /* To make sure that all labels have the same size and are properly aligned */
+ display: inline-block;
+ width: 90px;
+ text-align: right;
+}
+
+body#authentication input#username, body#authentication input#password {
+/* To give the same size to all text fields */
+ width: 300px;
+ box-sizing: border-box;
+
+ /* To harmonize the look & feel of text field border */
+ border: 1px solid #999;
+}