szurubooru/client/css/posts.styl
2016-06-04 12:32:42 +02:00

150 lines
3.8 KiB
Stylus

@import colors
.post-list
ul
list-style-type: none
margin: 0
padding: 0
display: flex
align-content: flex-end
flex-wrap: wrap
margin: 0 -0.25em
li
position: relative
flex-grow: 1
margin: 0 0.25em 0.5em 0.25em
display: inline-block
text-align: left
min-width: 10em
width: 12vw
&:not(.flexbox-dummy)
min-height: 7.5em
height: 9vw
a
display: inline-block
width: 100%
height: 100%
line-height: 80%
font-size: 80%
color: white
outline-offset: -3px
box-shadow: 0 0 0 1px rgba(0,0,0,0.2)
.type, .stats
position: absolute
bottom: 0.5em
padding: 0.33em 0.5em
background: rgba(0,0,0,0.5)
height: 1em
.type
float: left
left: 0.5em
&[data-type=image]
display: none
.stats
float: right
right: 0.5em
text-align: right
i
margin-right: 0.25em
.icon:not(:first-of-type)
margin-left: 1em
.thumbnail
background-position: 50% 30%
width: 100%
height: 100%
margin: 0
outline-offset: -3px
&:hover
background: $main-color
.thumbnail
opacity: .9
a
box-shadow: 0 0 0 1px $main-color
a, .thumbnail
outline: 3px solid $main-color
.post-list-header
text-align: left
form
width: auto
input[name=search-text]
width: 25em
max-width: 90vw
.append
font-size: 0.95em
color: $inactive-link-color
.safety
&.safety-safe
background-color: #88D488
border-color: @background-color
&.disabled
background-color: alpha(@background-color, 0.15)
&.safety-sketchy
background-color: #F3D75F
border-color: @background-color
&.disabled
background-color: alpha(@background-color, 0.15)
&.safety-unsafe
background-color: #F3985F
border-color: @background-color
&.disabled
background-color: alpha(@background-color, 0.15)
.post-container
text-align: center
.post-content
text-align: left
margin: 0 auto
max-height: 100%
max-width: 100%
object-fit: contain
position: relative
img, object, video, .post-overlay
position: absolute
height: 100%
width: 100%
left: 0
right: 0
top: 0
bottom: 0
.post-overlay>*
position: absolute
left: 0
right: 0
top: 0
bottom: 0
width: 100%
height: 100%
.notes
stroke-width: 1px
polygon
fill: $note-overlay-background-color
stroke: $note-overlay-border-color
.note-text
position: absolute
max-width: 22.5em
margin-top: -0.5em
display: none
&>.wrapper
background: $note-text-background-color
padding: 0.5em
border: 1px solid $note-text-border-color
color: $note-text-text-color
margin-top: 1em
p:last-of-type
margin-bottom: 0
p:first-of-type
margin-top: 0