From 8aa903d8e47df39df5e45f13548e487164e977ab Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Wed, 6 Sep 2017 17:14:04 +0200 Subject: [PATCH] allow use of custom form components, add textarea component, add checkbox input, use more absolute imports --- conf/init.json | 9 ++--- src/app.less | 36 +++++++++++++----- src/components/my-form.vue | 18 ++++----- src/components/my-input.vue | 43 ++++++++++++++-------- src/components/scroll-table.vue | 6 +-- src/components/textarea-input.vue | 61 +++++++++++++++++++++++++++++++ src/components/topbar.vue | 1 + src/variables.less | 2 +- src/views/dashboard.vue | 2 +- src/views/forms/login.vue | 23 ++++++++---- src/views/forms/settings.vue | 45 ++++++++++++++++++----- src/views/lists/domainlist.vue | 4 +- src/views/lists/userlist.vue | 4 +- src/views/views.js | 4 +- 14 files changed, 189 insertions(+), 69 deletions(-) create mode 100644 src/components/textarea-input.vue diff --git a/conf/init.json b/conf/init.json index a908489..d325ff3 100644 --- a/conf/init.json +++ b/conf/init.json @@ -22,9 +22,9 @@ "icon": "icon-contacts" }, { - "name": "FormDemo", - "to": "/formdemo", - "icon": "icon-contacts" + "name": "Settings", + "to": "/settings", + "icon": "icon-cog" } ], "profile": [ @@ -65,7 +65,6 @@ { "name": "Settings", "to": "/settings", - "icon": "icon-cog", "content": "" }, { @@ -79,4 +78,4 @@ "content": "

Profil anpassen

" } ] -} \ No newline at end of file +} diff --git a/src/app.less b/src/app.less index 115bd05..d831993 100644 --- a/src/app.less +++ b/src/app.less @@ -89,7 +89,7 @@ a:hover {color:#901624;} --------------------------------------------------------------*/ .input_holder {margin-bottom:20px; display:block;} .input_header {margin-bottom:10px;} -.input_description {font-size:13px; color: @text_color;} +.input_description {font-size:13px; color: lighten(@text_color, 20%);} input, textarea, select { font-family: @font_family; width: 100%; @@ -98,20 +98,41 @@ input, textarea, select { padding: 0px 10px; color: @text_color; background: white; - border: solid 1px #CCC; - outline: none; - font-size: 14px; - transition: all 0.3s; + border: solid 1px #CCC; + outline: none; + font-size: 14px; + transition: background 0.3s, color 0.3s, border 0.3s; } textarea {padding:10px; height:auto;} input:focus, textarea:focus, select:focus {background:#FFF; border-color: @cms_brand_primary;} label {font-weight:600; color: @text_color;} +.checkbox_holder { + position: relative; + height: 100%; + min-height: 18px; + + &:hover .check_checkbox { + border: 1px solid @cms_brand_primary; + } + + label { + display: block; + position: absolute; + top: 50%; + margin-top: -9px; + width: 18px; + height: 18px; + cursor: pointer; + z-index: 10; + } +} + input[type="checkbox"] { position: absolute; top: -10px; left: -10px; - line-height:50px; + line-height: 50px; visibility: hidden; display: inline-block; margin: 0; @@ -119,7 +140,6 @@ input[type="checkbox"] { width: auto; height: auto; } -.checkbox_holder {position:absolute; top:0px; bottom:0px;} .check_checkbox { background: #FFF; display: block; @@ -167,8 +187,6 @@ button{ padding: 0px 30px; border-radius: 20px; } -.cell_checkbox label {width:18px; height:18px; display:block; cursor:pointer; z-index:10; position: absolute; top:50%; margin-top:-9px;} -.checkbox_holder:hover .check_checkbox {border: 1px solid @cms_brand_primary;} /*-------------------------------------------------------------- # CMS CONTENT FORM diff --git a/src/components/my-form.vue b/src/components/my-form.vue index ca58c2a..e299e56 100644 --- a/src/components/my-form.vue +++ b/src/components/my-form.vue @@ -1,18 +1,18 @@ \ No newline at end of file diff --git a/src/components/topbar.vue b/src/components/topbar.vue index 88b491f..4c837f6 100644 --- a/src/components/topbar.vue +++ b/src/components/topbar.vue @@ -162,6 +162,7 @@ export default { padding: 4px 10px; font-size: 0; color: white; + user-select: none; &:hover { cursor: pointer; diff --git a/src/variables.less b/src/variables.less index 6b726d8..a80ae95 100644 --- a/src/variables.less +++ b/src/variables.less @@ -5,7 +5,7 @@ @font_family: "Open Sans", sans-serif; @text_color: #333; -@font_size: 14px; +@font_size: 15px; @line_height_base: 1.4; @line_height_heading: 1.2; diff --git a/src/views/dashboard.vue b/src/views/dashboard.vue index 771256a..d757dc4 100644 --- a/src/views/dashboard.vue +++ b/src/views/dashboard.vue @@ -1,6 +1,6 @@ diff --git a/src/views/forms/login.vue b/src/views/forms/login.vue index 04092fe..cd2652f 100644 --- a/src/views/forms/login.vue +++ b/src/views/forms/login.vue @@ -18,11 +18,13 @@