From 79624db06fde3bca2574d245ff06bb560291c569 Mon Sep 17 00:00:00 2001 From: Chad Birch Date: Tue, 18 Jun 2013 12:32:36 -0600 Subject: [PATCH] Add "golden tikkit" style for messages --- r2/r2/models/builder.py | 2 +- r2/r2/public/static/css/reddit.less | 77 +++++++++++++++++++++++++ r2/r2/public/static/gold/tikkit-bg.png | Bin 0 -> 1031 bytes r2/r2/templates/message.html | 6 +- 4 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 r2/r2/public/static/gold/tikkit-bg.png diff --git a/r2/r2/models/builder.py b/r2/r2/models/builder.py index 8726cb00d..97b0a582e 100755 --- a/r2/r2/models/builder.py +++ b/r2/r2/models/builder.py @@ -137,7 +137,7 @@ class Builder(object): if hasattr(item, "distinguished"): if item.distinguished == 'yes': w.distinguished = 'moderator' - elif item.distinguished in ('admin', 'special'): + elif item.distinguished in ('admin', 'special', 'gold'): w.distinguished = item.distinguished try: diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index 489a59518..1729af670 100755 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -1802,6 +1802,83 @@ textarea.gray { color: gray; } .message .subject { font-weight: bold; font-size: larger; } +.message.gold { + font-family: "Bitstream Charter", "Hoefler Text", "Palatino Linotype", + "Book Antiqua", Palatino, georgia, garamond, FreeSerif, serif; + background: url(../gold/tikkit-bg.png); + max-width: 80em; + text-align: center; + padding: 20px; + border-radius: 4px; + border: 1px solid #555; + + .insignia { + float: left; + margin: 6em 20px 0 20px; + } + + .subject { + font-size: 2.6em; + line-height: 1.5em; + text-shadow: -1px -1px 0px rgba(255, 255, 255, 0.8); + } + + .tagline, .correspondent, .expand-btn, .unread-button, .block-button, .report-button, ul.buttons li.first { + display: none; + } + + .entry { + margin: 0; + border: 0; + } + + .md { + margin: 0; + margin-bottom: 10px; + padding: 15px; + max-width: 100%; + text-shadow: 0 0 2px #fff; + border: 0 dashed #000; + border-width: 1px 0; + } + + .md blockquote { + border: 0; + font-size: 0.7em; + font-style: italic; + } + + .md p { + font-size: 1.2em; + line-height: 1.4em; + } + + .usertext-edit { + margin: 0 auto; + } + + .usertext-buttons { + text-align: left; + } + + ul.buttons li a { + font-size: 2em; + text-shadow: 0 0 3px #fff; + color: #7a5d0e; + } + + ul.buttons, ul.buttons li { + margin: 0; + padding: 0; + } + + &.new > .entry { + background-color: transparent; + border: 0; + padding: 0; + } +} + .clippy img { float: left; } diff --git a/r2/r2/public/static/gold/tikkit-bg.png b/r2/r2/public/static/gold/tikkit-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..aa26fc53ef85f3f77c9885834d1371b1e6121dbd GIT binary patch literal 1031 zcmV+i1o-=jP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv000AaNkljt#|% z1uH11SP>h=3U(!g5K0mt5Fj*BKuzzx_Z|rN;ClRxxgPQWkB;#@+&S*Z&AsRBz1Lbt zRlAmut~(dpR0XOoxS3SFdnu{9@D@@{;jN^aJ-1Qh+ex)WcaUoLE~A`_m)C;oiti-V z?YoO2-%YCDe-Ektz`YdtK2pQM`zi7YQbWlKQe(*jq{h+*NsVO>k($aLCN&*;gd(pb zH6MPI)O_SIioA-{T)v9bQvNup<>(U>`AJgiv8PC_6;D&-XGm?wS5xF?No^;dBekD= zo^q~yp&iswxrWqn>P3qD5~=g_%cRaTuTbPyNnK}OqsVJXUFX)4y3eg6b^rc4sr&pJ zq@MHZNj-mTpvZ5MdjEWj)O+D=ioB83dvPPF@8Ub8zDw^?{yk};{Rh%S$Bz{GC(>l+ z&!ow&Unu3N?q5k$J-<=pU8L#W0*btwG~HK7n(5m^n&~eh%?uQgW(W3?W(SKY@;=hs z(0=5bl_+g5Cgmh)1oFX43U70*aT9~XLElgFA z7N(Dru1=pIU7a~ekt<2pW>1l>&7G#mXGs6fpQZGE`g{9)|NrUx+4uL~mwvxpAHRO- z`r7sP`;+dU-Cw`|X?@uG@%5G0pRG?@zrMcH`nUbz`zP%$+kd`4)Bd&n?fXBS4|aYm zcHa2;*uqd-+sQQ^WW-&*Na*2vukWe;TYupFL+UTA|M31K^)J@nc>k07Bk!NAzw-Vo^=H<t`Fxe;FPqPNeoOP6&3`^0ruot4OP@c}d}{Nn&$ns*wfUICbG%-B-nRMN=l3+< z+x+j(2h#Hcd%nPj5Api?pJ&|Y=Oh1r-i>_T^dHw~)^4VT))oK&002ovPDHLkV1mH~ BDaQZ+ literal 0 HcmV?d00001 diff --git a/r2/r2/templates/message.html b/r2/r2/templates/message.html index 185377739..3cc2369da 100644 --- a/r2/r2/templates/message.html +++ b/r2/r2/templates/message.html @@ -24,6 +24,7 @@ from r2.lib.filters import safemarkdown from r2.lib.pages.things import MessageButtons from r2.lib.pages import WrappedUser + from r2.lib.template_helpers import static %> <%inherit file="comment_skeleton.html"/> <%namespace file="utils.html" import="thing_timestamp" /> @@ -38,7 +39,7 @@ <%def name="thing_css_class(what)" buffered="True"> -${parent.thing_css_class(what)} ${"new" if thing.new else ""} ${"was-comment" if thing.was_comment else ""} ${"recipient" if thing.recipient else ""} ${"message-reply" if getattr(thing, "is_child", False) else ""} ${"message-parent" if getattr(thing, "is_parent", False) else ""} ${"focal" if getattr(thing, "focal", False) else ""} +${parent.thing_css_class(what)} ${"new" if thing.new else ""} ${"was-comment" if thing.was_comment else ""} ${"recipient" if thing.recipient else ""} ${"message-reply" if getattr(thing, "is_child", False) else ""} ${"message-parent" if getattr(thing, "is_parent", False) else ""} ${"focal" if getattr(thing, "focal", False) else ""} ${"gold" if getattr(thing, "distinguished", "") == "gold" else ""} <%def name="tagline(collapse=False)"> @@ -108,6 +109,9 @@ ${parent.thing_css_class(what)} ${"new" if thing.new else ""} ${"was-comment" if <%def name="ParentDiv()"> + %if getattr(thing, 'distinguished', '') == 'gold': +
+ %endif ${self.subject()}