From 1ded90841b72c1f68e5fd5eaf518852446bd4c47 Mon Sep 17 00:00:00 2001 From: Alex Tharp Date: Fri, 17 Jun 2016 16:36:24 -0500 Subject: [PATCH] Fix lack of spacing between newsfeed cards --- app/assets/stylesheets/authentication.scss | 4 ++++ app/views/authentication/sessions/new.html.haml | 2 +- app/views/partials/authentication/_news.html.haml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/authentication.scss b/app/assets/stylesheets/authentication.scss index bfff767ee..e0ad9cdf0 100644 --- a/app/assets/stylesheets/authentication.scss +++ b/app/assets/stylesheets/authentication.scss @@ -1,6 +1,10 @@ @import 'material'; @import 'bourbon'; +.news section:not(:last-of-type) { + margin-bottom: 16px; +} + .section__featured-media { background-size: cover; background-repeat: no-repeat; diff --git a/app/views/authentication/sessions/new.html.haml b/app/views/authentication/sessions/new.html.haml index 78d93dbe2..80fa7979b 100644 --- a/app/views/authentication/sessions/new.html.haml +++ b/app/views/authentication/sessions/new.html.haml @@ -2,5 +2,5 @@ .mdl-cell.mdl-cell--4-col = render 'partials/authentication/login_tabs' - if @news_feed_posts - .mdl-cell.mdl-cell--8-col + .mdl-cell.mdl-cell--8-col.news = render 'partials/authentication/news' diff --git a/app/views/partials/authentication/_news.html.haml b/app/views/partials/authentication/_news.html.haml index eebedc26e..e11d52de7 100644 --- a/app/views/partials/authentication/_news.html.haml +++ b/app/views/partials/authentication/_news.html.haml @@ -1,5 +1,5 @@ - @news_feed_posts.each do |post| - %section.section--center.mdl-grid.mdl-grid--no-spacing.mdl-shadow--2dp + %section.mdl-grid.mdl-grid--no-spacing.mdl-shadow--2dp - if post.tile_media_id? %header.section__featured-media.mdl-cell.mdl-cell--3-col-desktop.mdl-cell--2-col-tablet.mdl-cell--4-col-phone{style: "background-image: url(#{post.tile_media.url})"} .mdl-card.mdl-cell.mdl-cell--9-col-desktop.mdl-cell--6-col-tablet.mdl-cell--4-col-phone