Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f2c40a7
Enable theming in base LMS template
natehardison May 31, 2013
a3ca084
Use a setting for the favicon path
natehardison May 31, 2013
f055c6f
Inject theming hooks into navigation bar
natehardison May 31, 2013
3fbab4d
Add theming hooks to (old) landing page
natehardison May 31, 2013
3934770
Add the `PLATFORM_NAME` setting for display config
natehardison May 31, 2013
8c19b0c
Theme the base registration page
natehardison Jun 1, 2013
90ebb4c
Theme the login page
natehardison Jun 1, 2013
34c49e7
Don't return any news if a theme is enabled
natehardison Jun 1, 2013
227271f
Theme the courseware dashboard
natehardison Jun 1, 2013
dc8bd32
Theme the individual course about pages
natehardison Jun 1, 2013
f25fdeb
Theme the authenticated index view
natehardison Jun 1, 2013
d79f064
Fix forgot password modal for theming
natehardison Jun 1, 2013
41a6a35
Add setting for technical support email config
natehardison Jun 1, 2013
799d56d
Theme static error pages
natehardison Jun 1, 2013
07511e2
Add settings for contact and bugs emails
natehardison Jun 1, 2013
2ab00ee
Use the contact email setting instead of if/else
natehardison Jun 1, 2013
940888d
Use bugs email from settings, not hardcoded value
natehardison Jun 1, 2013
2c90948
Use settings in LMS emails, not hardcoded values
natehardison Jun 1, 2013
adf9dd3
Make email change templates use main layout
natehardison Jun 1, 2013
2640ab4
Stanfordize LMS emails
natehardison Jun 1, 2013
c7f56cf
Move theme import right after variables import
natehardison Jun 1, 2013
e0590c3
Rewrite the main course.scss file as well
natehardison Jun 1, 2013
4031c19
Adjust available routes based on theme presence
natehardison Jun 1, 2013
96c4c53
Use default `PLATFORM_NAME` in AWS settings
natehardison Jun 3, 2013
4ea6692
Change `if ... is not None` to `if ...`
natehardison Jun 3, 2013
27fce3e
SASS diff from stanford themed branch for master
caesar2164 May 31, 2013
2685245
fix a few text weights and moved ugly mixins to mixin file and implem…
caesar2164 Jun 3, 2013
1108996
edx.org - revises new register/login banner image variable paths to r…
talbs Jun 3, 2013
e9d4749
theming - resolves some variable defintions to help with edX theme
talbs Jun 5, 2013
0b62ec7
theming - revised variables and link/button styling to account for ed…
talbs Jun 5, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ conf/locale/en/LC_MESSAGES/*.po
!messages.po
lms/static/sass/*.css
lms/static/sass/application.scss
lms/static/sass/course.scss
cms/static/sass/*.css
lms/lib/comment_client/python
nosetests.xml
Expand Down
4 changes: 3 additions & 1 deletion common/djangoapps/mitxmako/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def marketing_link(name):
return settings.MKTG_URLS.get('ROOT') + settings.MKTG_URLS.get(name)
# only link to the old pages when the marketing site isn't on
elif not settings.MITX_FEATURES.get('ENABLE_MKTG_SITE') and name in link_map:
return reverse(link_map[name])
# don't try to reverse disabled marketing links
if link_map[name] is not None:
return reverse(link_map[name])
else:
log.warning("Cannot find corresponding link for name: {name}".format(name=name))
return '#'
Expand Down
4 changes: 4 additions & 0 deletions common/djangoapps/student/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,10 @@ def accept_name_change(request):
def _get_news(top=None):
"Return the n top news items on settings.RSS_URL"

# Don't return anything if we're in a themed site
if settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
return None

feed_data = cache.get("students_index_rss_feed_data")
if feed_data is None:
if hasattr(settings, 'RSS_URL'):
Expand Down
9 changes: 9 additions & 0 deletions lms/envs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
with open(ENV_ROOT / CONFIG_PREFIX + "env.json") as env_file:
ENV_TOKENS = json.load(env_file)

PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)

SITE_NAME = ENV_TOKENS['SITE_NAME']
SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN')

Expand All @@ -119,11 +121,18 @@
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS.get('DEFAULT_FEEDBACK_EMAIL', DEFAULT_FEEDBACK_EMAIL)
ADMINS = ENV_TOKENS.get('ADMINS', ADMINS)
SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL)
TECH_SUPPORT_EMAIL = ENV_TOKENS.get('TECH_SUPPORT_EMAIL', TECH_SUPPORT_EMAIL)
CONTACT_EMAIL = ENV_TOKENS.get('CONTACT_EMAIL', CONTACT_EMAIL)
BUGS_EMAIL = ENV_TOKENS.get('BUGS_EMAIL', BUGS_EMAIL)

#Theme overrides
THEME_NAME = ENV_TOKENS.get('THEME_NAME', None)
if not THEME_NAME is None:
enable_theme(THEME_NAME)
FAVICON_PATH = 'themes/%s/images/favicon.ico' % THEME_NAME

# Marketing link overrides
MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {}))

#Timezone overrides
TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE)
Expand Down
8 changes: 8 additions & 0 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
from .discussionsettings import *

################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME = "edX"

COURSEWARE_ENABLED = True
ENABLE_JASMINE = False

Expand Down Expand Up @@ -315,6 +318,9 @@
DEFAULT_FROM_EMAIL = 'registration@edx.org'
DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org'
SERVER_EMAIL = 'devops@edx.org'
TECH_SUPPORT_EMAIL = 'technical@edx.org'
CONTACT_EMAIL = 'info@edx.org'
BUGS_EMAIL = 'bugs@edx.org'
ADMINS = (
('edX Admins', 'admin@edx.org'),
)
Expand All @@ -330,6 +336,8 @@
PROJECT_ROOT / "static",
]

FAVICON_PATH = 'images/favicon.ico'

# Locale/Internationalization
TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
Expand Down
13 changes: 13 additions & 0 deletions lms/static/sass/_shame.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,16 @@
}
}
}

//--------------------------------------
// The Following is to enable themes to
// display H1s on login and register pages
//--------------------------------------
.view-login .introduction header h1,
.view-register .introduction header h1 {
@include login_register_h1_style;
}

footer .references {
@include footer_references_style;
}
27 changes: 14 additions & 13 deletions lms/static/sass/application.scss.mako
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
@import 'base/font_face';
@import 'base/mixins';
@import 'base/variables';

## THEMING
## -------
## Set up this file to import an edX theme library if the environment
## indicates that a theme should be used. The assumption is that the
## theme resides outside of this main edX repository, in a directory
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif

@import 'base/base';
@import 'base/extends';
@import 'base/animations';
Expand Down Expand Up @@ -36,16 +50,3 @@
@import 'news';

@import 'shame';

## THEMING
## -------
## Set up this file to import an edX theme library if the environment
## indicates that a theme should be used. The assumption is that the
## theme resides outside of this main edX repository, in a directory
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}'
% endif
8 changes: 8 additions & 0 deletions lms/static/sass/base/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@
overflow: hidden;
display: block;
}


//-----------------
// Theme Mixin Styles
//-----------------
@mixin login_register_h1_style {}

@mixin footer_references_style {}
17 changes: 14 additions & 3 deletions lms/static/sass/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ $lighter-base-font-color: rgb(100,100,100);
$text-color: $dark-gray;

$body-bg: rgb(250,250,250);
$container-bg: $white;
$header-image: linear-gradient(-90deg, rgba(255,255,255, 1), rgba(230,230,230, 0.9));
$header-bg: transparent;
$header-bg: $white;
$courseware-header-image: linear-gradient(top, #fff, #eee);
$courseware-header-bg: transparent;
$footer-bg: transparent;
$footer-bg: $white;
$courseware-footer-border: none;
$courseware-footer-shadow: none;
$courseware-footer-margin: 0px;
Expand All @@ -87,7 +88,7 @@ $dashboard-profile-header-color: transparent;
$dashboard-profile-color: rgb(252,252,252);
$dot-color: $light-gray;

$content-wrapper-bg: rgb(255,255,255);
$content-wrapper-bg: shade($body-bg, 2%);
$course-bg-color: #d6d6d6;
$course-bg-image: url(../images/bg-texture.png);

Expand All @@ -100,6 +101,7 @@ $border-color-3: rgb(100,100,100);
$border-color-4: rgb(252,252,252);

$link-color: $blue;
$link-color-d1: $m-blue;
$link-hover: $pink;
$selection-color-1: $pink;
$selection-color-2: #444;
Expand All @@ -118,9 +120,18 @@ $sidebar-active-image: linear-gradient(top, #e6e6e6, #d6d6d6);
$form-bg-color: #fff;
$modal-bg-color: rgb(245,245,245);

//TOP HEADER IMAGE MARGIN
$header_image_margin: -69px;

//FOOTER MARGIN
$footer_margin: ($baseline/4) 0 ($baseline*1.5) 0;

//-----------------
// CSS BG Images
//-----------------
$homepage-bg-image: '../images/homepage-bg.jpg';

$login-banner-image: '../images/bg-banner-login.png';
$register-banner-image: '../images/bg-banner-register.png';

$video-thumb-url: '../images/courses/video-thumb.jpg';
14 changes: 14 additions & 0 deletions lms/static/sass/course.scss → lms/static/sass/course.scss.mako
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
@import 'base/font_face';
@import 'base/mixins';
@import 'base/variables';

## THEMING
## -------
## Set up this file to import an edX theme library if the environment
## indicates that a theme should be used. The assumption is that the
## theme resides outside of this main edX repository, in a directory
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif

@import 'base/base';
@import 'base/extends';
@import 'base/animations';
Expand Down
2 changes: 1 addition & 1 deletion lms/static/sass/course/layout/_courseware_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ header.global.slim {
height: auto;
padding: 5px 0 10px 0;
border-bottom: 1px solid $outer-border-color;
background: $white;
background: $header-bg;

.guest .secondary {
margin-right: 0;
Expand Down
1 change: 0 additions & 1 deletion lms/static/sass/course/layout/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
footer {
border: $courseware-footer-border;
box-shadow: $courseware-footer-shadow;
margin-top: $courseware-footer-margin;
}
Loading