## The contents of this file are subject to the Common Public Attribution ## License Version 1.0. (the "License"); you may not use this file except in ## compliance with the License. You may obtain a copy of the License at ## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public ## License Version 1.1, but Sections 14 and 15 have been added to cover use of ## software over a computer network and provide for limited attribution for the ## Original Developer. In addition, Exhibit A has been modified to be ## consistent with Exhibit B. ## ## Software distributed under the License is distributed on an "AS IS" basis, ## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for ## the specific language governing rights and limitations under the License. ## ## The Original Code is reddit. ## ## The Original Developer is the Initial Developer. The Initial Developer of ## the Original Code is reddit Inc. ## ## All portions of the code written by reddit are Copyright (c) 2006-2012 ## reddit Inc. All Rights Reserved. ############################################################################### <%! from r2.lib.template_helpers import add_sr, static, join_urls, class_dict, get_domain from r2.lib.filters import unsafe from r2.lib.pages import SearchForm, ClickGadget, SideContentBox from r2.lib import tracking from pylons import request from r2.lib.strings import strings from r2.models import make_feedurl, Sub %> <%namespace file="login.html" import="login_panel, login_form"/> <%namespace file="framebuster.html" import="framebuster"/> <%namespace file="utils.html" import="tags, css_class"/> <%inherit file="base.html"/> <%def name="Title()"> %if thing.title: ${thing.title} %else: ${parent.Title()} %endif <%def name="pagemeta()"> %if hasattr(thing, "shortlink"): %endif %if thing.extension_handling: <% rss = add_sr(join_urls(request.path,'.rss')) if thing.extension_handling == "private": rss = make_feedurl(c.user, rss) %> %endif <%def name="stylesheet()"> %if c.lang_rtl: %if g.translator and request.get.get('css'): %endif %if c.site.stylesheet_rtl: %endif %else: %if c.site.stylesheet: %endif %endif %if c.can_apply_styles and c.allow_styles and c.site.stylesheet_contents: <% inline_stylesheet = ( len(c.site.stylesheet_contents) < 1024 and '<' not in c.site.stylesheet_contents) %> %if inline_stylesheet: ## for very simple stylesheets, we can just include them inline %else: %endif %endif %if getattr(thing, "additional_css", None): %endif <%def name="javascript()"> <% from r2.lib import js %> ${unsafe(js.use('jquery', 'reddit'))} % if c.deny_frames: % endif <%def name="javascript_run()"> reddit.cur_site = "${c.site._fullname if hasattr(c.site, '_fullname') else ''}"; <%def name="bodyHTML()"> <%include file="redditheader.html"/> %if thing.show_sidebar:
${sidebar(content = thing.rightbox())}
%endif %if thing.content: ##
##
${thing.content()}
%endif %if thing.footer: ${thing.footer} %if not c.user_is_loggedin and not g.read_only_mode: %if thing.enable_login_cover: %endif %endif %endif ${framebuster()} <%def name="sidebar(content=None)"> ${content}