index.html 3.94 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
  show_homepage_promo_video = microsite.get_value('show_homepage_promo_video', True)
  homepage_promo_video_youtube_id = microsite.get_value('homepage_promo_video_youtube_id', "XNaiOGxWeto")
14

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

%>

19
<section class="home">
20
  <header>
21
    <div class="outer-wrapper">
22 23
      <div class="title">
        <hgroup>
24 25
          % if homepage_overlay_html:
            ${homepage_overlay_html}
26
          % else:
27 28 29 30 31 32
            % if self.stanford_theme_enabled():
              <h1>${_("Free courses from <strong>{university_name}</strong>").format(university_name="Stanford")}</h1>
            % else:
              <h1>${_("The Future of Online Education")}</h1>
            % endif
            <h2>${_("For anyone, anywhere, anytime")}</h2>
33
          % endif
34
        </hgroup>
35

36 37 38 39
        ## Disable social buttons for non-edX sites
        % if not self.theme_enabled():
          <section class="actions">
            <div class="main-cta">
40
              <a href="#signup-modal" id="signup_action" class="find-courses" rel="leanModal">${_("Sign Up")}</a>
41
            </div>
42

43 44
            <div class="secondary-actions">
              <div class="social-sharing">
45
                <div class="sharing-message">${_("Stay up to date with all {platform_name} has to offer!").format(platform_name=settings.PLATFORM_NAME)}</div>
46 47 48 49 50 51 52 53 54 55
                <a href="https://twitter.com/edXOnline" class="share">
                  <img src="${static.url('images/social/twitter-sharing.png')}">
                </a>
                <a href="http://www.facebook.com/EdxOnline" class="share">
                  <img src="${static.url('images/social/facebook-sharing.png')}">
                </a>
                <a href="https://plus.google.com/108235383044095082735/posts" class="share">
                  <img src="${static.url('images/social/google-plus-sharing.png')}">
                </a>
              </div>
56
            </div>
57
          </section>
58
          % endif
59
      </div>
60

61
      % if show_homepage_promo_video:
62 63 64 65 66
        <a href="#video-modal" class="media" rel="leanModal">
          <div class="hero">
            <div class="play-intro"></div>
          </div>
        </a>
67
      % endif
68 69 70
    </div>
  </header>
  <section class="container">
71
    <section class="highlighted-courses">
72

73
      % if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
74 75 76 77 78 79 80 81 82 83
        <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
84

85
    </section>
86
  </section>
87
</section>
88

89
<section id="video-modal" class="modal home-page-video-modal video-modal">
90
  <div class="inner-wrapper">
91
    <%
92
      youtube_video_id = homepage_promo_video_youtube_id
93 94 95
      if self.stanford_theme_enabled():
        youtube_video_id = "2gmreZObCY4"
    %>
96
    <iframe width="640" height="360" src="//www.youtube.com/embed/${youtube_video_id}?showinfo=0" frameborder="0" allowfullscreen></iframe>
97
  </div>
98
</section>
ichuang committed
99

100
<%block name="js_extra">
101
   <script type="text/javascript">
102 103 104 105 106 107 108 109
      $(window).load(function() {
         if(getParameterByName('next')) {
              $('#login').trigger("click");
         }
      })
   </script>
</%block>

ichuang committed
110
% if show_signup_immediately is not UNDEFINED:
111 112
  ## 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
113
<script type="text/javascript">
114
  $(window).load(function() {$('#signup_action').trigger("click");});
115
</script>
116
% endif