## coding=utf-8
<%namespace name='static' file='static_content.html'/>
<%!
from django.core.urlresolvers import reverse
from django.utils.http import urlquote_plus
from django.utils.translation import ugettext as _
from django.utils.translation import get_language_bidi
from microsite_configuration import microsite
from microsite_configuration import page_title_breadcrumbs
from branding import api as branding_api
%>
## Define a couple of helper functions to make life easier when
## embedding theme conditionals into templates. All inheriting
## templates have access to these functions, and we can import these
## into non-inheriting templates via the %namespace tag.
<%def name="theme_enabled()">
<% return settings.FEATURES.get("USE_CUSTOM_THEME", False) %>
%def>
<%def name="is_microsite()">
<% return microsite.is_request_in_microsite() %>
%def>
<%def name="stanford_theme_enabled()">
<%
if not theme_enabled():
return False
return getattr(settings, "THEME_NAME", None) == "stanford"
%>
%def>
## this needs to be here to prevent the title from mysteriously appearing in the body, in one case
<%def name="pagetitle()" />
<%block name="title">
${page_title_breadcrumbs(self.pagetitle())}
%block>
% if not allow_iframing:
% endif
<%static:css group='style-vendor'/>
## We could do <%static:css group='style-main'/>, but that's only useful
## if the group contains multiple files, and the 'style-main' group doesn't.
## Instead, we'll construct this element manually, to improve clarity.
## When nothing in the system is referencing the 'style-main' group, it can
## be removed from the environment file.
<%
application_css_path = "css/lms-main{rtl}.css".format(
rtl="-rtl" if get_language_bidi() else "",
)
%>
% if disable_courseware_js:
<%static:js group='base_vendor'/>
<%static:js group='base_application'/>
% else:
<%static:js group='main_vendor'/>
<%static:js group='application'/>
% endif
% if not disable_courseware_js:
<%static:js group='module-js'/>
% endif
<%block name="headextra"/>
<%static:optional_include_mako file="head-extra.html" with_microsite="True" />
<%include file="widgets/optimizely.html" />
<%include file="widgets/segment-io.html" />
<% ga_acct = microsite.get_value("GOOGLE_ANALYTICS_ACCOUNT", settings.GOOGLE_ANALYTICS_ACCOUNT) %>
% if ga_acct:
% endif
<%static:optional_include_mako file="body-initial.html" with_microsite="True" />
% if not disable_window_wrap: