## mako
<%!
  import datetime

  from django.utils.translation import ugettext as _
  from branding.api import get_footer
  from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_enabled
%>
<% footer = get_footer(is_secure=is_secure) %>
<%namespace name='static' file='static_content.html'/>



## WARNING: These files are specific to edx.org and are not used in installations outside of that domain. Open edX users will want to use the file "footer.html" for any changes or overrides.
<footer id="footer-edx-v3" role="contentinfo" aria-label="${_("Page Footer")}"
  ## 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
>

% if uses_bootstrap:
<div class="container">
    <div class="row main-row"><!-- row -->
        <div class="col-xl-2 col-lg-12 col-md-3 col-sm-7 col-xs-10 flex-column">

                <div class="edx-footer-logo">
                    <a href="${marketing_link('ROOT')}">
                        <img alt="${_('edX Home Page')}" src="${footer['logo_image']}">
                    </a>
                </div>


                % if context.get('include_language_selector', footer_language_selector_is_enabled()):
                <%include file="${static.get_template_path('widgets/footer-language-selector.html')}"/>
                % endif
        </div>
        <div class="col-xl-6 col-lg-8 col-md-9 col-sm-6 col-xs-12 flex-column">
             <div class="row full-height">

                 <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-xs-12 border-left ">
                    <div class="row full-height">
                        <div class="ml-xl-0 col-lg-10 ml-lg-auto col-md-12 col-sm-10 mx-sm-auto full-height">
                          <ul class="list-unstyled clear-margins full-height">
                            <li class="widget-container widget_nav_menu">
                              <h3>edX</h3>
                                  <ul>
                                      % for link in footer["business_links"]:
                                      <li>
                                          <a href="${link['url']}">${link['title']}</a>
                                      </li>
                                      % endfor
                                  </ul>
                            </li>
                          </ul>
                        </div>
                    </div>
                 </div>
                 <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-xs-12 border-left ">
                        <div class="row full-height">
                            <div class="col-lg-12 col-md-12 col-sm-10 mx-sm-auto full-height">
                              <ul class="list-unstyled clear-margins full-height">
                                <li class="widget-container widget_nav_menu full-height">
                                  <h3>More Information</h3>
                                    <ul>
                                        % for link in footer["more_info_links"]:
                                        <li>
                                          <a href="${link['url']}">${link['title']}</a>
                                        </li>
                                        % endfor
                                    </ul>
                                </li>
                              </ul>
                            </div>
                          </div>
                </div>
                 <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-xs-12 border-left ">
                      <div class="row full-height">
                        <div class="col-lg-12 col-md-12 col-sm-10 mx-sm-auto full-height">
                          <ul class="list-unstyled clear-margins full-height">
                            <li class="widget-container widget_nav_menu">
                              <h3>Connect</h3>
                              <ul>
                                % for link in footer["connect_links"]:
                                <li>
                                  <a href="${link['url']}">${link['title']}</a>
                                </li>
                                % endfor
                              </ul>
                            </li>
                          </ul>
                        </div>
                      </div>
                 </div>


              ## The Open edX 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 Open edX.
            % if not hide_openedx_link and not hide_openedx_link is Undefined:
                  <div class="openedx-link">
                    <a href="${footer['openedx_link']['url']}" title="${footer['openedx_link']['title']}">
                      <img alt="${footer['openedx_link']['title']}" src="${footer['openedx_link']['image']}" width="140">
                    </a>
                  </div>
            % endif



            </div>
        </div>
        <div class="col-xl-4 col-lg-4 col-md-9 ml-md-auto  col-sm-6 flex-column border-left">
                <div class="row">
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-xs-12 social-app-links-div">
                      <div class="row">
                        <div class="col-lg-12 col-md-12">
                             <ul class="list-inline list-unstyled social">
                                    % for link in footer['social_links']:
                                    <li>
                                        <a href="${link['url']}" class="social-links external" title="${link['title']}" rel="noreferrer">
                                            <span class="icon fa ${link['icon-class']}" aria-hidden="true"></span>
                                            <span class="sr">${link['action']}</span>
                                        </a>
                                    </li>
                                    % endfor
                             </ul>
                            <ul class="list-inline list-unstyled app-links">
                                    % for link in footer['mobile_links']:
                                    <li>
                                        <a href="${link['url']}" class="app-link external">
                                            <img alt="${link['title']}" src="${link['image']}">
                                        </a>
                                    </li>
                                    % endfor
                            </ul>
                          <div>
                                ## \u00A9 is the copyright symbol.
                                ## \u2013 is the en-dash. It looks like a year, but it isn't.
                              <!--"EdX, Open edX, and MicroMasters are trademarks of edX Inc. registered in the U.S. and other countries-->
                              <p class="copyright">${_(
                                  u"\u00A9 2012\u2013{year} edX Inc. ").format(year=datetime.datetime.now().year)}
                                  <br/>
                                  ${_(

                                  u"EdX, Open edX, and MicroMasters are trademarks of edX Inc., "
                                  u"registered in the U.S. and other countries."
                                  )}
                                  ${u" | {icp}".format(icp=getattr(settings,'ICP_LICENSE')) if getattr(settings,'ICP_LICENSE',False) else ""}
                              </p>
                          </div>
                        </div>
                  </div>
                </div>

                </div>

        </div>
    </div>




