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

View file

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

View file

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