<%include file="_style.tmpl"/> <%block name="extra_links"/> <%include file="_scripts.tmpl"/> <%block name="extra_scripts"/> ${extra_head_data} ${template_hooks['extra_head']()}
<%include file="_menu.tmpl"/>
## This allows inheriting templates to define a def named header_image that outputs ## an URL to an image to use as the background for the title. See post.tmpl for an example. <% header_image_url = None %> % if hasattr(self, 'header_image'): ## Capture the output of the def and save it in a variable so it can be used multiple times easily. <% header_image_url = capture(self.header_image).strip() %> % endif ## If there is no header_image_url set and the page title is the same as the blog title ## then show the header image url defined in GLOBAL_CONTEXT blog_header_image variable. ## The idea here is that if the page title is your blog title, then the header image should be your blog image. % if not header_image_url and capture(self.page_title) == blog_title: <% header_image_url = blog_header_image %> % endif
% if header_image_url:
## Duplicating the title in the yp-header-background and the yp-header ## allows the background image to resize to fit the title automatically.

${self.page_title()}

<%block name="subtitle"/>

${template_hooks['page_header']()}
## Duplicating the yp-header-background with yp-header-background--blur ## allows a blurred header image while keeping straight edges of the non-blurred version ## on the border. This should not cause extra network trips because it's the same image URL

${self.page_title()}

${self.subtitle()}

${template_hooks['page_header']()}
% else: ## Only place a border at the bottom of the header if there is no header image
% endif

${self.page_title()}

${self.subtitle()}

${template_hooks['page_header']()}
${next.body()}
<%include file="_footer.tmpl"/>
${body_end} ${template_hooks['body_end']()}