index.html 3.27 KB
Newer Older
1 2
<%! from django.utils.translation import ugettext as _ %>

3
<%! from django.core.urlresolvers import reverse %>
Matthew Mongeau committed
4
<%inherit file="main.html" />
5 6
<%namespace name='static' file='static_content.html'/>

7
<%! from microsite_configuration import microsite %>
8 9

<%
10
  homepage_overlay_html = microsite.get_value('homepage_overlay_html')
11

12 13 14
  ## To display a welcome video, change False to True, and add a YouTube ID (11 chars, eg "123456789xX") in the following line
  show_homepage_promo_video = microsite.get_value('show_homepage_promo_video', False)
  homepage_promo_video_youtube_id = microsite.get_value('homepage_promo_video_youtube_id', "your-youtube-id")
15

16
  show_partners = microsite.get_value('show_partners', True)
17 18 19

%>

20
<section class="home">
21
  <header>
22
    <div class="outer-wrapper">
23 24
      <div class="title">
        <hgroup>
25 26
          % if homepage_overlay_html:
            ${homepage_overlay_html}
27
          % else:
28 29
            % if self.stanford_theme_enabled():
              <h1>${_("Free courses from <strong>{university_name}</strong>").format(university_name="Stanford")}</h1>
30
              <h2>${_("For anyone, anywhere, anytime")}</h2>
31
            % else:
32
              ## Translators: 'Open edX' is a brand, please keep this untranslated. See http://openedx.org for more information.
33
              <h1>${_("Welcome to Open edX!")}</h1>
34 35
              ## Translators: 'Open edX' is a brand, please keep this untranslated. See http://openedx.org for more information.
              <h2>${_("It works! This is the default homepage for this Open edX instance.")}</h2>
36
            % endif
37
          % endif
38
        </hgroup>
39

40
      </div>
41

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

54
      % if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
55 56 57 58 59 60 61 62 63 64
        <section class="courses">
            <ul class="courses-listing">
            %for course in courses:
              <li class="courses-listing-item">
                <%include file="course.html" args="course=course" />
              </li>
            %endfor
            </ul>
        </section>
      % endif
65

66
    </section>
67
  </section>
68
</section>
69

70
<section id="video-modal" class="modal home-page-video-modal video-modal">
71
  <div class="inner-wrapper">
72
    <%
73
      youtube_video_id = homepage_promo_video_youtube_id
74 75 76
      if self.stanford_theme_enabled():
        youtube_video_id = "2gmreZObCY4"
    %>
77
    <iframe width="640" height="360" src="//www.youtube.com/embed/${youtube_video_id}?showinfo=0" frameborder="0" allowfullscreen></iframe>
78
  </div>
79
</section>
ichuang committed
80

81
<%block name="js_extra">
82
   <script type="text/javascript">
83 84 85 86 87 88 89 90
      $(window).load(function() {
         if(getParameterByName('next')) {
              $('#login').trigger("click");
         }
      })
   </script>
</%block>

ichuang committed
91
% if show_signup_immediately is not UNDEFINED:
92 93
  ## 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
94
<script type="text/javascript">
95
  $(window).load(function() {$('#signup_action').trigger("click");});
96
</script>
97
% endif