Merge pull request #4095 from edx/jtauber/open-edx-footer
Separate edX / Open edX footer
This commit is contained in:
35
lms/djangoapps/courseware/tests/test_footer.py
Normal file
35
lms/djangoapps/courseware/tests/test_footer.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""
|
||||
Tests related to the basic footer-switching based off SITE_NAME to ensure
|
||||
edx.org uses an edx footer but other instances use an Open edX footer.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
from django.test.utils import override_settings
|
||||
|
||||
|
||||
class TestFooter(TestCase):
|
||||
|
||||
@override_settings(SITE_NAME="edx.org")
|
||||
def test_edx_footer(self):
|
||||
"""
|
||||
Verify that the homepage, when accessed at edx.org, has the edX footer
|
||||
"""
|
||||
|
||||
resp = self.client.get('/')
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
|
||||
# assert that footer template has been properly overriden on homepage
|
||||
self.assertContains(resp, 'EdX is a non-profit created by founding partners Harvard and MIT')
|
||||
|
||||
@override_settings(SITE_NAME="example.com")
|
||||
def test_openedx_footer(self):
|
||||
"""
|
||||
Verify that the homepage, when accessed at something other than
|
||||
edx.org, has the Open edX footer
|
||||
"""
|
||||
|
||||
resp = self.client.get('/')
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
|
||||
# assert that footer template has been properly overriden on homepage
|
||||
self.assertContains(resp, 'Powered by Open edX')
|
||||
@@ -56,6 +56,7 @@ class TestMicrosites(ModuleStoreTestCase, LoginEnrollmentTestCase):
|
||||
self.activate_user(email)
|
||||
|
||||
|
||||
@override_settings(SITE_NAME=MICROSITE_TEST_HOSTNAME)
|
||||
def test_microsite_anonymous_homepage_content(self):
|
||||
"""
|
||||
Verify that the homepage, when accessed via a Microsite domain, returns
|
||||
|
||||
BIN
lms/static/images/edx-openedx-logo-tag-dark.png
Normal file
BIN
lms/static/images/edx-openedx-logo-tag-dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
lms/static/images/edx-openedx-logo-tag-light.png
Normal file
BIN
lms/static/images/edx-openedx-logo-tag-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
lms/static/images/edx-openedx-logo-tag.png
Normal file
BIN
lms/static/images/edx-openedx-logo-tag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
lms/static/images/logo-placeholder.png
Normal file
BIN
lms/static/images/logo-placeholder.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -84,63 +84,105 @@
|
||||
.references {
|
||||
margin: -10px 0 0 0;
|
||||
width: flex-grid(4,12);
|
||||
float: right;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.nav-social {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
.wrapper-logo {
|
||||
margin: ($baseline*.75) 0;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
a {
|
||||
display: inline-block;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copyright {
|
||||
margin: -2px 0 8px 0;
|
||||
font-size: em(11);
|
||||
color: tint($m-gray,50%);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.nav-legal {
|
||||
@include clearfix();
|
||||
text-align: right;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
font-size: em(11);
|
||||
|
||||
a {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-legal-01 a {
|
||||
|
||||
&:after {
|
||||
margin-left: 5px;
|
||||
content: "-";
|
||||
}
|
||||
&:hover {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copyright {
|
||||
margin: -2px 0 8px 0;
|
||||
font-size: em(11);
|
||||
color: $gray-l2;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.nav-legal {
|
||||
@include clearfix();
|
||||
text-align: left;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
font-size: em(11);
|
||||
|
||||
a {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-legal-01 a {
|
||||
|
||||
&:after {
|
||||
margin-left: 5px;
|
||||
content: "-";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-social {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// platform Open edX logo and link
|
||||
.powered-by {
|
||||
width: flex-grid(3,12);
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
text-align: right;
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
|
||||
&:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// edx theme overrides
|
||||
&.edx-footer {
|
||||
|
||||
footer {
|
||||
|
||||
.copyright {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.nav-legal {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
91
lms/templates/edx_footer.html
Normal file
91
lms/templates/edx_footer.html
Normal file
@@ -0,0 +1,91 @@
|
||||
## mako
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
<%! from django.utils.translation import ugettext as _ %>
|
||||
<%namespace name='static' file='static_content.html'/>
|
||||
|
||||
<div class="wrapper wrapper-footer edx-footer">
|
||||
<footer>
|
||||
<div class="colophon">
|
||||
<nav class="nav-colophon">
|
||||
<ol>
|
||||
<li class="nav-colophon-01">
|
||||
<a id="about" href="${marketing_link('ABOUT')}">
|
||||
${_("About")}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-02">
|
||||
<a id="jobs" href="${marketing_link('JOBS')}">
|
||||
${_("Jobs")}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-03">
|
||||
<a id="press" href="${marketing_link('PRESS')}">
|
||||
${_("Press")}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-04">
|
||||
<a id="faq" href="${marketing_link('FAQ')}">
|
||||
${_("FAQ")}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-05">
|
||||
<a id="contact" href="${marketing_link('CONTACT')}">
|
||||
${_("Contact")}
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="colophon-about">
|
||||
<img src="${static.url('images/header-logo.png')}" alt="${_('edX Logo')}" />
|
||||
|
||||
<p>${_("{EdX} is a non-profit created by founding partners {Harvard} and {MIT} whose mission is to bring the best of higher education to students of all ages anywhere in the world, wherever there is Internet access. {EdX}'s free online MOOCs are interactive and subjects include computer science, public health, and artificial intelligence.").format(EdX="EdX", Harvard="Harvard", MIT="MIT")}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="references">
|
||||
<nav class="nav-social">
|
||||
<ul>
|
||||
<li class="nav-social-01">
|
||||
<a href="http://www.meetup.com/edX-Global-Community/" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-meetup.png')}" alt="edX on Meetup" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-02">
|
||||
<a href="http://www.facebook.com/EdxOnline" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-facebook.png')}" alt="edX on Facebook" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-03">
|
||||
<a href="https://twitter.com/edXOnline" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-twitter.png')}" alt="edX on Twitter" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-04">
|
||||
<a href="https://plus.google.com/108235383044095082735/posts" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-google.png')}" alt="edX on Google+" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-05">
|
||||
<a href="http://youtube.com/user/edxonline" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-youtube.png')}" alt="edX on YouTube" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<p class="copyright">${_("© 2014 edX, some rights reserved.")}</p>
|
||||
|
||||
<nav class="nav-legal">
|
||||
<ul>
|
||||
<li class="nav-legal-01">
|
||||
<a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a>
|
||||
</li>
|
||||
<li class="nav-legal-02">
|
||||
<a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
@@ -37,56 +37,41 @@
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="colophon-about">
|
||||
<img src="${static.url('images/header-logo.png')}" alt="${_('{platform_name} Logo').format(platform_name=platform_name())}" />
|
||||
|
||||
<p>${_("{platform_name} is a non-profit created by founding partners {Harvard} and {MIT} whose mission is to bring the best of higher education to students of all ages anywhere in the world, wherever there is Internet access. {platform_name}'s free online MOOCs are interactive and subjects include computer science, public health, and artificial intelligence.").format(platform_name="EdX", Harvard="Harvard", MIT="MIT")}</p>
|
||||
<div class="wrapper-logo">
|
||||
<p>
|
||||
<a href="/">
|
||||
## this is just a placeholder logo
|
||||
## feel free to change this logo to your own
|
||||
<img alt="organiztion logo placeholder" src="/static/images/logo-placeholder.png">
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="copyright">${_("© 2014 {platform_name}, some rights reserved").format(platform_name=settings.PLATFORM_NAME)}</p>
|
||||
<nav class="nav-legal">
|
||||
<ul>
|
||||
<li class="nav-legal-01">
|
||||
<a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a>
|
||||
</li>
|
||||
<li class="nav-legal-02">
|
||||
<a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="references">
|
||||
<nav class="nav-social">
|
||||
<ul>
|
||||
<li class="nav-social-01">
|
||||
<a href="http://www.meetup.com/edX-Global-Community/" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-meetup.png')}" alt="edX on Meetup" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-02">
|
||||
<a href="http://www.facebook.com/EdxOnline" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-facebook.png')}" alt="edX on Facebook" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-03">
|
||||
<a href="https://twitter.com/edXOnline" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-twitter.png')}" alt="edX on Twitter" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-04">
|
||||
<a href="https://plus.google.com/108235383044095082735/posts" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-google.png')}" alt="edX on Google+" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-social-05">
|
||||
<a href="http://youtube.com/user/edxonline" rel="external">
|
||||
<img src="${static.url('images/social/ico-social-youtube.png')}" alt="edX on YouTube" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<p class="copyright">${_("© 2014 {platform_name}, some rights reserved.").format(platform_name=settings.PLATFORM_NAME)}</p>
|
||||
|
||||
<nav class="nav-legal">
|
||||
<ul>
|
||||
<li class="nav-legal-01">
|
||||
<a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a>
|
||||
</li>
|
||||
<li class="nav-legal-02">
|
||||
<a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
## please leave this link and use one of the logos provided
|
||||
<div class="powered-by">
|
||||
<p>
|
||||
<a href="http://openedx.org/">
|
||||
## standard powered-by logo
|
||||
<img src="https://s3.amazonaws.com/files.edx.org/openedx-logos/edx-openedx-logo-tag.png" alt="Powered by Open edX" width="150" height="50" />
|
||||
## greyscale logo for dark background
|
||||
## <img src="https://s3.amazonaws.com/files.edx.org/openedx-logos/edx-openedx-logo-tag-light.png" alt="Powered by Open edX" width="150" height="50" />
|
||||
## greyscale logo for light background
|
||||
## <img src="https://s3.amazonaws.com/files.edx.org/openedx-logos/edx-openedx-logo-tag-dark.png" alt="Powered by Open edX" width="150" height="50" />
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,11 @@
|
||||
header_extra_file = None
|
||||
header_file = microsite.get_template_path('navigation.html')
|
||||
google_analytics_file = microsite.get_template_path('google_analytics.html')
|
||||
footer_file = microsite.get_template_path('footer.html')
|
||||
|
||||
if getattr(settings, 'SITE_NAME', '').endswith('edx.org'):
|
||||
footer_file = microsite.get_template_path('edx_footer.html')
|
||||
else:
|
||||
footer_file = microsite.get_template_path('footer.html')
|
||||
|
||||
style_overrides_file = microsite.get_value('css_overrides_file')
|
||||
%>
|
||||
@@ -130,5 +134,3 @@
|
||||
html.escape(enrollment_action)
|
||||
) if course_id and enrollment_action else ""
|
||||
}</%def>
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
{% block bodyextra %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include "footer.html" %}
|
||||
{% include "edx_footer.html" %}
|
||||
|
||||
{% compressed_js 'application' %}
|
||||
{% compressed_js 'module-js' %}
|
||||
|
||||
Reference in New Issue
Block a user