client/posts: improve file dropper appearance

This commit is contained in:
rr- 2017-02-21 18:54:46 +01:00
parent 1e58899b03
commit d00d282bff
3 changed files with 18 additions and 17 deletions

View File

@ -245,11 +245,8 @@ input::-moz-focus-inner
* File dropper * File dropper
*/ */
.file-dropper-holder .file-dropper-holder
display: flex
flex-wrap: wrap
.file-dropper .file-dropper
display: block display: block
width: 100%
background: $window-color background: $window-color
border: 3px dashed #eee border: 3px dashed #eee
padding: 0.3em 0.5em padding: 0.3em 0.5em
@ -258,14 +255,16 @@ input::-moz-focus-inner
cursor: pointer cursor: pointer
overflow: hidden overflow: hidden
word-wrap: break-word word-wrap: break-word
input .url-holder
display: flex
margin-top: 0.5em margin-top: 0.5em
margin-right: 0.5em input, button
width: auto min-width: 0 /* firefox being sassy */
flex: 1 width: auto !important /* don't inherit anything weird */
button input
margin-top: 0.5em flex: 1
width: 8em button
margin-left: 0.5em
input[type=file]:disabled+.file-dropper input[type=file]:disabled+.file-dropper
cursor: default cursor: default

View File

@ -138,7 +138,7 @@
margin: 0 margin: 0
padding: 0 padding: 0
label label:not(.file-dropper)
margin-bottom: 0.3em margin-bottom: 0.3em
display: block display: block

View File

@ -14,11 +14,13 @@
<% } %> <% } %>
</label> </label>
<% if (ctx.allowUrls) { %> <% if (ctx.allowUrls) { %>
<input type='text' name='url' placeholder='Alternatively, paste an URL here.'/> <div class='url-holder'>
<% if (ctx.lock) { %> <input type='text' name='url' placeholder='Alternatively, paste an URL here.'/>
<button>Confirm</button> <% if (ctx.lock) { %>
<% } else { %> <button>Confirm</button>
<button>Add URL</button> <% } else { %>
<% } %> <button>Add URL</button>
<% } %>
</div>
<% } %> <% } %>
</div> </div>