From 722116cebcd031151e1c2266586e0aebc0a3a4a1 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Sat, 25 Feb 2012 20:01:30 -0800 Subject: [PATCH] don't show nsfw posts without a shield in the viewer --- .../app/templates/post-viewer.handlebars | 11 +++++++ public/stylesheets/sass/new-templates.scss | 30 ++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/public/javascripts/app/templates/post-viewer.handlebars b/public/javascripts/app/templates/post-viewer.handlebars index dbde01a53..9f131d754 100644 --- a/public/javascripts/app/templates/post-viewer.handlebars +++ b/public/javascripts/app/templates/post-viewer.handlebars @@ -5,6 +5,17 @@
+ +{{#if nsfw}} +
+
+

+ This post is Not Safe For Work. +

+
+
+{{/if}} +
diff --git a/public/stylesheets/sass/new-templates.scss b/public/stylesheets/sass/new-templates.scss index 565174267..80b1b4e78 100644 --- a/public/stylesheets/sass/new-templates.scss +++ b/public/stylesheets/sass/new-templates.scss @@ -3,6 +3,8 @@ $light-grey: #999; $pane-width: 420px; +$large-type: 40px; + /* mixins */ @mixin center($orient:vertical) { display: -webkit-box; @@ -21,6 +23,13 @@ $pane-width: 420px; box-align: center; } +@mixin rotate($orient) { + -o-transform: rotate($orient); + -moz-transform: rotate($orient); + -ms-transform: rotate($orient); + -webkit-transform: rotate($orient); +} + @mixin box-shadow($left, $top, $blur, $color) { -webkit-box-shadow: $left $top $blur $color; -moz-box-shadow: $left $top $blur $color; @@ -186,7 +195,7 @@ $pane-width: 420px; { h1 { font-weight: bold; - font-size: 40px; + font-size: $large-type; } } @@ -610,6 +619,7 @@ body.idle { } } +#nsfw-post-content, #post-content { display: table; @@ -647,3 +657,21 @@ body.idle { right: 8px; top: 8px; } + +#nsfw-post-content { + @include opacity(0.95); +} + +#nsfw-shield { + height: 100%; + width: 100%; + background-image: url('../img/hatched-bg.jpg'); + background-transparency: url('../img/hatched-bg.jpg'); + + h2 { + @include rotate(-15deg); + + text-transform: uppercase; + color: #979893; + } +}