index.html 3.07 KB
Newer Older
1
<%page expression_filter="h"/>
Matthew Mongeau committed
2
<%inherit file="main.html" />
3
<%namespace name='static' file='static_content.html'/>
4 5 6
<%!
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
7

8
from openedx.core.djangolib.markup import HTML, Text
9 10
%>

11 12 13 14 15 16 17
<main id="main" aria-label="Content" tabindex="-1">
    <section class="home">
      <header>
        <div class="outer-wrapper">
          <div class="title">
            <div class="heading-group">
              % if homepage_overlay_html:
18
                ${homepage_overlay_html | n, decode.utf8}
19
              % else:
20 21 22
                  ## Translators: 'Open edX' is a registered trademark, please keep this untranslated. See http://open.edx.org for more information.
                  <h1>${Text(_(u"Welcome to the Open edX{registered_trademark} platform!")).format(registered_trademark=HTML("<sup style='font-size: 65%'>&reg;</sup>"))}</h1>
                  ## Translators: 'Open edX' is a registered trademark, please keep this untranslated. See http://open.edx.org for more information.
23 24 25 26 27 28 29 30 31 32
                  <p>${_("It works! This is the default homepage for this Open edX instance.")}</p>
              % endif
            </div>
            % if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'):
              <div class="course-search">
                <form method="get" action="/courses">
                  <label><span class="sr">${_("Search for a course")}</span>
                    <input class="search-input" name="search_query" type="text" placeholder="${_("Search for a course")}"></input>
                  </label>
                  <button class="search-button" type="submit">
33
                    <span class="icon fa fa-search" aria-hidden="true"></span><span class="sr">${_("Search")}</span>
34 35 36 37
                  </button>
                </form>
              </div>
            % endif
38

39
          </div>
40

41 42 43 44 45 46 47 48 49 50 51
          % if show_homepage_promo_video:
            <a href="#video-modal" class="media" rel="leanModal">
              <div class="hero">
                <div class="play-intro"></div>
              </div>
            </a>
          % endif
        </div>

      </header>
      <%include file="${courses_list}" />
52

53 54
    </section>
</main>
55

56 57 58
% if show_homepage_promo_video:
  <section id="video-modal" class="modal home-page-video-modal video-modal">
    <div class="inner-wrapper">
59
      <iframe title="YouTube Video" width="640" height="360" src="//www.youtube.com/embed/${homepage_promo_video_youtube_id}?showinfo=0" frameborder="0" allowfullscreen></iframe>
60 61 62
    </div>
  </section>
% endif
ichuang committed
63

64
<%block name="js_extra">
65
   <script type="text/javascript">
66 67 68 69 70 71 72 73
      $(window).load(function() {
         if(getParameterByName('next')) {
              $('#login').trigger("click");
         }
      })
   </script>
</%block>

ichuang committed
74
% if show_signup_immediately is not UNDEFINED:
75 76
  ## NOTE: This won't work in production, because anonymous views are cached, so it will
  ## show either with or without this extra js for 3 minutes at a time.
ichuang committed
77
<script type="text/javascript">
78
  $(window).load(function() {$('#signup_action').trigger("click");});
79
</script>
80
% endif