Skip to content

Instantly share code, notes, and snippets.

@cacheleocode
Created October 17, 2018 05:03
Show Gist options
  • Save cacheleocode/6ae3fcb66b66cb3cfccea74f5526a33d to your computer and use it in GitHub Desktop.
Save cacheleocode/6ae3fcb66b66cb3cfccea74f5526a33d to your computer and use it in GitHub Desktop.
def classes(self):
"""
Quick detection to see if it's a chronicle, since we don't differentiate any other way as of now. Should be expanded to all chronicle articles, not just current series. This was initially to allow for conditional styling (block level elements such as blockquote at the beginning of article weren't displaying correctly with "star" voting block)
"""
classes = []
if self.is_current_series:
classes.append("chronicle")
return classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment