footer.html 3.48 KB
Newer Older
1
## mako
2
<%page expression_filter="h"/>
3 4 5 6
<%!
  from django.core.urlresolvers import reverse
  from django.utils.translation import ugettext as _
  from branding.api import get_footer
7
  from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_enabled
8 9
%>
<% footer = get_footer(is_secure=is_secure) %>
10 11
<%namespace name='static' file='static_content.html'/>

12
<div class="wrapper wrapper-footer">
13
  <footer id="footer-openedx" class="grid-container"
14 15 16 17 18 19 20
    ## When rendering the footer through the branding API,
    ## the direction may not be set on the parent element,
    ## so we set it here.
    % if bidi:
      dir=${bidi}
    % endif
  >
21
    <div class="colophon">
Ahsan Ulhaq committed
22
      <nav class="nav-colophon" aria-label="${_('About')}">
23 24 25 26
        <ol>
            % for item_num, link in enumerate(footer['navigation_links'], start=1):
            <li class="nav-colophon-0${item_num}">
              <a id="${link['name']}" href="${link['url']}">${link['title']}</a>
27
            </li>
28 29
            % endfor
        </ol>
30
      </nav>
31

32 33
      % if context.get('include_language_selector', footer_language_selector_is_enabled()):
          <%include file="${static.get_template_path('widgets/footer-language-selector.html')}"/>
34 35
      % endif

36 37 38
      <div class="wrapper-logo">
        <p>
          <a href="/">
39 40 41 42 43 44 45 46
            ## The default logo is a placeholder.
            ## You can either replace this link entirely or update
            ## the FOOTER_ORGANIZATION_IMAGE in Django settings.
            ## If you customize FOOTER_ORGANIZATION_IMAGE, then the image
            ## can be included in the footer on other sites
            ## (e.g. a blog or marketing front-end) to provide a consistent
            ## user experience.  See the branding app for details.
            <img alt="organization logo" src="${footer['logo_image']}">
47 48
          </a>
        </p>
49
      </div>
50

51
      ## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
52
      <p class="copyright">${footer['copyright']} ${u" | {icp}".format(icp=getattr(settings,'ICP_LICENSE')) if getattr(settings,'ICP_LICENSE',False) else ""}</p>
53

David Baumgold committed
54 55
      <nav class="nav-legal" aria-label="${_('Legal')}">
        <ul>
56 57 58 59 60
          % for item_num, link in enumerate(footer['legal_links'], start=1):
            <li class="nav-legal-0${item_num}">
              <a href="${link['url']}">${link['title']}</a>
            </li>
          % endfor
David Baumgold committed
61 62
        </ul>
      </nav>
63
    </div>
64

65 66 67 68 69
    ## Please leave this link and use one of the logos provided
    ## The OpenEdX link may be hidden when this view is served
    ## through an API to partner sites (such as marketing sites or blogs),
    ## which are not technically powered by OpenEdX.
    % if not hide_openedx_link:
70
    <div class="footer-about-openedx">
71
      <p>
72 73
        <a href="${footer['openedx_link']['url']}">
          <img src="${footer['openedx_link']['image']}" alt="${footer['openedx_link']['title']}" width="140" />
74 75
        </a>
      </p>
76
    </div>
77
    % endif
78
  </footer>
79
</div>
80 81 82 83
% if include_dependencies:
  <%static:js group='base_vendor'/>
  <%static:css group='style-vendor'/>
  <%include file="widgets/segment-io.html" />
84
  <%include file="widgets/segment-io-footer.html" />
85 86 87 88 89 90
% endif
% if footer_css_urls:
  % for url in footer_css_urls:
    <link rel="stylesheet" type="text/css" href="${url}"></link>
  % endfor
% endif
91 92 93
% if settings.FEATURES.get('ENABLE_COOKIE_CONSENT', False):
  <%include file="widgets/cookie-consent.html" />
% endif