From 15bbb8217e1324c65e582fe2f38972d0695b943b Mon Sep 17 00:00:00 2001
From: Max Goodman
Date: Wed, 22 Feb 2012 13:08:45 -0800
Subject: [PATCH] Move compact NSFW badge to the title line & add boxy style.
---
r2/r2/public/static/css/compact.css | 2 +-
r2/r2/public/static/css/compact.scss | 7 ++++++-
r2/r2/templates/link.compact | 14 +++++++-------
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/r2/r2/public/static/css/compact.css b/r2/r2/public/static/css/compact.css
index 93fb7c928..70ce9e96f 100644
--- a/r2/r2/public/static/css/compact.css
+++ b/r2/r2/public/static/css/compact.css
@@ -213,7 +213,7 @@ body[orient="landscape"] > #topbar > h1 { margin-left: -125px; width: 250px; }
.link > .thing_options { font-size: x-small; margin: none; display: block; float: left; clear: left; margin: 2px 0px 0px 10px; }
-.nsfw-warning { color: #ac3939; text-decoration: none; border: 0 none; }
+.nsfw-warning { -moz-border-radius: 3px; -webkit-border-radius: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; -khtml-border-radius: 3px; border-radius: 3px; color: #ac3939; text-decoration: none; font-weight: normal; font-size: 9px; margin-left: 5px; padding: 0 2px; border: 1px solid #d27979 !important; }
/* Comment count */
.commentcount { float: right; margin: 5px; width: 45px; text-align: right; }
diff --git a/r2/r2/public/static/css/compact.scss b/r2/r2/public/static/css/compact.scss
index 68f615713..bf25f1e3b 100644
--- a/r2/r2/public/static/css/compact.scss
+++ b/r2/r2/public/static/css/compact.scss
@@ -684,9 +684,14 @@ body[orient="landscape"] > #topbar > h1 {
}
.nsfw-warning {
+ @include border-radius(3px);
color: #ac3939;
text-decoration: none;
- border: 0 none;
+ font-weight: normal;
+ font-size: 9px;
+ margin-left: 5px;
+ padding: 0 2px;
+ border: 1px solid #d27979 !important;
}
/* Comment count */
diff --git a/r2/r2/templates/link.compact b/r2/r2/templates/link.compact
index 8d70a793b..14125e456 100644
--- a/r2/r2/templates/link.compact
+++ b/r2/r2/templates/link.compact
@@ -75,6 +75,13 @@
(${thing.domain})
%endif
+ %if thing.nsfw:
+
+
+ ${_("NSFW")}
+
+
+ %endif
<%
video_hide = thing.link_child and thing.link_child.css_style.strip(' ') == 'video'
@@ -85,13 +92,6 @@
${thing.link_child.css_style}">
%endif
- %if thing.nsfw:
-
-
- ${_("NSFW")}
-
-
- %endif
${tagline()}