From eaaefedf50ad4926f2a83649fb6a8b5e72163ee9 Mon Sep 17 00:00:00 2001 From: Flaburgan Date: Wed, 18 May 2016 17:58:39 +0200 Subject: [PATCH] Set fixed height of tile in photos stream, fix #6809 --- app/assets/stylesheets/stream_element.scss | 31 +++++++- app/assets/templates/photo_tpl.jst.hbs | 8 +- db/schema.rb | 88 ++++++++++++++-------- 3 files changed, 86 insertions(+), 41 deletions(-) diff --git a/app/assets/stylesheets/stream_element.scss b/app/assets/stylesheets/stream_element.scss index 60043718009..b72edee6a5e 100644 --- a/app/assets/stylesheets/stream_element.scss +++ b/app/assets/stylesheets/stream_element.scss @@ -18,7 +18,6 @@ overflow: inherit; > .control-icons { border-radius: 4px; - padding-left: 5px; position: absolute; right: 6px; text-align: center; @@ -28,12 +27,36 @@ &:hover > .bd > .control-icons { background: $white; } } .thumbnail { - padding: 10px; - margin: 0 0 15px; background: $white; border-radius: 0; box-shadow: $card-shadow; - img.big_photo { max-height: 200px; } + height: 240px; + margin: 0 0 15px; + padding: 10px; + + // Vertically align the image + text-align: center; + white-space: nowrap; + + &:hover, + &:focus, + &:active { + border-color: $light-grey; + } + + &::before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + } + + .big-photo { + display: inline; + max-height: 200px; + vertical-align: middle; + margin-left: -4px; + } } } diff --git a/app/assets/templates/photo_tpl.jst.hbs b/app/assets/templates/photo_tpl.jst.hbs index 7f57ad398a8..b648f2be957 100644 --- a/app/assets/templates/photo_tpl.jst.hbs +++ b/app/assets/templates/photo_tpl.jst.hbs @@ -20,11 +20,9 @@ {{/if}} -
- - - -
+ + +