From 3e99a6336cc7d3bf977d24f68b1f456ce14ee140 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 16 Feb 2014 16:03:13 +0100 Subject: [PATCH] Form CSS overhaul --- public_html/media/css/auth.css | 14 ++-- public_html/media/css/core.css | 115 ++++++++++++-------------- public_html/media/css/logs.css | 3 +- public_html/media/css/post-list.css | 9 +- public_html/media/css/post-upload.css | 33 +++----- public_html/media/css/post-view.css | 3 - public_html/media/css/tag-list.css | 13 +-- public_html/media/css/user-view.css | 22 ++--- src/Views/auth-login.phtml | 22 +++-- src/Views/comment-add.phtml | 6 +- src/Views/comment-edit.phtml | 6 +- src/Views/post-edit.phtml | 48 +++++------ src/Views/post-upload.phtml | 43 +++++----- src/Views/tag-mass-tag.phtml | 15 ++-- src/Views/tag-merge.phtml | 15 ++-- src/Views/tag-rename.phtml | 15 ++-- src/Views/user-delete.phtml | 10 +-- src/Views/user-edit.phtml | 30 +++---- src/Views/user-registration.phtml | 34 ++++---- src/Views/user-select.phtml | 10 +-- src/Views/user-settings.phtml | 22 ++--- 21 files changed, 224 insertions(+), 264 deletions(-) diff --git a/public_html/media/css/auth.css b/public_html/media/css/auth.css index 513389ed..98da9139 100644 --- a/public_html/media/css/auth.css +++ b/public_html/media/css/auth.css @@ -1,30 +1,30 @@ -form.auth { +#content form { margin: 0 auto; max-width: 400px; } -form.auth label.left { +#content form label { width: 35%; } -form.auth p { +#content form p { text-align: center; margin: 10px 0; } -form.auth .help { +#content form .help { opacity: .5; margin-top: 1em; font-size: small; } -form.auth .help p { +#content form .help p { margin: 0; text-align: left; } -form.auth .help label+div { +#content form .help label+div { float: left; } -form.auth .help ul { +#content form .help ul { margin: 0; padding: 0; } diff --git a/public_html/media/css/core.css b/public_html/media/css/core.css index e0b87db1..0fcc2e4f 100644 --- a/public_html/media/css/core.css +++ b/public_html/media/css/core.css @@ -88,11 +88,10 @@ body { } #top-nav li.search input { border: 0; - height: 20px; - line-height: 20px; - padding: 4px 10px; + height: 28px; + line-height: 28px; + padding: 0 10px; margin: 0; - box-sizing: content-box; } #top-nav li.safety { @@ -237,42 +236,38 @@ a:hover i[class*='icon-'] { -form.aligned input, -form.aligned button { - vertical-align: text-top; -} -form.aligned label { +.form-row>label { + display: inline-block; text-align: right; vertical-align: middle; -} -form.aligned label.left { - display: inline-block; padding-right: 1em; - width: 5em; + width: 7em; min-height: 1em; float: left; } -form.aligned>div { - margin-bottom: 0.5em; - clear: left; -} -form.aligned label, -form.aligned input, -form.aligned select, -form.aligned button { +label, +input:not([type=radio]):not([type=checkbox]):not([type=file]), +select, +button { + -webkit-box-sizing: border-box !important; + -moz-box-sizing: border-box !important; + box-sizing: border-box !important; vertical-align: middle; - line-height: 20px; + line-height: 24px; + height: 34px; } -form.aligned label, -form.aligned input, -form.aligned select { +label, +input, +select { padding: 5px; + font-family: inherit; + font-size: 11pt; } -form.aligned input[type=file] { +input[type=file] { padding: 5px 0; } -form.aligned input[type=radio], -form.aligned input[type=checkbox] { +input[type=radio], +input[type=checkbox] { width: auto; max-width: auto; margin: 0 10px 0 0; @@ -280,51 +275,49 @@ form.aligned input[type=checkbox] { vertical-align: middle; } +button { + font-size: 12pt; + border-radius: 5px; + padding: 5px 15px; + -moz-box-sizing: border-box; + color: white; + background: hsl(205,70%,70%); + border: 0; +} +button:hover { + background-color: hsl(205,70%,60%); + cursor: pointer; +} + +.form-row { + margin: 0.25em 0; + clear: left; +} .input-wrapper { overflow: hidden; display: block; } -.input-wrapper ul.tagit, -.input-wrapper input, -.input-wrapper textarea, -.input-wrapper select { - width: 100%; - max-width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -label { - display: inline-block; -} -label, -input, -select, -button { - font-family: inherit; - font-size: 11pt; -} ul.tagit, select, textarea, input:not([type=radio]):not([type=checkbox]):not([type=file]) { + width: 100%; + max-width: 100%; border: 1px solid #ccc; - border-radius: 3px; + border-radius: 5px; +} + +ul.tagit { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } ul.tagit input { border: 0 !important; -} -button { - font-size: 115%; - padding: 0.2em 0.7em; - color: white; - background: cornflowerblue; - border: 0; -} -button:hover { - background-color: royalblue; - cursor: pointer; + line-height: auto !important; + height: auto !important; + margin: -4px 0 !important; } @@ -368,7 +361,7 @@ button:hover { border-style: solid; border-width: 1px; max-width: 500px; - margin: 2em auto !important; + margin: 2em auto; } .alert-success { diff --git a/public_html/media/css/logs.css b/public_html/media/css/logs.css index 01c250ec..bb96f81b 100644 --- a/public_html/media/css/logs.css +++ b/public_html/media/css/logs.css @@ -4,8 +4,7 @@ #content input { margin: 0 1em; - height: 25px; - vertical-align: middle; + max-width: 50%; } pre { diff --git a/public_html/media/css/post-list.css b/public_html/media/css/post-list.css index 50510653..ff9694af 100644 --- a/public_html/media/css/post-list.css +++ b/public_html/media/css/post-list.css @@ -10,19 +10,20 @@ .form-wrapper { text-align: center; + margin-bottom: 1em; } .small-screen .form-wrapper { width: 100%; } -form.aligned { +#content form { margin: 0 auto; width: 24em; text-align: left; } -form.aligned label.left { - width: 7em; +#content form label { + width: 9em; } -form h1 { +#content form h1 { display: none; } diff --git a/public_html/media/css/post-upload.css b/public_html/media/css/post-upload.css index e3c0eb7d..12b1b41b 100644 --- a/public_html/media/css/post-upload.css +++ b/public_html/media/css/post-upload.css @@ -34,19 +34,14 @@ margin-top: 0.5em; position: relative; } -#url-handler input { - padding: 0.5em; -} #url-handler .input-wrapper { - margin-right: 7.5em; + margin-right: 8.5em; } #url-handler button { - font-size: initial; - padding: 0.5em; position: absolute; top: 0; right: 0; - width: 7em; + width: 8em; } .post .thumbnail { @@ -119,19 +114,6 @@ font-size: 130%; } -.post label { - line-height: 33px; -} -.post label.left { - display: inline-block; - width: 60px; - padding-right: 10px; - float: left; -} -.post .safety label:not(.left) { - margin-right: 0.75em; -} - .post .file-name strong { overflow: hidden; text-overflow: ellipsis; @@ -139,7 +121,7 @@ white-space: pre; display: inline-block; vertical-align: middle; - line-height: 33px; + padding: 0.5em 0; } .safety-safe { @@ -159,8 +141,15 @@ ul.tagit { font-size: 1em; } +.submit-wrapper { + text-align: center; +} #the-submit { - margin: 0 0 0 205px; + margin: 0 auto; + font-size: 14.5pt; + padding: 0.35em 2em; + height: auto; + line-height: auto; } .post .form-wrapper { diff --git a/public_html/media/css/post-view.css b/public_html/media/css/post-view.css index a7cc1039..c46c7f80 100644 --- a/public_html/media/css/post-view.css +++ b/public_html/media/css/post-view.css @@ -136,9 +136,6 @@ i.icon-dl { .unit.edit-post { display: none; } -form.edit-post .safety label:not(.left) { - margin-right: 0.75em; -} ul.tagit { display: block; vertical-align: middle; diff --git a/public_html/media/css/tag-list.css b/public_html/media/css/tag-list.css index 6c60f95a..4b63f790 100644 --- a/public_html/media/css/tag-list.css +++ b/public_html/media/css/tag-list.css @@ -17,22 +17,15 @@ } .form-wrapper { - width: 50%; max-width: 24em; - display: inline-block; - text-align: center; } .small-screen .form-wrapper { width: 100%; } -form.aligned { - text-align: left; - margin: 0 auto; +#content form label { + width: 9em; } -form.aligned label.left { - width: 7em; -} -form h1 { +#content form h1 { display: none; } diff --git a/public_html/media/css/user-view.css b/public_html/media/css/user-view.css index 91d714d2..2902916a 100644 --- a/public_html/media/css/user-view.css +++ b/public_html/media/css/user-view.css @@ -12,22 +12,12 @@ padding: 0; } -form.settings label.left, -form.delete label.left, -form.edit label.left { - width: 9em; +#content form { + max-width: 30em; } - -form.settings .alert, -form.delete .alert, -form.edit .alert { +#content form label { + width: 10em; +} +#content form .alert { margin: 1em 0; } - -form.settings input, -form.delete input, -form.edit select, -form.edit input { - width: 16em; - max-width: 90%; -} diff --git a/src/Views/auth-login.phtml b/src/Views/auth-login.phtml index 17ad8288..4defa9af 100644 --- a/src/Views/auth-login.phtml +++ b/src/Views/auth-login.phtml @@ -3,23 +3,21 @@ LayoutHelper::setSubTitle('authentication form'); LayoutHelper::addStylesheet('auth.css'); ?> -
-
-

If you don't have an account yet,
click here to create a new one.

-
+ +

If you don't have an account yet,
click here to create a new one.

-
- +
+
-
- +
+
-
- +
+
  @@ -35,8 +33,8 @@ LayoutHelper::addStylesheet('auth.css'); -
- +
+

Problems logging in?

    diff --git a/src/Views/comment-add.phtml b/src/Views/comment-add.phtml index 2ef5c8d6..ca581dc2 100644 --- a/src/Views/comment-add.phtml +++ b/src/Views/comment-add.phtml @@ -3,18 +3,18 @@ LayoutHelper::addStylesheet('comment-edit.css'); LayoutHelper::addScript('comment-edit.js'); ?> - +

    add comment

    -
    +
    -
    +
     
    diff --git a/src/Views/comment-edit.phtml b/src/Views/comment-edit.phtml index 790019b1..6069f03a 100644 --- a/src/Views/comment-edit.phtml +++ b/src/Views/comment-edit.phtml @@ -3,18 +3,18 @@ LayoutHelper::addStylesheet('comment-edit.css'); LayoutHelper::addScript('comment-edit.js'); ?> - +

    edit comment

    -
    +
    -
    +
     
    diff --git a/src/Views/post-edit.phtml b/src/Views/post-edit.phtml index 75dd80ea..1b89afdc 100644 --- a/src/Views/post-edit.phtml +++ b/src/Views/post-edit.phtml @@ -1,54 +1,56 @@ - +

    edit post

    context->transport->post->getUploader()))): ?> -
    - - - - +
    + +
    + + + +
    context->transport->post->getUploader()))): ?> -
    - +
    +
    context->transport->post->getUploader()))): ?> -
    - +
    +
    context->transport->post->getUploader()))): ?> -
    - +
    +
    context->transport->post->getUploader()))): ?> -
    - +
    +
    -
    - +
    +
    context->transport->post->getUploader()))): ?> -
    - +
    +
    context->transport->post->hasCustomThumb()): ?> @@ -60,8 +62,8 @@ -
    - +
    +
    diff --git a/src/Views/post-upload.phtml b/src/Views/post-upload.phtml index 699582c3..66f59712 100644 --- a/src/Views/post-upload.phtml +++ b/src/Views/post-upload.phtml @@ -67,37 +67,38 @@ LayoutHelper::addScript('../lib/tagit/jquery.tagit.js');
    -
    -
    - + +
    + filename.jpg
    -
    - - - +
    + +
    + + + + + - - - - +
    -
    - +
    +
    -
    - +
    +
    diff --git a/src/Views/tag-mass-tag.phtml b/src/Views/tag-mass-tag.phtml index 182c5777..fdeccbe3 100644 --- a/src/Views/tag-mass-tag.phtml +++ b/src/Views/tag-mass-tag.phtml @@ -1,20 +1,21 @@
    - +

    mass tag

    -
    - + +
    +
    -
    - +
    +
    -
    - +
    +
    diff --git a/src/Views/tag-merge.phtml b/src/Views/tag-merge.phtml index 9418b753..6dd65257 100644 --- a/src/Views/tag-merge.phtml +++ b/src/Views/tag-merge.phtml @@ -1,20 +1,21 @@
    -
    +

    merge tags

    -
    - + +
    +
    -
    - +
    +
    -
    - +
    +
    diff --git a/src/Views/tag-rename.phtml b/src/Views/tag-rename.phtml index 50a34857..cd353dc4 100644 --- a/src/Views/tag-rename.phtml +++ b/src/Views/tag-rename.phtml @@ -1,20 +1,21 @@
    -
    +

    rename tags

    -
    - + +
    +
    -
    - +
    +
    -
    - +
    +
    diff --git a/src/Views/user-delete.phtml b/src/Views/user-delete.phtml index 7b1d1344..35144304 100644 --- a/src/Views/user-delete.phtml +++ b/src/Views/user-delete.phtml @@ -1,7 +1,7 @@ -
    + context->user->id == $this->context->transport->user->id): ?> -
    - +
    +
    @@ -10,8 +10,8 @@ renderFile('message') ?> -
    - +
    +
    diff --git a/src/Views/user-edit.phtml b/src/Views/user-edit.phtml index 66f18b2d..d6da359a 100644 --- a/src/Views/user-edit.phtml +++ b/src/Views/user-edit.phtml @@ -1,40 +1,40 @@ -
    + context->user->id == $this->context->transport->user->id): ?> -
    - +
    +

    context->transport->user))): ?> -
    - +
    +
    context->transport->user))): ?> -