mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Add linkflair classes to body
This will allow styling comments pages differently depending on the linkflair of the submission.
This commit is contained in:
committed by
Neil Williams
parent
b6c457aa13
commit
e4f7d4e1fe
@@ -1204,6 +1204,10 @@ class LinkInfoPage(Reddit):
|
||||
def page_classes(self):
|
||||
classes = Reddit.page_classes(self)
|
||||
|
||||
if self.link.flair_css_class:
|
||||
for css_class in self.link.flair_css_class.split():
|
||||
classes.add('linkflair-' + css_class)
|
||||
|
||||
if c.user_is_loggedin and self.link.author == c.user:
|
||||
classes.add("post-submitter")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user