Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
58f93cc7
Commit
58f93cc7
authored
Oct 26, 2017
by
Harry Rein
Committed by
Andy Armstrong
Oct 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Styling fixes for the dashboard and course header.
parent
d0f348d3
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
235 additions
and
198 deletions
+235
-198
lms/djangoapps/courseware/testutils.py
+1
-1
lms/static/sass/_header.scss
+29
-15
lms/static/sass/bootstrap/_layouts.scss
+7
-3
lms/static/sass/multicourse/_dashboard.scss
+194
-175
lms/static/sass/shared-v2/_components.scss
+1
-1
lms/templates/header/user_dropdown.html
+1
-1
lms/templates/main.html
+1
-1
lms/templates/preview_menu.html
+1
-1
No files found.
lms/djangoapps/courseware/testutils.py
View file @
58f93cc7
...
@@ -33,7 +33,7 @@ class RenderXBlockTestMixin(object):
...
@@ -33,7 +33,7 @@ class RenderXBlockTestMixin(object):
'<ol class="tabs course-tabs"'
,
'<ol class="tabs course-tabs"'
,
'<footer id="footer-openedx"'
,
'<footer id="footer-openedx"'
,
'<div class="window-wrap"'
,
'<div class="window-wrap"'
,
'<div class="preview-menu
container
"'
,
'<div class="preview-menu"'
,
'<div class="container"'
,
'<div class="container"'
,
]
]
...
...
lms/static/sass/_header.scss
View file @
58f93cc7
...
@@ -30,28 +30,36 @@
...
@@ -30,28 +30,36 @@
height
:
$header-logo-height
;
height
:
$header-logo-height
;
}
}
@include
media-breakpoint-down
(
sm
)
{
@include
media-breakpoint-down
(
md
)
{
margin-left
:
calc
(
50%
-
30px
);
@include
margin-left
(
50%
);
height
:
$header-logo-height
;
height
:
$header-logo-height
;
width
:
auto
;
width
:
auto
;
.logo
{
@include
margin-left
(
-50%
);
}
}
}
}
}
.course-header
{
.course-header
{
@include
float
(
left
);
@include
float
(
left
);
@include
margin
(
$baseline
*
1
.25
,
0
,
0
,
$baseline
);
@include
margin
(
$baseline
*
0
.8
,
0
,
0
,
$baseline
);
font-size
:
$font-size-
lg
;
font-size
:
$font-size-
sm
;
color
:
theme-color
(
"dark"
);
color
:
theme-color
(
"dark"
);
line-height
:
1em
;
line-height
:
1em
;
display
:
none
;
display
:
none
;
.provider
{
.course-name
{
font-weight
:
$font-weight-bold
;
display
:
block
;
font-size
:
$font-size-base
;
margin-top
:
7px
;
font-weight
:
600
;
}
}
// Hide the course header for smaller screen sizes
// Hide the course header for smaller screen sizes
@include
media-breakpoint-up
(
md
)
{
@include
media-breakpoint-up
(
lg
)
{
display
:
block
;
display
:
block
;
}
}
}
}
...
@@ -64,7 +72,7 @@
...
@@ -64,7 +72,7 @@
by the desktop styling
by the desktop styling
*/
*/
// Desktop styling
// Desktop styling
@include
media-breakpoint-up
(
md
)
{
@include
media-breakpoint-up
(
lg
)
{
.nav-links
{
.nav-links
{
.nav-item
{
.nav-item
{
margin
:
0
$baseline
;
margin
:
0
$baseline
;
...
@@ -90,11 +98,11 @@
...
@@ -90,11 +98,11 @@
a
{
a
{
color
:
theme-color
(
"secondary"
);
color
:
theme-color
(
"secondary"
);
padding
:
$baseline
*
0
.35
$baseline
*
1
.25
$baseline
;
padding
:
$baseline
*
0
.35
$baseline
*
1
.25
19px
;
font-weight
:
$font-weight-normal
;
font-weight
:
$font-weight-normal
;
display
:
inline-block
;
display
:
inline-block
;
margin-bottom
:
-1
*
$baseline
/
2
;
margin-bottom
:
-1
*
$baseline
/
2
;
border-bottom
:
2
px
solid
transparent
;
border-bottom
:
3
px
solid
transparent
;
cursor
:
pointer
;
cursor
:
pointer
;
&
.active
,
&
.active
,
...
@@ -121,9 +129,14 @@
...
@@ -121,9 +129,14 @@
padding
:
$baseline
/
2
0
0
;
padding
:
$baseline
/
2
0
0
;
margin
:
0
$baseline
/
2
;
margin
:
0
$baseline
/
2
;
&
.nav-item-dropdown
{
padding
:
0
;
margin
:
0
;
}
a
{
a
{
color
:
theme-color
(
"dark"
);
color
:
theme-color
(
"dark"
);
font-weight
:
$font-weight-
bold
;
font-weight
:
$font-weight-
normal
;
}
}
}
}
...
@@ -173,6 +186,7 @@
...
@@ -173,6 +186,7 @@
// Dropdown behavior
// Dropdown behavior
.toggle-user-dropdown
{
.toggle-user-dropdown
{
padding
:
$baseline
/
2
;
text-decoration
:
none
;
text-decoration
:
none
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
@@ -224,7 +238,7 @@
...
@@ -224,7 +238,7 @@
}
}
// Responsive styling for mobile
// Responsive styling for mobile
@include
media-breakpoint-down
(
sm
)
{
@include
media-breakpoint-down
(
md
)
{
// Display the menu icon and allow for transition to an X on click
// Display the menu icon and allow for transition to an X on click
.hamburger-menu
{
.hamburger-menu
{
@include
left
(
22px
);
@include
left
(
22px
);
...
@@ -308,11 +322,11 @@
...
@@ -308,11 +322,11 @@
.mobile-menu
{
.mobile-menu
{
border-bottom
:
1px
solid
theme-color
(
'primary'
);
border-bottom
:
1px
solid
theme-color
(
'primary'
);
@include
media-breakpoint-up
(
md
)
{
@include
media-breakpoint-up
(
lg
)
{
display
:
none
!
important
;
display
:
none
!
important
;
}
}
@include
media-breakpoint-down
(
sm
)
{
@include
media-breakpoint-down
(
md
)
{
display
:
none
;
display
:
none
;
// Override standard styling for the mobile menu links
// Override standard styling for the mobile menu links
...
@@ -353,7 +367,7 @@
...
@@ -353,7 +367,7 @@
// Hide elements in menu bar when they exist in mobile
// Hide elements in menu bar when they exist in mobile
.hidden-mobile
{
.hidden-mobile
{
@include
media-breakpoint-down
(
sm
)
{
@include
media-breakpoint-down
(
md
)
{
&
:not
(
.mobile-nav-link
)
{
&
:not
(
.mobile-nav-link
)
{
display
:
none
;
display
:
none
;
}
}
...
...
lms/static/sass/bootstrap/_layouts.scss
View file @
58f93cc7
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
padding-bottom
:
$baseline
*
2
;
padding-bottom
:
$baseline
*
2
;
.course-tabs
{
.course-tabs
{
padding
:
0
;
padding
:
0
$baseline
*
2
;
font-size
:
$font-size-sm
;
font-size
:
$font-size-sm
;
.nav-item
{
.nav-item
{
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
border-bottom
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
padding
:
20px
;
padding
:
$baseline
$baseline
*
2
;
.page-header-search
{
.page-header-search
{
@include
margin-right
(
$baseline
);
@include
margin-right
(
$baseline
);
...
@@ -62,6 +62,10 @@
...
@@ -62,6 +62,10 @@
.page-header-main
{
.page-header-main
{
flex-grow
:
1
;
// This column should consume all the available space
flex-grow
:
1
;
// This column should consume all the available space
.page-title
{
margin-top
:
$baseline
*
0
.4
;
}
}
}
.page-header-secondary
{
.page-header-secondary
{
...
@@ -84,7 +88,7 @@
...
@@ -84,7 +88,7 @@
}
}
.page-content
{
.page-content
{
padding
:
$baseline
;
padding
:
$baseline
*
2
;
@include
media-breakpoint-up
(
md
)
{
@include
media-breakpoint-up
(
md
)
{
display
:
flex
;
display
:
flex
;
...
...
lms/static/sass/multicourse/_dashboard.scss
View file @
58f93cc7
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
.course-title
{
.course-title
{
a
,
span
{
a
,
span
{
@extend
%t-title3
;
@extend
%t-title3
;
@extend
%t-
light
;
@extend
%t-
regular
;
display
:
inline-block
;
display
:
inline-block
;
margin-bottom
:
(
$baseline
/
2
);
margin-bottom
:
(
$baseline
/
2
);
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
@include
float
(
left
);
@include
float
(
left
);
padding
:
0
;
padding
:
0
;
margin-top
:
(
$baseline
/
2
)
;
margin-top
:
$baseline
;
[
class
*=
"info-"
]
{
[
class
*=
"info-"
]
{
color
:
$gray-d1
;
color
:
$gray-d1
;
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
.wrapper-course-actions
{
.wrapper-course-actions
{
@include
margin-right
(
$baseline
);
@include
margin-right
(
$baseline
);
margin-top
:
$baseline
/
2
;
margin-top
:
$baseline
;
}
}
...
@@ -378,8 +378,191 @@
...
@@ -378,8 +378,191 @@
// ====================
// ====================
// UI: messages
// CASE: "enrolled as" status - professional ed
.wrapper-messages-primary
{
&
.professional
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$professional-color-lvl3
;
padding
:
(
$baseline
/
10
);
}
// course enrollment status message
.sts-enrollment
{
.label
{
@extend
%text-sr
;
}
// status message
.sts-enrollment-value
{
background
:
$professional-color-lvl3
;
}
}
}
// CASE: "enrolled as" status - verified
&
.verified
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$verified-color-lvl1
;
padding
:
(
$baseline
/
10
);
}
// course enrollment status message
.sts-enrollment
{
.label
{
@extend
%text-sr
;
}
.deco-graphic
{
@extend
%ui-depth3
;
width
:
40px
;
position
:
absolute
;
top
:
-5px
;
@include
right
(
0
);
}
// status message
.sts-enrollment-value
{
background
:
$verified-color-lvl1
;
}
}
}
// CASE: "enrolled as" status - honor code
&
.honor
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$honorcode-color-lvl2
;
padding
:
(
$baseline
/
10
);
}
// status message
.sts-enrollment-value
{
background
:
$honorcode-color-lvl1
;
}
}
// CASE: "enrolled as" status - auditing
&
.audit
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$audit-color-lvl2
;
padding
:
(
$baseline
/
10
);
}
// status message
.sts-enrollment-value
{
background
:
$audit-color-lvl1
;
}
}
}
}
// Responsive behavior
@include
media-breakpoint-down
(
md
)
{
padding
:
$baseline
;
}
}
// Secondary functionality
.side-container
{
@include
padding
(
$baseline
*
2
,
$baseline
*
2
,
$baseline
,
$baseline
);
max-width
:
$baseline
*
20
;
min-width
:
$baseline
*
20
;
min-height
:
$baseline
/
2
;
flex-grow
:
1
;
order
:
2
;
.wrapper-find-courses
{
.course-advertise
{
@include
clearfix
();
box-sizing
:
border-box
;
padding
:
$baseline
;
border
:
1px
solid
$border-color-l3
;
.advertise-message
{
@include
font-size
(
12
);
color
:
$gray-d4
;
margin-bottom
:
$baseline
;
}
.ad-link
{
@include
text-align
(
center
);
.btn-neutral
{
padding-bottom
:
12px
;
padding-top
:
12px
;
}
a
{
@include
font-size
(
16
);
@include
line-height
(
17
);
padding
:
$baseline
*
0
.5
;
border
:
1px
solid
theme-color
(
'primary'
);
color
:
theme-color
(
'primary'
);
text-decoration
:
none
;
display
:
block
;
&
:hover
,
&
:focus
,
&
:active
{
color
:
$white
;
background-color
:
theme-color
(
'primary'
);
}
span
{
@include
margin-left
(
$baseline
*
0
.25
);
}
.icon
{
@include
margin-right
(
$baseline
*
0
.25
);
}
}
}
}
}
.profile-sidebar
{
ul
{
padding
:
0
;
border
:
1px
solid
theme-color
(
"light"
);
}
}
// Responsive behavior
@include
media-breakpoint-down
(
md
)
{
margin
:
0
$baseline
$baseline
*
2
;
padding
:
0
;
max-width
:
100%
;
}
// Responsive behavior
@include
media-breakpoint-down
(
xl
)
{
max-width
:
$baseline
*
15
;
min-width
:
$baseline
*
15
;
}
}
// Responsive behavior
@include
media-breakpoint-down
(
md
)
{
flex-direction
:
column
;
}
}
// ====================
// UI: messages
.wrapper-messages-primary
{
@include
clearfix
();
@include
clearfix
();
.messages-list
{
.messages-list
{
...
@@ -809,9 +992,9 @@
...
@@ -809,9 +992,9 @@
&
.message-related-programs
{
&
.message-related-programs
{
background
:
none
;
background
:
none
;
border
:
none
;
margin-top
:
(
$baseline
/
4
);
margin-top
:
(
$baseline
/
4
);
padding-bottom
:
0
;
margin-bottom
:
$baseline
/
2
;
padding
:
0
;
.related-programs-preface
{
.related-programs-preface
{
@include
float
(
left
);
@include
float
(
left
);
...
@@ -866,174 +1049,6 @@
...
@@ -866,174 +1049,6 @@
@include
padding
(
$baseline
/
2
,
$baseline
,
$baseline
/
2
,
$baseline
/
2
);
@include
padding
(
$baseline
/
2
,
$baseline
,
$baseline
/
2
,
$baseline
/
2
);
}
}
}
}
}
// ====================
// CASE: "enrolled as" status - professional ed
&
.professional
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$professional-color-lvl3
;
padding
:
(
$baseline
/
10
);
}
// course enrollment status message
.sts-enrollment
{
.label
{
@extend
%text-sr
;
}
// status message
.sts-enrollment-value
{
background
:
$professional-color-lvl3
;
}
}
}
// CASE: "enrolled as" status - verified
&
.verified
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$verified-color-lvl1
;
padding
:
(
$baseline
/
10
);
}
// course enrollment status message
.sts-enrollment
{
.label
{
@extend
%text-sr
;
}
.deco-graphic
{
@extend
%ui-depth3
;
width
:
40px
;
position
:
absolute
;
top
:
-5px
;
@include
right
(
0
);
}
// status message
.sts-enrollment-value
{
background
:
$verified-color-lvl1
;
}
}
}
// CASE: "enrolled as" status - honor code
&
.honor
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$honorcode-color-lvl2
;
padding
:
(
$baseline
/
10
);
}
// status message
.sts-enrollment-value
{
background
:
$honorcode-color-lvl1
;
}
}
// CASE: "enrolled as" status - auditing
&
.audit
{
// changes to cover
.wrapper-course-image
.cover
{
border-color
:
$audit-color-lvl2
;
padding
:
(
$baseline
/
10
);
}
// status message
.sts-enrollment-value
{
background
:
$audit-color-lvl1
;
}
}
}
}
// Responsive behavior
@include
media-breakpoint-down
(
md
)
{
padding
:
$baseline
;
}
}
// Secondary functionality
.side-container
{
@include
padding
(
$baseline
*
2
,
$baseline
*
2
,
$baseline
,
$baseline
);
max-width
:
$baseline
*
20
;
flex-grow
:
1
;
order
:
2
;
.wrapper-find-courses
{
.course-advertise
{
@include
clearfix
();
box-sizing
:
border-box
;
padding
:
$baseline
;
border
:
1px
solid
$border-color-l3
;
.advertise-message
{
@include
font-size
(
12
);
color
:
$gray-d4
;
margin-bottom
:
$baseline
;
}
.ad-link
{
@include
text-align
(
center
);
.btn-neutral
{
padding-bottom
:
12px
;
padding-top
:
12px
;
}
a
{
@include
font-size
(
16
);
@include
line-height
(
17
);
padding
:
$baseline
*
0
.5
;
border
:
1px
solid
theme-color
(
'primary'
);
color
:
theme-color
(
'primary'
);
text-decoration
:
none
;
display
:
block
;
&
:hover
,
&
:focus
,
&
:active
{
color
:
$white
;
background-color
:
theme-color
(
'primary'
);
}
span
{
@include
margin-left
(
$baseline
*
0
.25
);
}
.icon
{
@include
margin-right
(
$baseline
*
0
.25
);
}
}
}
}
}
// Responsive behavior
@include
media-breakpoint-down
(
md
)
{
margin
:
0
$baseline
$baseline
*
2
;
padding
:
0
;
max-width
:
100%
;
}
}
// Responsive behavior
@include
media-breakpoint-down
(
md
)
{
flex-direction
:
column
;
}
}
}
// CASE: empty dashboard
// CASE: empty dashboard
...
@@ -1093,6 +1108,9 @@
...
@@ -1093,6 +1108,9 @@
// status - verification
// status - verification
.status-verification
{
.status-verification
{
list-style
:
none
;
padding
:
$baseline
/
2
;
.status-title
{
.status-title
{
margin
:
0
0
(
$baseline
/
4
)
0
;
margin
:
0
0
(
$baseline
/
4
)
0
;
}
}
...
@@ -1124,6 +1142,7 @@
...
@@ -1124,6 +1142,7 @@
@extend
%t-copy-sub2
;
@extend
%t-copy-sub2
;
position
:
relative
;
position
:
relative
;
padding-top
:
$baseline
/
2
;
p
{
p
{
@extend
%t-copy-sub2
;
@extend
%t-copy-sub2
;
...
...
lms/static/sass/shared-v2/_components.scss
View file @
58f93cc7
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
margin
:
0
auto
;
margin
:
0
auto
;
padding
:
(
$baseline
*
0
.75
);
padding
:
(
$baseline
*
0
.75
)
(
$baseline
*
2
)
;
background-color
:
$lms-preview-menu-color
;
background-color
:
$lms-preview-menu-color
;
@media
print
{
@media
print
{
...
...
lms/templates/header/user_dropdown.html
View file @
58f93cc7
...
@@ -27,7 +27,7 @@ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_
...
@@ -27,7 +27,7 @@ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_
<span
class=
"username"
>
${username}
</span>
<span
class=
"username"
>
${username}
</span>
</a>
</a>
</div>
</div>
<div
class=
"nav-item hidden-mobile"
tabindex=
"-1"
>
<div
class=
"nav-item hidden-mobile
nav-item-dropdown
"
tabindex=
"-1"
>
<div
class=
"user-dropdown"
aria-expanded=
"false"
aria-haspopup=
"true"
aria-controls=
"user-menu"
>
<div
class=
"user-dropdown"
aria-expanded=
"false"
aria-haspopup=
"true"
aria-controls=
"user-menu"
>
<span
class=
"sr"
>
user menu
</span>
<span
class=
"sr"
>
user menu
</span>
<span
class=
"fa fa-caret-down toggle-user-dropdown"
aria-hidden=
"true"
tabindex=
"0"
></span>
<span
class=
"fa fa-caret-down toggle-user-dropdown"
aria-hidden=
"true"
tabindex=
"0"
></span>
...
...
lms/templates/main.html
View file @
58f93cc7
...
@@ -159,7 +159,7 @@ from pipeline_mako import render_require_js_path_overrides
...
@@ -159,7 +159,7 @@ from pipeline_mako import render_require_js_path_overrides
<div
class=
"marketing-hero"
><
%
block
name=
"marketing_hero"
></
%
block></div>
<div
class=
"marketing-hero"
><
%
block
name=
"marketing_hero"
></
%
block></div>
<div
class=
"content-wrapper
${"
container-fluid
"
if
uses_bootstrap
else
""
}
main-container
"
id=
"content"
>
<div
class=
"content-wrapper main-container"
id=
"content"
>
${self.body()}
${self.body()}
<
%
block
name=
"bodyextra"
/>
<
%
block
name=
"bodyextra"
/>
</div>
</div>
...
...
lms/templates/preview_menu.html
View file @
58f93cc7
...
@@ -27,7 +27,7 @@ show_preview_menu = course and staff_access and supports_preview_menu
...
@@ -27,7 +27,7 @@ show_preview_menu = course and staff_access and supports_preview_menu
student_selected =
selected(not
staff_selected
and
not
specific_student_selected
and
not
masquerade_group_id
)
student_selected =
selected(not
staff_selected
and
not
specific_student_selected
and
not
masquerade_group_id
)
%
>
%
>
<nav
class=
"wrapper-preview-menu"
aria-label=
"${_('Course View')}"
>
<nav
class=
"wrapper-preview-menu"
aria-label=
"${_('Course View')}"
>
<div
class=
"preview-menu
container
"
>
<div
class=
"preview-menu"
>
<ol
class=
"preview-actions"
>
<ol
class=
"preview-actions"
>
<li
class=
"action-preview"
>
<li
class=
"action-preview"
>
<form
action=
"#"
class=
"action-preview-form"
method=
"post"
>
<form
action=
"#"
class=
"action-preview-form"
method=
"post"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment