<%! from django.core.urlresolvers import reverse %>
<%! from time import strftime %>
<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>

<section class="home">
  <header>
    <div class="outer-wrapper">
      <div class="title">
        <hgroup>
          <h1>The Future of Online Education</h1>
          <h2>For anyone, anywhere, anytime.</h2>
        </hgroup>

        <section class="actions">
          <div class="main-cta">
            <a href="#signup-modal" class="find-courses" rel="leanModal">Sign Up</a>
          </div>

          <div class="secondary-actions">
            <div class="social-sharing">
              <div class="sharing-message">Share with friends and family!</div>
              <a href="#" class="share">
                <img src="${static.url('images/twitter-sharing.png')}">
              </a>
              <a href="#" class="share">
                <img src="${static.url('images/facebook-sharing.png')}">
              </a>
              <a href="#" class="share">
                <img src="${static.url('images/email-sharing.png')}">
              </a>
            </div>
          </div>
        </section>
      </div>

        <a href="#video-modal" class="media" rel="leanModal">
          <div class="hero">
            <img src="${static.url('images/courses/space3.jpg')}" />
            <div class="play-intro"></div>
          </div>
        </a>


    </div>
  </header>

  <section class="container">
    <section class="highlighted-courses">
      <h2>Explore courses from <span class="lowercase">edX</span> universities</h2>

      <section class="university-partners">
        <ol class="partners">
          <li class="partner mit">
            <a href="/university_profile">
              <img src="${static.url('images/mit.png')}" />
              <div class="name">
                <span>MITx</span>
              </div>
            </a>
          </li>
          <li class="partner">
            <a href="/university_profile">
              <img src="${static.url('images/harvard.png')}" />
              <div class="name">
                <span>HarvardX</span>
              </div>
            </a>
          </li>
          <li class="partner">
            <a href="/university_profile">
              <img src="${static.url('images/berkeley.png')}" />
              <div class="name">
                <span>BerkeleyX</span>
              </div>
            </a>
          </li>
        </ol>
      </section>

      <section class="courses">
        %for course in courses:
          <%include file="course.html" args="course=course" />
        %endfor
      </section>
    </section>
  </section>

  <section class="container">
    <section class="more-info">
      <header>
        <h2>edX News & Announcements</h2>
        <a href="${reverse('press')}">Read More &rarr;</a>
      </header>
      <section class="news">
        <section class="blog-posts">
            %for entry in entries:
            <article>
                %if entry.image:
                    <a href="${entry.link}" class="post-graphics">
                        <img src="${entry.image}" />
                    </a>
                %endif
                <div class="post-name">
                    <a href="${entry.link}">${entry.title}</a>
                    <p class="post-date">${strftime("%m/%d/%y", entry.published_parsed)}</p>
                </div>
            </article>
            %endfor
        </section>
        <section class="press-links">
          <h3>Press Links:</h3>
          <a href="${reverse('pressrelease')}">The edX Press Release</a>
        </section>
      </section>
    </section>
  </section>

</section>

<section id="video-modal" class="modal home-page-video-modal">
  <div class="inner-wrapper">
    <iframe width="640" height="360" src="http://www.youtube.com/embed/SA6ELdIRkRU" frameborder="0" allowfullscreen></iframe>
  </div>
</section>
