add basic nsfw for mobile. fixes #2709
This commit is contained in:
parent
49f18d435a
commit
50e8e90066
3 changed files with 25 additions and 2 deletions
|
|
@ -3,6 +3,12 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
.stream_element{:data=>{:guid=>post.id}}
|
.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)
|
- if post.is_a?(Reshare)
|
||||||
= render 'reshares/reshare', :reshare => post, :post => post.root
|
= render 'reshares/reshare', :reshare => post, :post => post.root
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$('.shield a').click(function(){
|
||||||
|
$(this).parents('.shield_wrapper').remove();
|
||||||
|
});
|
||||||
var showLoader = function(link){
|
var showLoader = function(link){
|
||||||
link.addClass('loading');
|
link.addClass('loading');
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,21 @@ body {
|
||||||
margin: 10px {
|
margin: 10px {
|
||||||
top: 10px;
|
top: 10px;
|
||||||
bottom: 0; };
|
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 {
|
.new_comment {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
@ -558,7 +572,7 @@ footer {
|
||||||
.bottom_bar {
|
.bottom_bar {
|
||||||
@include border-radius(0, 0, 5px, 5px);
|
@include border-radius(0, 0, 5px, 5px);
|
||||||
box-shadow: inset 0 2px 5px -3px #999;
|
box-shadow: inset 0 2px 5px -3px #999;
|
||||||
|
z-index: 3;
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue