Commit 239fe55b by Jason Bau

Merge pull request #1007 from edx/giulio/carnegie-theme

Conditional Carnegie theme changes
parents fab6e278 d13dbbf9
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
<a href="#">${get_course_about_section(course, "university")}</a> <a href="#">${get_course_about_section(course, "university")}</a>
% endif % endif
</h1> </h1>
% if self.carnegie_theme_enabled():
<br /><h2>learn to use this user-friendly technology from experts</h2>
% endif
</hgroup> </hgroup>
<div class="main-cta"> <div class="main-cta">
...@@ -124,7 +127,11 @@ ...@@ -124,7 +127,11 @@
</header> </header>
<section class="container"> <section class="container">
<section class="details"> % if self.carnegie_theme_enabled():
<section class="details" style="float: none; width: 100%; margin: 0 auto;">
% else:
<section class="details">
% endif
<nav> <nav>
<a href="#" class="active">${_("Overview")}</a> <a href="#" class="active">${_("Overview")}</a>
## <a href="#">${_("FAQ")}</a> ## <a href="#">${_("FAQ")}</a>
...@@ -139,81 +146,83 @@ ...@@ -139,81 +146,83 @@
</div> </div>
</section> </section>
<section class="course-sidebar"> % if not self.carnegie_theme_enabled():
<section class="course-summary"> <section class="course-sidebar">
<header> <section class="course-summary">
<div class="social-sharing"> <header>
<div class="sharing-message">${_("Share with friends and family!")}</div> <div class="social-sharing">
## TODO: this should probably be an overrideable block, <div class="sharing-message">${_("Share with friends and family!")}</div>
## or something allowing themes to do whatever they ## TODO: this should probably be an overrideable block,
## want here (and on this whole page, really). ## or something allowing themes to do whatever they
% if self.stanford_theme_enabled(): ## want here (and on this whole page, really).
<a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}!+(http://class.stanford.edu)" class="share"> % if self.stanford_theme_enabled():
<img src="${static.url('images/social/twitter-sharing.png')}"> <a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}!+(http://class.stanford.edu)" class="share">
</a> <img src="${static.url('images/social/twitter-sharing.png')}">
<a href="mailto:?subject=Take%20a%20course%20at%20Stanford%20online!&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}+(http://class.stanford.edu)" class="share"> </a>
<img src="${static.url('images/social/email-sharing.png')}"> <a href="mailto:?subject=Take%20a%20course%20at%20Stanford%20online!&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}+(http://class.stanford.edu)" class="share">
</a> <img src="${static.url('images/social/email-sharing.png')}">
% else: </a>
<a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}+through+@edxonline:+http://www.edx.org${reverse('about_course', args=[course.id])}" class="share"> % else:
<img src="${static.url('images/social/twitter-sharing.png')}"> <a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}+through+@edxonline:+http://www.edx.org${reverse('about_course', args=[course.id])}" class="share">
</a> <img src="${static.url('images/social/twitter-sharing.png')}">
<a href="http://www.facebook.com/EdxOnline" class="share"> <img src="${static.url('images/social/facebook-sharing.png')}"> </a>
</a> <a href="http://www.facebook.com/EdxOnline" class="share"> <img src="${static.url('images/social/facebook-sharing.png')}">
<a href="mailto:?subject=Take%20a%20course%20with%20edX%20online&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}%20through%20edX:+http://edx.org/${reverse('about_course', args=[course.id])}" class="share"> </a>
<img src="${static.url('images/social/email-sharing.png')}"> <a href="mailto:?subject=Take%20a%20course%20with%20edX%20online&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}%20through%20edX:+http://edx.org/${reverse('about_course', args=[course.id])}" class="share">
</a> <img src="${static.url('images/social/email-sharing.png')}">
% endif </a>
</div> % endif
</header> </div>
</header>
<ol class="important-dates">
<li><div class="icon course-number"></div><p>${_("Course Number")}</p><span class="course-number">${course.display_number_with_default | h}</span></li> <ol class="important-dates">
<li><div class="icon start"></div><p>${_("Classes Start")}</p><span class="start-date">${course.start_date_text}</span></li> <li><div class="icon course-number"></div><p>${_("Course Number")}</p><span class="course-number">${course.display_number_with_default | h}</span></li>
<li><div class="icon start"></div><p>${_("Classes Start")}</p><span class="start-date">${course.start_date_text}</span></li>
## We plan to ditch end_date (which is not stored in course metadata),
## but for backwards compatibility, show about/end_date blob if it exists. ## We plan to ditch end_date (which is not stored in course metadata),
% if get_course_about_section(course, "end_date") or course.end: ## but for backwards compatibility, show about/end_date blob if it exists.
<li> % if get_course_about_section(course, "end_date") or course.end:
<div class="icon end"></div> <li>
<p>${_("Classes End")}</p><span class="final-date"> <div class="icon end"></div>
% if get_course_about_section(course, "end_date"): <p>${_("Classes End")}</p><span class="final-date">
${get_course_about_section(course, "end_date")} % if get_course_about_section(course, "end_date"):
% else: ${get_course_about_section(course, "end_date")}
${course.end_date_text} % else:
% endif ${course.end_date_text}
</span> % endif
</li> </span>
% endif </li>
% endif
% if get_course_about_section(course, "effort"):
<li><div class="icon effort"></div><p>${_("Estimated Effort")}</p><span class="start-date">${get_course_about_section(course, "effort")}</span></li> % if get_course_about_section(course, "effort"):
% endif <li><div class="icon effort"></div><p>${_("Estimated Effort")}</p><span class="start-date">${get_course_about_section(course, "effort")}</span></li>
% endif
##<li><div class="icon length"></div><p>${_('Course Length')}</p><span class="course-length">${_('{number} weeks').format(number=15)}</span></li>
##<li><div class="icon length"></div><p>${_('Course Length')}</p><span class="course-length">${_('{number} weeks').format(number=15)}</span></li>
% if get_course_about_section(course, "prerequisites"):
<li class="prerequisites"><div class="icon prereq"></div><p>${_("Prerequisites")}</p><span class="start-date">${get_course_about_section(course, "prerequisites")}</span></li> % if get_course_about_section(course, "prerequisites"):
% endif <li class="prerequisites"><div class="icon prereq"></div><p>${_("Prerequisites")}</p><span class="start-date">${get_course_about_section(course, "prerequisites")}</span></li>
</ol> % endif
</ol>
</section>
## For now, ocw links are the only thing that goes in additional resources
% if get_course_about_section(course, "ocw_links"):
<section class="additional-resources">
<header>
<h1>${_("Additional Resources")}</h1>
</header>
<section>
## "MITOpenCourseware" should *not* be translated
<h2 class="opencourseware">MITOpenCourseware</h2>
${get_course_about_section(course, "ocw_links")}
</section>
</section>
%endif
</section> </section>
% endif
## For now, ocw links are the only thing that goes in additional resources
% if get_course_about_section(course, "ocw_links"):
<section class="additional-resources">
<header>
<h1>${_("Additional Resources")}</h1>
</header>
<section>
## "MITOpenCourseware" should *not* be translated
<h2 class="opencourseware">MITOpenCourseware</h2>
${get_course_about_section(course, "ocw_links")}
</section>
</section>
%endif
</section>
</section> </section>
</section> </section>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
% else: % else:
<h1>${_("The Future of Online Education")}</h1> <h1>${_("The Future of Online Education")}</h1>
% endif % endif
<h2>${_("For anyone, anywhere, anytime")}</h2> <h2>${_("For anyone, anywhere, anytime")}</h2>
</hgroup> </hgroup>
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<% return theme_enabled() and getattr(settings, "THEME_NAME") == "stanford" %> <% return theme_enabled() and getattr(settings, "THEME_NAME") == "stanford" %>
</%def> </%def>
<%def name="carnegie_theme_enabled()">
<% return theme_enabled() and getattr(settings, "THEME_NAME") == "carnegie" %>
</%def>
<!DOCTYPE html> <!DOCTYPE html>
<!--[if lt IE 8]><html class="ie"><![endif]--> <!--[if lt IE 8]><html class="ie"><![endif]-->
<!--[if IE 8]><html class="ie8"><![endif]--> <!--[if IE 8]><html class="ie8"><![endif]-->
...@@ -23,6 +27,8 @@ ...@@ -23,6 +27,8 @@
<%block name="title"> <%block name="title">
% if stanford_theme_enabled(): % if stanford_theme_enabled():
<title>${_("Home")} | class.stanford.edu</title> <title>${_("Home")} | class.stanford.edu</title>
% elif carnegie_theme_enabled():
<title>${_("Home")} | CLASlite</title>
% else: % else:
## "edX" should not be translated ## "edX" should not be translated
<title>edX</title> <title>edX</title>
......
...@@ -42,7 +42,7 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -42,7 +42,7 @@ site_status_msg = get_site_status_msg(course_id)
<nav> <nav>
<h1 class="logo"> <h1 class="logo">
<a href="${marketing_link('ROOT')}"> <a href="<%block name='navigation_link'>${marketing_link('ROOT')}</%block>">
<%block name="navigation_logo"> <%block name="navigation_logo">
<img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="${settings.PLATFORM_NAME} ${_('Home')}" /> <img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="${settings.PLATFORM_NAME} ${_('Home')}" />
</%block> </%block>
...@@ -95,17 +95,19 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -95,17 +95,19 @@ site_status_msg = get_site_status_msg(course_id)
</li> </li>
% endif % endif
</%block> </%block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']: <%block name="register_link">
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain: % if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
<li class="nav-global-04"> % if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<a class="cta cta-register" href="${reverse('course-specific-register', args=[course.id])}">${_("Register Now")}</a> <li class="nav-global-04">
</li> <a class="cta cta-register" href="${reverse('course-specific-register', args=[course.id])}">${_("Register Now")}</a>
% else: </li>
<li class="nav-global-04"> % else:
<a class="cta cta-register" href="/register">${_("Register Now")}</a> <li class="nav-global-04">
</li> <a class="cta cta-register" href="/register">${_("Register Now")}</a>
% endif </li>
% endif % endif
% endif
</%block>
</ol> </ol>
<ol class="right nav-courseware"> <ol class="right nav-courseware">
......
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