This section describes the interaction between handlers and themes.
+To render multiple handlers:
+ from shinypress.theme import Theme
+ with open('my-theme.json', 'rb') as f:
+ theme = Theme.from_json(f)
+ surf = cairo.PDFSurface('slides.pdf', 1024, 768)
+ ctx = cairo.Context(surf)
+ for handler in handlers:
+ slide_layouts = handler.layout(theme)
+ for template, blocks in slide_layouts:
+ theme.render(template, blocks)
+Themes are responsible for deciding where the handlers should draw their blocks.
+.. automodule:: shinypress.theme