Commit 3fbab4d2 by Nate Hardison

Add theming hooks to (old) landing page

Adjust the now-defunct landing page so that it doesn't render much
of the edX-specific marketing info (social links, press releases,
university partners, etc.) if a theme is enabled.

Additionally, if the Stanford theme is enabled, add in some school-
specific language and adjust the video modal to play a Stanford one.
parent f055c6f9
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="stanford_theme_enabled"/>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section from courseware.courses import course_image_url, get_course_about_section
...@@ -24,7 +25,11 @@ ...@@ -24,7 +25,11 @@
<p>${get_course_about_section(course, 'short_description')}</p> <p>${get_course_about_section(course, 'short_description')}</p>
</div> </div>
<div class="bottom"> <div class="bottom">
% if stanford_theme_enabled():
<span class="university">${get_course_about_section(course, 'university')}</span>
% else:
<a href="${reverse('university_profile', args=[course.org])}" class="university">${get_course_about_section(course, 'university')}</a> <a href="${reverse('university_profile', args=[course.org])}" class="university">${get_course_about_section(course, 'university')}</a>
% endif
<span class="start-date">${course.start_date_text}</span> <span class="start-date">${course.start_date_text}</span>
</div> </div>
</section> </section>
......
...@@ -8,10 +8,16 @@ ...@@ -8,10 +8,16 @@
<div class="outer-wrapper"> <div class="outer-wrapper">
<div class="title"> <div class="title">
<hgroup> <hgroup>
% if self.stanford_theme_enabled():
<h1>Free courses from <strong>Stanford</strong></h1>
% else:
<h1>The Future of Online Education</h1> <h1>The Future of Online Education</h1>
% endif
<h2>For anyone, anywhere, anytime</h2> <h2>For anyone, anywhere, anytime</h2>
</hgroup> </hgroup>
## Disable social buttons for non-edX sites
% if not self.theme_enabled():
<section class="actions"> <section class="actions">
<div class="main-cta"> <div class="main-cta">
<a href="#signup-modal" id="signup_action" class="find-courses" rel="leanModal">Sign Up</a> <a href="#signup-modal" id="signup_action" class="find-courses" rel="leanModal">Sign Up</a>
...@@ -32,6 +38,7 @@ ...@@ -32,6 +38,7 @@
</div> </div>
</div> </div>
</section> </section>
% endif
</div> </div>
<a href="#video-modal" class="media" rel="leanModal"> <a href="#video-modal" class="media" rel="leanModal">
...@@ -45,6 +52,8 @@ ...@@ -45,6 +52,8 @@
<section class="container"> <section class="container">
<section class="highlighted-courses"> <section class="highlighted-courses">
## Disable university partner logos and sites for non-edX sites
% if not self.theme_enabled():
<h2>Explore free courses from <span class="edx">edX</span> universities</h2> <h2>Explore free courses from <span class="edx">edX</span> universities</h2>
<section class="university-partners university-partners2x6"> <section class="university-partners university-partners2x6">
...@@ -152,6 +161,7 @@ ...@@ -152,6 +161,7 @@
</li> </li>
</ol> </ol>
</section> </section>
% endif
<section class="courses"> <section class="courses">
<ul class="courses-listing"> <ul class="courses-listing">
...@@ -165,6 +175,8 @@ ...@@ -165,6 +175,8 @@
</section> </section>
</section> </section>
## Disable press and marketing for non-edX sites
% if not self.theme_enabled():
<section class="container"> <section class="container">
<section class="more-info"> <section class="more-info">
<header> <header>
...@@ -200,12 +212,19 @@ ...@@ -200,12 +212,19 @@
</section> </section>
</section> </section>
</section> </section>
% endif
</section> </section>
<section id="video-modal" class="modal home-page-video-modal video-modal"> <section id="video-modal" class="modal home-page-video-modal video-modal">
<div class="inner-wrapper"> <div class="inner-wrapper">
<iframe width="640" height="360" src="http://www.youtube.com/embed/XNaiOGxWeto?showinfo=0" frameborder="0" allowfullscreen></iframe> <%
if self.stanford_theme_enabled():
youtube_video_id = "2gmreZObCY4"
else:
youtube_video_id = "XNaiOGxWeto"
%>
<iframe width="640" height="360" src="http://www.youtube.com/embed/${youtube_video_id}?showinfo=0" frameborder="0" allowfullscreen></iframe>
</div> </div>
</section> </section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment