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 @@
<a href="#">${get_course_about_section(course, "university")}</a>
% endif
</h1>
% if self.carnegie_theme_enabled():
<br /><h2>learn to use this user-friendly technology from experts</h2>
% endif
</hgroup>
<div class="main-cta">
......@@ -124,7 +127,11 @@
</header>
<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>
<a href="#" class="active">${_("Overview")}</a>
## <a href="#">${_("FAQ")}</a>
......@@ -139,81 +146,83 @@
</div>
</section>
<section class="course-sidebar">
<section class="course-summary">
<header>
<div class="social-sharing">
<div class="sharing-message">${_("Share with friends and family!")}</div>
## TODO: this should probably be an overrideable block,
## or something allowing themes to do whatever they
## want here (and on this whole page, really).
% if self.stanford_theme_enabled():
<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">
<img src="${static.url('images/social/twitter-sharing.png')}">
</a>
<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">
<img src="${static.url('images/social/email-sharing.png')}">
</a>
% else:
<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">
<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="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">
<img src="${static.url('images/social/email-sharing.png')}">
</a>
% endif
</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>
<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.
% if get_course_about_section(course, "end_date") or course.end:
<li>
<div class="icon end"></div>
<p>${_("Classes End")}</p><span class="final-date">
% if get_course_about_section(course, "end_date"):
${get_course_about_section(course, "end_date")}
% else:
${course.end_date_text}
% endif
</span>
</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>
% endif
##<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>
% endif
</ol>
% if not self.carnegie_theme_enabled():
<section class="course-sidebar">
<section class="course-summary">
<header>
<div class="social-sharing">
<div class="sharing-message">${_("Share with friends and family!")}</div>
## TODO: this should probably be an overrideable block,
## or something allowing themes to do whatever they
## want here (and on this whole page, really).
% if self.stanford_theme_enabled():
<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">
<img src="${static.url('images/social/twitter-sharing.png')}">
</a>
<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">
<img src="${static.url('images/social/email-sharing.png')}">
</a>
% else:
<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">
<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="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">
<img src="${static.url('images/social/email-sharing.png')}">
</a>
% endif
</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>
<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.
% if get_course_about_section(course, "end_date") or course.end:
<li>
<div class="icon end"></div>
<p>${_("Classes End")}</p><span class="final-date">
% if get_course_about_section(course, "end_date"):
${get_course_about_section(course, "end_date")}
% else:
${course.end_date_text}
% endif
</span>
</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>
% endif
##<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>
% 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>
## 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>
% endif
</section>
</section>
......
......@@ -15,6 +15,7 @@
% else:
<h1>${_("The Future of Online Education")}</h1>
% endif
<h2>${_("For anyone, anywhere, anytime")}</h2>
</hgroup>
......
......@@ -15,6 +15,10 @@
<% return theme_enabled() and getattr(settings, "THEME_NAME") == "stanford" %>
</%def>
<%def name="carnegie_theme_enabled()">
<% return theme_enabled() and getattr(settings, "THEME_NAME") == "carnegie" %>
</%def>
<!DOCTYPE html>
<!--[if lt IE 8]><html class="ie"><![endif]-->
<!--[if IE 8]><html class="ie8"><![endif]-->
......@@ -23,6 +27,8 @@
<%block name="title">
% if stanford_theme_enabled():
<title>${_("Home")} | class.stanford.edu</title>
% elif carnegie_theme_enabled():
<title>${_("Home")} | CLASlite</title>
% else:
## "edX" should not be translated
<title>edX</title>
......
......@@ -42,7 +42,7 @@ site_status_msg = get_site_status_msg(course_id)
<nav>
<h1 class="logo">
<a href="${marketing_link('ROOT')}">
<a href="<%block name='navigation_link'>${marketing_link('ROOT')}</%block>">
<%block name="navigation_logo">
<img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="${settings.PLATFORM_NAME} ${_('Home')}" />
</%block>
......@@ -95,17 +95,19 @@ site_status_msg = get_site_status_msg(course_id)
</li>
% endif
</%block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<li class="nav-global-04">
<a class="cta cta-register" href="${reverse('course-specific-register', args=[course.id])}">${_("Register Now")}</a>
</li>
% else:
<li class="nav-global-04">
<a class="cta cta-register" href="/register">${_("Register Now")}</a>
</li>
% endif
% endif
<%block name="register_link">
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<li class="nav-global-04">
<a class="cta cta-register" href="${reverse('course-specific-register', args=[course.id])}">${_("Register Now")}</a>
</li>
% else:
<li class="nav-global-04">
<a class="cta cta-register" href="/register">${_("Register Now")}</a>
</li>
% endif
% endif
</%block>
</ol>
<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