From d8ef9dba2452d4a2b6e508f7981e2886642aa78b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 9 Apr 2015 02:22:06 -0400 Subject: add images button and styling shit --- themes/okadmin/public/css/main.css | 33 +++++++++++++++++++++++++ themes/okadmin/templates/partials/inputs.liquid | 30 +++++++++++++++------- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index d67d312..8e01e49 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -202,15 +202,48 @@ label { margin-top: 1.0em; } +.main.resource form ol { + margin: 0; + padding: 0; +} +.main.resource form li { + list-style-type: none; +} .main.resource form img { width: 10em; max-height: 10em; border: 0; + cursor: -webkit-grab; + cursor: grab; } .main.resource form textarea.caption { width: 15em; height: 9em; } +.add-image-button { + background: #ddd; + clear: left; + text-align: left; + padding: 10px; + width: 15em; + position: relative; +} +.add-image-button:hover { + background: #def; +} +.add-image-button input[type=file] { + opacity: 0; + position: absolute; + top: 0; left: 0; + width: 100%; height: 100%; + cursor: pointer; +} +li.image-element:hover .remove-image { + display: block; +} +.remove-image { + display: none; +} .template { display: none; diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 25aef30..dab6243 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -39,18 +39,30 @@ {% elsif type == 'captioned-image-list' %} -
    - {% for image in spec.value %} +
    +
      + {% for image in spec.value %} +
    1. + + + {{image.caption}} + +
    2. + {% endfor %} +
    +
    + + + Add images +
    + +
    {% else %}

    Admin template doesn't support '{{type}}' properties!

    {% endif %} -- cgit v1.2.3-70-g09d2