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
aa0aa653
Commit
aa0aa653
authored
Oct 01, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up unit.html with layout/css from tom
parent
96a91421
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
428 additions
and
401 deletions
+428
-401
cms/static/sass/_unit.scss
+349
-345
cms/templates/unit.html
+79
-56
No files found.
cms/static/sass/_unit.scss
View file @
aa0aa653
.unit
.main-wrapper
,
.unit
.main-wrapper
,
.subsection
.main-wrapper
{
.subsection
.main-wrapper
{
margin
:
40px
;
margin
:
40px
;
}
}
.main-column
{
.main-column
{
float
:
left
;
float
:
left
;
width
:
70%
;
width
:
70%
;
}
}
.unit-body.published
{
.unit-body.published
{
.components
>
li
{
.components
>
li
{
border
:
none
;
border
:
none
;
.rendered-component
{
.rendered-component
{
padding
:
0
20px
;
padding
:
0
20px
;
}
}
}
}
}
}
.unit-body
{
.unit-body
{
.breadcrumbs
{
.breadcrumbs
{
border-radius
:
3px
3px
0
0
;
border-radius
:
3px
3px
0
0
;
border-bottom
:
1px
solid
#cbd1db
;
border-bottom
:
1px
solid
#cbd1db
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
.3
)
,
rgba
(
255
,
255
,
255
,
0
)
70%
)
#edf1f5
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
.3
)
,
rgba
(
255
,
255
,
255
,
0
)
70%
)
#edf1f5
;
box-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.7
)
inset
;
box-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.7
)
inset
;
@include
clearfix
;
@include
clearfix
;
li
{
li
{
float
:
left
;
float
:
left
;
}
}
a
,
a
,
.current-page
{
.current-page
{
display
:
block
;
display
:
block
;
padding
:
15px
35px
15px
30px
;
padding
:
15px
35px
15px
30px
;
font-size
:
14px
;
font-size
:
14px
;
background
:
url(../img/breadcrumb-arrow.png)
no-repeat
right
center
;
background
:
url(../img/breadcrumb-arrow.png)
no-repeat
right
center
;
}
}
}
}
h2
{
h2
{
margin
:
30px
40px
;
margin
:
30px
40px
;
color
:
#646464
;
color
:
#646464
;
font-size
:
19px
;
font-size
:
19px
;
font-weight
:
300
;
font-weight
:
300
;
letter-spacing
:
1px
;
letter-spacing
:
1px
;
text-transform
:
uppercase
;
text-transform
:
uppercase
;
}
}
.components
{
.components
{
>
li
{
>
li
{
position
:
relative
;
position
:
relative
;
z-index
:
10
;
z-index
:
10
;
margin
:
20px
40px
;
margin
:
20px
40px
;
border
:
1px
solid
#d1ddec
;
border
:
1px
solid
#d1ddec
;
border-radius
:
3px
;
border-radius
:
3px
;
background
:
#fff
;
background
:
#fff
;
-webkit-transition
:
border-color
.15s
;
-webkit-transition
:
border-color
.15s
;
&
:hover
{
&
:hover
{
border-color
:
#6696d7
;
border-color
:
#6696d7
;
.drag-handle
,
.drag-handle
,
.component-actions
a
{
.component-actions
a
{
background-color
:
$blue
;
background-color
:
$blue
;
}
}
.drag-handle
{
.drag-handle
{
border-color
:
$blue
;
border-color
:
$blue
;
}
}
}
}
&
.editing
{
&
.editing
{
border-color
:
#6696d7
;
border-color
:
#6696d7
;
&
:hover
{
&
:hover
{
.drag-handle
,
.drag-handle
,
.component-actions
a
{
.component-actions
a
{
background-color
:
$blue
;
background-color
:
$blue
;
}
}
.drag-handle
{
.drag-handle
{
border-color
:
$blue
;
border-color
:
$blue
;
}
}
}
}
}
}
.rendered-component
{
.rendered-component
{
padding
:
40px
20px
20px
;
padding
:
40px
20px
20px
;
}
}
.component-actions
{
.component-actions
{
position
:
absolute
;
position
:
absolute
;
top
:
4px
;
top
:
4px
;
right
:
4px
;
right
:
4px
;
-webkit-transition
:
opacity
.15s
;
-webkit-transition
:
opacity
.15s
;
}
}
.edit-button
,
.edit-button
,
.delete-button
{
.delete-button
{
float
:
left
;
float
:
left
;
padding
:
3px
10px
4px
;
padding
:
3px
10px
4px
;
margin-left
:
3px
;
margin-left
:
3px
;
border
:
1px
solid
#fff
;
border
:
1px
solid
#fff
;
border-radius
:
3px
;
border-radius
:
3px
;
// background: $blue;
// background: $blue;
background
:
#d1ddec
;
background
:
#d1ddec
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#fff
;
color
:
#fff
;
-webkit-transition
:
all
.15s
;
-webkit-transition
:
all
.15s
;
&
:hover
{
&
:hover
{
background-color
:
$blue
;
background-color
:
$blue
;
color
:
#fff
;
color
:
#fff
;
}
}
.edit-icon
,
.edit-icon
,
.delete-icon
{
.delete-icon
{
margin-right
:
4px
;
margin-right
:
4px
;
}
}
}
}
.drag-handle
{
.drag-handle
{
position
:
absolute
;
position
:
absolute
;
display
:
block
;
display
:
block
;
top
:
-1px
;
top
:
-1px
;
right
:
-16px
;
right
:
-16px
;
z-index
:
-1
;
z-index
:
-1
;
width
:
15px
;
width
:
15px
;
height
:
100%
;
height
:
100%
;
border-radius
:
0
3px
3px
0
;
border-radius
:
0
3px
3px
0
;
border
:
1px
solid
#d1ddec
;
border
:
1px
solid
#d1ddec
;
background
:
url(../img/drag-handles.png)
center
no-repeat
#d1ddec
;
background
:
url(../img/drag-handles.png)
center
no-repeat
#d1ddec
;
cursor
:
move
;
cursor
:
move
;
-webkit-transition
:
all
.15s
;
-webkit-transition
:
all
.15s
;
}
}
&
.new-component-item
{
&
.new-component-item
{
padding
:
0
;
padding
:
0
;
border
:
1px
solid
$darkGrey
;
border
:
1px
solid
#8891a1
;
border-radius
:
3px
;
border-radius
:
3px
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
.3
)
,
rgba
(
255
,
255
,
255
,
0
))
#d1dae3
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
255
,
255
,
255
,
.3
)
,
rgba
(
255
,
255
,
255
,
0
))
#d1dae3
;
box-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.2
)
inset
;
box-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.2
)
inset
;
-webkit-transition
:
background-color
.15s
,
border-color
.15s
;
-webkit-transition
:
background-color
.15s
,
border-color
.15s
;
&
.adding
{
&
.adding
{
background-color
:
$blue
;
background-color
:
$blue
;
border-color
:
#437fbf
;
border-color
:
#437fbf
;
}
}
.new-component-button
{
.new-component-button
{
@include
grey-button
;
display
:
block
;
display
:
block
;
padding
:
20px
;
text-align
:
center
;
text-align
:
center
;
padding
:
20px
0
;
color
:
#6d788b
;
border
:
none
;
}
}
h5
{
h5
{
margin-bottom
:
8px
;
margin-bottom
:
8px
;
color
:
#fff
;
color
:
#fff
;
font-weight
:
700
;
font-weight
:
700
;
}
}
.rendered-component
{
.rendered-component
{
display
:
none
;
display
:
none
;
background
:
#fff
;
background
:
#fff
;
border-radius
:
3px
3px
0
0
;
border-radius
:
3px
3px
0
0
;
}
}
.new-component-type
,
.new-component-template
{
.new-component-type
{
@include
clearfix
;
@include
clearfix
;
a
{
a
{
position
:
relative
;
position
:
relative
;
float
:
left
;
float
:
left
;
width
:
100px
;
width
:
100px
;
height
:
100px
;
height
:
100px
;
margin-right
:
10px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
border-radius
:
8px
;
border-radius
:
8px
;
font-size
:
13px
;
font-size
:
13px
;
line-height
:
14px
;
line-height
:
14px
;
color
:
#fff
;
color
:
#fff
;
text-align
:
center
;
text-align
:
center
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
.4
)
,
0
1px
0
rgba
(
255
,
255
,
255
,
.4
)
inset
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
.4
)
,
0
1px
0
rgba
(
255
,
255
,
255
,
.4
)
inset
;
-webkit-transition
:
background-color
.15s
;
-webkit-transition
:
background-color
.15s
;
&
:hover
{
&
:hover
{
background-color
:
rgba
(
255
,
255
,
255
,
.2
);
background-color
:
rgba
(
255
,
255
,
255
,
.2
);
}
}
.name
{
.name
{
position
:
absolute
;
position
:
absolute
;
bottom
:
5px
;
bottom
:
5px
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
padding
:
10px
;
padding
:
10px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
}
}
}
}
.new-component-template
{
.new-component-step-1
,
a
{
.new-component-step-2
{
height
:
60px
;
display
:
none
;
}
padding
:
20px
;
}
}
}
.new-component
,
}
.new-component-templates
{
display
:
none
;
.video-unit
img
,
padding
:
20px
;
.discussion-unit
img
{
width
:
100%
;
.cancel-button
{
}
@include
blue-button
;
}
border-color
:
#30649c
;
}
.component-editor
,
}
.new-component-step-2
{
}
@include
edit-box
;
}
display
:
none
;
}
padding
:
20px
;
border-radius
:
0
0
3px
3px
;
.component-editor
{
background
:
-webkit-linear-gradient
(
top
,
rgba
(
0
,
0
,
0
,
0
)
,
rgba
(
0
,
0
,
0
,
.1
))
$blue
;
@include
edit-box
;
display
:
none
;
h5
{
padding
:
20px
;
margin-bottom
:
8px
;
border-radius
:
0
0
3px
3px
;
color
:
#fff
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
0
,
0
,
0
,
0
)
,
rgba
(
0
,
0
,
0
,
.1
))
$blue
;
font-weight
:
700
;
}
h5
{
margin-bottom
:
8px
;
.save-button
{
color
:
#fff
;
margin-right
:
8px
;
font-weight
:
700
;
}
}
}
.save-button
{
margin-right
:
8px
;
}
}
}
}
.unit-properties
{
.unit-properties
{
.window-contents
{
.window-contents
{
padding
:
10px
20px
;
padding
:
10px
20px
;
}
}
.unit-actions
{
.unit-actions
{
border-bottom
:
none
;
border-bottom
:
none
;
padding-bottom
:
0
;
padding-bottom
:
0
;
}
}
.published-alert
{
.published-alert
{
padding
:
10px
;
padding
:
10px
;
border
:
1px
solid
#edbd3c
;
border
:
1px
solid
#edbd3c
;
border-radius
:
3px
;
border-radius
:
3px
;
background
:
#fbf6e1
;
background
:
#fbf6e1
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
1
.4
;
line-height
:
1
.4
;
div
{
div
{
margin-top
:
15px
;
margin-top
:
15px
;
}
}
}
}
.visibility-options
.option
{
.visibility-options
.option
{
margin-right
:
10px
;
margin-right
:
10px
;
padding
:
3px
13px
6px
;
padding
:
3px
13px
6px
;
border-radius
:
3px
;
border-radius
:
3px
;
background
:
#edf1f5
;
background
:
#edf1f5
;
&
.checked
{
&
.checked
{
background
:
#d1dae3
;
background
:
#d1dae3
;
}
}
input
[
type
=
"radio"
]
{
input
[
type
=
"radio"
]
{
margin-right
:
7px
;
margin-right
:
7px
;
}
}
}
}
.save-button
{
.save-button
{
@include
blue-button
;
@include
blue-button
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.preview-button
{
.preview-button
{
@include
white-button
;
@include
white-button
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.publish-button
{
.publish-button
{
@include
orange-button
;
@include
orange-button
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
}
}
.unit-history
{
.unit-history
{
&
.collapsed
{
&
.collapsed
{
h4
{
h4
{
border-bottom
:
none
;
border-bottom
:
none
;
border-radius
:
3px
;
border-radius
:
3px
;
}
}
.window-contents
{
.window-contents
{
display
:
none
;
display
:
none
;
}
}
}
}
ol
{
ol
{
border
:
1px
solid
#ced2db
;
border
:
1px
solid
#ced2db
;
li
{
li
{
display
:
block
;
display
:
block
;
padding
:
6px
8px
8px
10px
;
padding
:
6px
8px
8px
10px
;
background
:
#edf1f5
;
background
:
#edf1f5
;
font-size
:
12px
;
font-size
:
12px
;
&
:hover
{
&
:hover
{
background
:
#fffcf1
;
background
:
#fffcf1
;
.item-actions
{
.item-actions
{
display
:
block
;
display
:
block
;
}
}
}
}
&
.checked
{
&
.checked
{
background
:
#d1dae3
;
background
:
#d1dae3
;
}
}
.item-actions
{
.item-actions
{
display
:
none
;
display
:
none
;
}
}
input
[
type
=
"radio"
]
{
input
[
type
=
"radio"
]
{
margin-right
:
7px
;
margin-right
:
7px
;
}
}
}
}
}
}
}
}
.unit-location
{
.unit-location
{
.url
{
.url
{
width
:
100%
;
width
:
100%
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
box-shadow
:
none
;
box-shadow
:
none
;
}
}
.window-contents
>
ol
{
.window-contents
>
ol
{
@include
tree-view
;
@include
tree-view
;
ol
{
ol
{
.section-item
{
.section-item
{
padding-left
:
30px
;
padding-left
:
30px
;
}
}
.new-unit-item
{
.new-unit-item
{
margin-left
:
30px
;
margin-left
:
30px
;
}
}
}
}
ol
ol
{
ol
ol
{
.section-item
{
.section-item
{
padding-left
:
50px
;
padding-left
:
50px
;
}
}
.new-unit-item
{
.new-unit-item
{
margin-left
:
50px
;
margin-left
:
50px
;
}
}
}
}
}
}
}
}
cms/templates/unit.html
View file @
aa0aa653
...
@@ -4,75 +4,98 @@
...
@@ -4,75 +4,98 @@
<
%
block
name=
"content"
>
<
%
block
name=
"content"
>
<div
class=
"main-wrapper"
>
<div
class=
"main-wrapper"
>
<div
class=
"inner-wrapper"
>
<div
class=
"inner-wrapper"
>
<article
class=
"unit-body window"
>
<div
class=
"main-column"
>
<nav
class=
"breadcrumbs"
>
<article
class=
"unit-body window"
>
<ul>
<p
class=
"unit-name-input"
><label>
Display Name:
</label><input
type=
"text"
value=
"${unit.display_name}"
class=
"unit-display-name-input"
/></p>
<li><a
href=
"#"
>
Week 2
</a></li>
<ol
class=
"components"
data-id=
"${unit.location.url()}"
>
<li><a
href=
"#"
>
Linearity and Superposition
</a></li>
% for id in components:
<li><span
class=
"current-page"
>
${unit.display_name}
</span></li>
<li
class=
"component"
data-id=
"${id}"
/>
</ul>
</nav>
<ol
class=
"components"
data-id=
"${unit.location.url()}"
>
% for id in components:
<li
class=
"component"
data-id=
"${id}"
/>
% endfor
<li
class=
"new-component-item"
>
<a
href=
"#"
class=
"new-component-button"
>
<span
class=
"plus-icon"
></span>
New Component
</a>
<div
class=
"new-component"
>
<h5>
Select Component Type
</h5>
<ul
class=
"new-component-type"
>
% for type in sorted(component_templates.keys()):
<li>
<a
href=
"#"
data-type=
"${type}"
>
<span
class=
"large-template-icon large-${type}-icon"
></span>
<span
class=
"name"
>
${type}
</span>
</a>
</li>
% endfor
</ul>
<a
href=
"#"
class=
"cancel-button"
>
Cancel
</a>
</div>
% for type, templates in sorted(component_templates.items()):
<div
class=
"new-component-templates new-component-${type}"
>
<ul
class=
"new-component-template"
>
% for name, location in templates:
<li>
<a
href=
"#"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% endfor
</ul>
<a
href=
"#"
class=
"cancel-button"
>
Cancel
</a>
</div>
% endfor
% endfor
</li>
<li
class=
"new-component-item"
>
</ol>
<a
href=
"#"
class=
"new-component-button"
>
</article>
<span
class=
"plus-icon"
></span>
New Component
</a>
<div
class=
"new-component"
>
<h5>
Select Component Type
</h5>
<ul
class=
"new-component-type"
>
% for type in sorted(component_templates.keys()):
<li>
<a
href=
"#"
data-type=
"${type}"
>
<span
class=
"large-template-icon large-${type}-icon"
></span>
<span
class=
"name"
>
${type}
</span>
</a>
</li>
% endfor
</ul>
<a
href=
"#"
class=
"cancel-button"
>
Cancel
</a>
</div>
% for type, templates in sorted(component_templates.items()):
<div
class=
"new-component-templates new-component-${type}"
>
<ul
class=
"new-component-template"
>
% for name, location in templates:
<li>
<a
href=
"#"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% endfor
</ul>
<a
href=
"#"
class=
"cancel-button"
>
Cancel
</a>
</div>
% endfor
</li>
</ol>
</article>
</div>
<div
class=
"sidebar"
>
<div
class=
"sidebar"
>
<div
class=
"unit-properties window"
>
<div
class=
"unit-properties window"
>
<h4>
Properties
</h4>
<h4>
Unit
Properties
</h4>
<div
class=
"window-contents"
>
<div
class=
"window-contents"
>
<div
class=
"
row"
><label>
Display Name:
</label><input
type=
"text"
value=
"${unit.display_name}"
/></div
>
<div
class=
"
due-date-input row"
>
<div
class=
"row"
>
<label>
Due date:
</label
>
<
label>
State:
</label
>
<
a
href=
"#"
class=
"set-date"
>
Set a due date
</a
>
<div
class=
"
visibility-options
"
>
<div
class=
"
date-setter
"
>
<
span
class=
"option checked"
><input
type=
"radio"
name=
"visibility"
id=
"visibility-hidden"
checked
/><label
for=
"visibility-hidden"
>
Draft
</label></span
>
<
p
class=
"date-description"
><input
type=
"text"
value=
"10/20/2012"
class=
"date-input"
/>
<input
type=
"text"
value=
"6:00 am"
class=
"time-input"
/
>
<
span
class=
"option"
><input
type=
"radio"
name=
"visibility"
id=
"visibility-visible"
/><label
for=
"visibility-visible"
>
Final
</label></span
>
<
a
href=
"#"
class=
"remove-date"
>
Remove due date
</a
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"visibility row"
>
<label>
Visibility:
<!-- <span class="description">Shows or hides this subsection and the units within it.</span>-->
</label>
<a
href=
"#"
class=
"toggle-off"
>
hide
</a><a
href=
"#"
class=
"large-toggle"
></a><a
href=
"#"
class=
"toggle-on"
>
show
</a>
</div>
<div
class=
"row unit-actions"
>
<a
href=
"#"
class=
"save-button"
>
Save
</a>
<a
href=
"#"
class=
"save-button"
>
Save
</a>
<a
href=
"preview.html"
target=
"_blank"
class=
"preview-button"
>
Preview
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"
unit-history window collapsed
"
>
<div
class=
"
window unit-location
"
>
<h4>
<a
href=
"#"
class=
"expand-collapse-icon expand"
></a>
History
</h4>
<h4>
Unit Location
</h4>
<div
class=
"window-contents"
>
<div
class=
"window-contents"
>
<div><input
type=
"text"
class=
"url"
value=
"/courseware/Week_1/My_Unit"
disabled
/></div>
<ol>
<ol>
<li>
<a
href=
"#"
class=
"section-item"
>
Week 1
</a>
<ol>
<li>
<a
href=
"#"
class=
"section-item"
><span
class=
"folder-icon"
></span>
Administrivia and Circuit Elements
</a>
<ol>
<li><a
href=
"#"
class=
"section-item"
><span
class=
"file-icon"
></span>
Motiviation for 6.002
</a></li>
<li><a
href=
"#"
class=
"section-item"
><span
class=
"file-icon"
></span>
Administrivia
</a></li>
<li><a
href=
"#"
class=
"section-item"
><span
class=
"file-icon"
></span>
Course Overview
</a></li>
<li><a
href=
"#"
class=
"section-item"
><span
class=
"file-icon"
></span>
Lumped Element Abstraction
</a></li>
<li><a
href=
"#"
class=
"section-item"
><span
class=
"file-icon"
></span>
Simple Power
</a></li>
<li><a
href=
"#"
class=
"current section-item"
><span
class=
"file-icon"
></span>
New Unit
</a></li>
<li>
<a
href=
"unit.html"
class=
"new-unit-item"
>
<span
class=
"new-unit-icon"
></span>
New Unit
</a>
</li>
</ol>
</li>
</ol>
</li>
</ol>
</ol>
</div>
</div>
</div>
</div>
...
...
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