Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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;
}
29 changes: 15 additions & 14 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor, but I think you can just go with if env.get('THEME_NAME'): unless you need to check for None specifically.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make a note to change it in the templating PR.

// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif

@import 'base/base';
@import 'base/extends';
@import 'base/animations';
Expand Down Expand Up @@ -35,17 +49,4 @@
@import 'discussion';
@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
@import 'shame';
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 {}
15 changes: 12 additions & 3 deletions lms/static/sass/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ $text-color: $dark-gray;

$body-bg: rgb(250,250,250);
$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 Down Expand Up @@ -117,9 +117,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';

$video-thumb-url: '../images/courses/video-thumb.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';
2 changes: 2 additions & 0 deletions lms/static/sass/course.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import 'base/font_face';
@import 'base/mixins';
@import 'base/variables';

@import 'base/base';
@import 'base/extends';
@import 'base/animations';
Expand Down Expand Up @@ -52,3 +53,4 @@

// discussion
@import "course/discussion/form-wmd-toolbar";

68 changes: 68 additions & 0 deletions lms/static/sass/course.scss.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
@import 'bourbon/bourbon';

@import 'base/reset';
@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';
@import 'shared/tooltips';

// Course base / layout styles
@import 'course/layout/courseware_header';
@import 'course/layout/footer';
@import 'course/base/mixins';
@import 'course/base/base';
@import 'course/base/extends';
@import 'xmodule/modules/css/module-styles.scss';

// courseware
@import 'course/courseware/courseware';
@import 'course/courseware/sidebar';
@import 'course/courseware/amplifier';
@import 'course/layout/calculator';
@import 'course/layout/timer';

// course-specific courseware (all styles in these files should be gated by a
// course-specific class). This should be replaced with a better way of
// providing course-specific styling.
@import "course/courseware/courses/_cs188.scss";

// wiki
@import "course/wiki/basic-html";
@import "course/wiki/sidebar";
@import "course/wiki/create";
@import "course/wiki/wiki";
@import "course/wiki/table";

// pages
@import "course/info";
@import "course/syllabus"; // TODO arjun replace w/ custom tabs, see courseware/courses.py
@import "course/textbook";
@import "course/profile";
@import "course/gradebook";
@import "course/tabs";
@import "course/staff_grading";
@import "course/rubric";
@import "course/open_ended_grading";

// instructor
@import "course/instructor/instructor";

// discussion
@import "course/discussion/form-wmd-toolbar";
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 @@ -64,7 +64,7 @@ header.global.slim {
@include box-shadow(0 1px 2px rgba(0, 0, 0, .1));
height: 50px;
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason you dropped this? seems like it should stay in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frrrances - I removed this because the edX theme doesn't have a border around the <footer> element and the Stanford theme doesn't need it either...Did I miss a spot that it does get used?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave it as-is and include it in a future cleanup since it's unrelated to this theming effort.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly it isn't, it was screwing with our footer styling, thus why I removed it...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. Then this is 👌 😸

margin-top: $courseware-footer-margin;
}
Loading