def init(self): self.create_template_bridge() Theme.init_themes(self.confdir, self.config.html_theme_path, warn=self.warn) self.theme = Theme('default') self.templates.init(self, self.theme)
def init_templates(self): Theme.init_themes(self) themename, themeoptions = self.get_theme_config() self.theme = Theme(themename) self.theme_options = themeoptions.copy() self.create_template_bridge() self.templates.init(self, self.theme)
def init_multi_templates(self): self.multithemes = {} for key, (themename, themeoptions) in self.config.html_multi_themes.items(): matcher = re.compile(key) theme, options = (Theme(themename), themeoptions.copy()) templates = create_template_bridge(self) templates.init(self, theme) self.multithemes[matcher] = theme, options, templates
def init_templates(self): Theme.init_themes(self.confdir, self.config.html_theme_path, warn=self.warn) themename, themeoptions = self.get_theme_config() self.theme = Theme(themename) self.theme_options = themeoptions.copy() self.create_template_bridge() self.templates.init(self, self.theme)
def apply_theme(self, themename, themeoptions): """Apply a new theme to the document. This will store the existing theme configuration and apply a new one. """ # push the existing values onto the Stack self._theme_stack.append((self.theme, self.theme_options)) self.theme = Theme(themename) self.theme_options = themeoptions.copy() self.templates.init(self, self.theme) self._additional_themes.append(self.theme)
def create(self, themename): return Theme(themename)
def init(self): # type: () -> None self.create_template_bridge() Theme.init_themes(self.confdir, self.config.html_theme_path) self.theme = Theme('default') self.templates.init(self, self.theme)
def init_templates(self): Theme.init_themes(self) self.theme = Theme(self.config.html_theme) self.create_template_bridge() self.templates.init(self, self.theme)
def init(self): self.create_template_bridge() Theme.init_themes(self) self.theme = Theme('default') self.templates.init(self, self.theme)