</div>
% else:

    <h2 class="sr footer-about-title">${_("About edX")}</h2>
    <div class="footer-content-wrapper">
      <div class="footer-logo">
          <a href="${marketing_link('ROOT')}">
            <img alt="${_('edX Home Page')}" src="${footer['logo_image']}">
          </a>
      </div>

      <div class="site-details">
          <nav class="site-nav" aria-label="${_("About edX")}">
            <ul class="about-links">
                % for link in footer["navigation_links"]:
                <li class="list-item">
                  <a href="${link['url']}">${link['title']}</a>
                </li>
                % endfor
            </ul>
          </nav>
          <nav class="legal-notices" aria-label="${_("Legal")}">
            <ul class="legal-links">
              % for link in footer["legal_links"]:
                <li class="list-item">
                  <a href="${link['url']}">${link['title']}</a>
                </li>
              % endfor
            </ul>
          </nav>

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

          ## \u00A9 is the copyright symbol.
          ## \u2013 is the en-dash. It looks like a year, but it isn't.
          <p class="copyright">${_(
          u"\u00A9 2012\u2013{year} edX Inc.  All rights reserved except where noted.  "
          u"EdX, Open edX and the edX and Open edX logos are registered trademarks "
          u"or trademarks of edX Inc."
          ).format(year=datetime.datetime.now().year)}
          ${u" | {icp}".format(icp=getattr(settings,'ICP_LICENSE')) if getattr(settings,'ICP_LICENSE',False) else ""}
	  </p>

          ## The Open edX 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 Open edX.
          % if not hide_openedx_link:
          <div class="openedx-link">
            <a href="${footer['openedx_link']['url']}" title="${footer['openedx_link']['title']}">
              <img alt="${footer['openedx_link']['title']}" src="${footer['openedx_link']['image']}" width="140">
            </a>
          </div>
          % endif
      </div>

      <div class="external-links">
        <ul class="social-media-links">
            % for link in footer['social_links']:
            <li class="list-item">
                <a href="${link['url']}" class="sm-link external" title="${link['title']}" rel="noreferrer">
                    <span class="icon fa ${link['icon-class']}" aria-hidden="true"></span>
                    <span class="sr">${link['action']}</span>
                </a>
            </li>
            % endfor
        </ul>

        <ul class="mobile-app-links">
            % for link in footer['mobile_links']:
            <li class="list-item">
                <a href="${link['url']}" class="app-link external">
                    <img alt="${link['title']}" src="${link['image']}">
                </a>
            </li>
            % endfor
        </ul>
      </div>
    </div>


% endif

</footer>

% if include_dependencies:
  <%static:js group='base_vendor'/>
  <%static:css group='style-vendor'/>
  <%include file="widgets/segment-io.html" />
  <%include file="widgets/segment-io-footer.html" />
% endif

% if bidi == 'rtl':
<%static:css group='style-lms-footer-edx-rtl'/>
% else:
<%static:css group='style-lms-footer-edx'/>
% endif

% if footer_js_url:
  <script type="text/javascript" src="${footer_js_url}"></script>
% endif
