diff --git a/app/views/shared/_stream_element.mobile.haml b/app/views/shared/_stream_element.mobile.haml index cbe35079b..0b154a7b7 100644 --- a/app/views/shared/_stream_element.mobile.haml +++ b/app/views/shared/_stream_element.mobile.haml @@ -3,6 +3,12 @@ -# the COPYRIGHT file. .stream_element{:data=>{:guid=>post.id}} + - if post.respond_to?(:nsfw?) && post.nsfw? + .shield_wrapper + .shield + = t("javascripts.stream.nsfw") + = link_to t('javascripts.stream.show'), '#' + - if post.is_a?(Reshare) = render 'reshares/reshare', :reshare => post, :post => post.root diff --git a/public/javascripts/mobile.js b/public/javascripts/mobile.js index 0bcf0d02d..554c0f319 100644 --- a/public/javascripts/mobile.js +++ b/public/javascripts/mobile.js @@ -1,5 +1,8 @@ $(document).ready(function(){ + $('.shield a').click(function(){ + $(this).parents('.shield_wrapper').remove(); + }); var showLoader = function(link){ link.addClass('loading'); }; diff --git a/public/stylesheets/sass/mobile.scss b/public/stylesheets/sass/mobile.scss index a49eb9bbe..86a366c23 100644 --- a/public/stylesheets/sass/mobile.scss +++ b/public/stylesheets/sass/mobile.scss @@ -296,7 +296,21 @@ body { margin: 10px { top: 10px; bottom: 0; }; - padding: 0 !important; } + padding: 0 !important; +} +.shield{ + padding: 10px; + font-size: larger; + } + +.shield_wrapper{ + height: 100%; + width: 100%; + background-color: grey; + position: absolute; + border-radius: 5px; + z-index: 2; +} .new_comment { padding: 10px; @@ -558,7 +572,7 @@ footer { .bottom_bar { @include border-radius(0, 0, 5px, 5px); box-shadow: inset 0 2px 5px -3px #999; - + z-index: 3; display: block; position: relative; padding: 10px;