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
ccc3c710
Commit
ccc3c710
authored
Feb 21, 2012
by
Kyle Fiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added consistant sidebar headers and made textbook sidebar close
--HG-- branch : kf-sidebar
parent
3ce85573
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
114 additions
and
58 deletions
+114
-58
courseware.html
+4
-18
main.html
+2
-0
sass/_textbook.scss
+37
-1
sass/base/_extends.scss
+41
-0
sass/courseware/_courseware.scss
+1
-5
sass/courseware/_sidebar.scss
+0
-28
sass/discussion/_profile.scss
+5
-1
sass/layout/_layout.scss
+4
-4
staticbook.html
+20
-1
No files found.
courseware.html
View file @
ccc3c710
<
%
inherit
file=
"main.html"
/>
<
%
inherit
file=
"main.html"
/>
<
%
block
name=
"headextra"
>
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
function
()
{
$
{
init
}
$
{
init
}
// Show and hide sidebar
var
acc_hidden
=
false
;
$
(
'#hide_acc'
).
click
(
function
()
{
if
(
acc_hidden
)
{
$
(
'#accordion'
).
show
();
$
(
'#acc_td'
).
attr
(
"width"
,
"320"
);
$
(
'#hide_acc'
).
html
(
"<<br><<br><"
);
acc_hidden
=
false
;
}
else
{
$
(
'#accordion'
).
hide
();
$
(
'#acc_td'
).
attr
(
"width"
,
"0"
);
$
(
'#hide_acc'
).
html
(
"><br>><br>>"
);
acc_hidden
=
true
;
}
});
});
});
</script>
</script>
</
%
block>
<
%
include
file=
"navigation.html"
args=
"active_page='courseware'"
/>
<
%
include
file=
"navigation.html"
args=
"active_page='courseware'"
/>
<section
class=
"main-content"
>
<section
class=
"main-content"
>
<div
class=
"course-wrapper"
>
<div
class=
"course-wrapper"
>
<section
class=
"course-index"
>
<section
class=
"course-index"
>
<
div
id=
"open_close_accordion"
>
<
header
id=
"open_close_accordion"
>
<h2>
Courseware Index
</h2>
<h2>
Courseware Index
</h2>
<a
href=
"#"
>
close
</a>
<a
href=
"#"
>
close
</a>
</
div
>
</
header
>
<div
id=
"accordion"
>
<div
id=
"accordion"
>
${accordion}
${accordion}
...
...
main.html
View file @
ccc3c710
...
@@ -117,5 +117,7 @@ $(function() {
...
@@ -117,5 +117,7 @@ $(function() {
});
});
</script>
</script>
<
%
block
name=
"js_extra"
/>
</body>
</body>
</html>
</html>
sass/_textbook.scss
View file @
ccc3c710
div
.book-wrapper
{
div
.book-wrapper
{
@extend
.table-wrapper
;
@extend
.table-wrapper
;
ul
#booknav
{
section
.book-sidebar
{
@extend
.sidebar
;
@extend
.sidebar
;
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
@extend
.tran
;
ul
#booknav
{
a
{
a
{
color
:
#000
;
color
:
#000
;
...
@@ -40,6 +43,7 @@ div.book-wrapper {
...
@@ -40,6 +43,7 @@ div.book-wrapper {
padding
:
7px
7px
7px
30px
;
padding
:
7px
7px
7px
30px
;
}
}
}
}
}
section
.book
{
section
.book
{
@extend
.content
;
@extend
.content
;
...
@@ -92,4 +96,36 @@ div.book-wrapper {
...
@@ -92,4 +96,36 @@ div.book-wrapper {
}
}
}
}
}
}
&
.closed
{
section
.book-sidebar
{
width
:
flex-grid
(
.6
);
header
#open_close_accordion
{
padding
:
0
;
a
{
background-image
:
url('/static/images/slide-right-icon.png')
;
}
h2
{
visibility
:
hidden
;
width
:
10px
;
padding
:
0
;
}
}
ul
#booknav
{
visibility
:
hidden
;
width
:
10px
;
padding
:
0
;
overflow
:
hidden
;
height
:
100px
;
}
}
section
.course-content
{
width
:
flex-grid
(
11
.5
)
+
flex-gutter
();
}
}
}
}
sass/base/_extends.scss
View file @
ccc3c710
...
@@ -68,6 +68,13 @@ h1.top-header {
...
@@ -68,6 +68,13 @@ h1.top-header {
width
:
flex-grid
(
3
);
width
:
flex-grid
(
3
);
position
:
relative
;
position
:
relative
;
h1
,
h2
{
font-size
:
18px
;
text-transform
:
none
;
font-weight
:
800
;
letter-spacing
:
0
;
}
h3
{
h3
{
@include
box-shadow
(
0
1px
0
#eee
);
@include
box-shadow
(
0
1px
0
#eee
);
background
:
none
;
background
:
none
;
...
@@ -110,11 +117,41 @@ h1.top-header {
...
@@ -110,11 +117,41 @@ h1.top-header {
}
}
}
}
header
#open_close_accordion
{
@include
box-shadow
(
0
1px
0
#eee
);
border-bottom
:
1px
solid
#d3d3d3
;
padding
:
lh
(
.5
)
lh
();
position
:
relative
;
h2
{
padding-right
:
20px
;
margin
:
0
;
}
a
{
width
:
16px
;
text-indent
:
-9999px
;
height
:
16px
;
position
:
absolute
;
padding
:
8px
;
top
:
6px
;
right
:
-1px
;
border
:
1px
solid
#D3D3D3
;
background
:
#eee
url('/static/images/slide-left-icon.png')
center
center
no-repeat
;
@include
border-radius
(
3px
0
0
3px
);
&
:hover
{
background-color
:
white
;
}
}
}
a
.button
{
a
.button
{
text-decoration
:
none
;
text-decoration
:
none
;
}
}
}
}
.topbar
{
.topbar
{
background
:
#F6EFD4
;
background
:
#F6EFD4
;
border-bottom
:
1px
solid
darken
(
#F6EFD4
,
10%
);
border-bottom
:
1px
solid
darken
(
#F6EFD4
,
10%
);
...
@@ -146,3 +183,7 @@ h1.top-header {
...
@@ -146,3 +183,7 @@ h1.top-header {
}
}
}
}
}
}
.tran
{
@include
transition
(
all
,
.2s
,
$ease-in-out-quad
);
}
sass/courseware/_courseware.scss
View file @
ccc3c710
...
@@ -5,10 +5,6 @@ div.course-wrapper {
...
@@ -5,10 +5,6 @@ div.course-wrapper {
list-style
:
none
;
list-style
:
none
;
}
}
.tran
{
@include
transition
(
all
,
.2s
,
$ease-in-out-quad
);
}
section
.course-content
{
section
.course-content
{
@extend
.content
;
@extend
.content
;
...
@@ -160,7 +156,7 @@ div.course-wrapper {
...
@@ -160,7 +156,7 @@ div.course-wrapper {
section
.course-index
{
section
.course-index
{
width
:
flex-grid
(
.6
);
width
:
flex-grid
(
.6
);
div
#open_close_accordion
{
header
#open_close_accordion
{
padding
:
0
;
padding
:
0
;
a
{
a
{
...
...
sass/courseware/_sidebar.scss
View file @
ccc3c710
...
@@ -2,34 +2,6 @@ section.course-index {
...
@@ -2,34 +2,6 @@ section.course-index {
@extend
.sidebar
;
@extend
.sidebar
;
@extend
.tran
;
@extend
.tran
;
div
#open_close_accordion
{
@include
box-shadow
(
0
1px
0
#eee
);
border-bottom
:
1px
solid
#d3d3d3
;
padding
:
0
lh
();
position
:
relative
;
h2
{
padding-right
:
20px
;
}
a
{
width
:
16px
;
text-indent
:
-9999px
;
height
:
16px
;
position
:
absolute
;
padding
:
8px
;
top
:
-12px
;
right
:
-1px
;
border
:
1px
solid
#D3D3D3
;
background
:
#eee
url('/static/images/slide-left-icon.png')
center
center
no-repeat
;
@include
border-radius
(
3px
0
0
3px
);
&
:hover
{
background-color
:
white
;
}
}
}
div
#accordion
{
div
#accordion
{
h3
{
h3
{
...
...
sass/discussion/_profile.scss
View file @
ccc3c710
...
@@ -3,13 +3,17 @@ body.user-profile-page {
...
@@ -3,13 +3,17 @@ body.user-profile-page {
// @extend .sidebar;
// @extend .sidebar;
header
{
header
{
@extend
.clearfix
;
@extend
.clearfix
;
border-bottom
:
1px
solid
#d3d3d3
;
@include
box-shadow
(
0
1px
0
#eee
);
padding
:
0
lh
();
margin
:
0
(
-
(
lh
()))
lh
();
section
{
section
{
float
:
left
;
float
:
left
;
width
:
flex-grid
(
2
,
3
);
width
:
flex-grid
(
2
,
3
);
margin-right
:
flex-gutter
(
3
);
margin-right
:
flex-gutter
(
3
);
h1
{
h1
{
@extend
h2
;
margin-top
:
0
;
margin-top
:
0
;
}
}
}
}
...
...
sass/layout/_layout.scss
View file @
ccc3c710
...
@@ -11,13 +11,13 @@ html {
...
@@ -11,13 +11,13 @@ html {
section
.main-content
{
section
.main-content
{
@extend
.clearfix
;
@extend
.clearfix
;
@extend
.wrapper
;
@extend
.wrapper
;
@include
box-sizing
(
border-box
);
overflow
:
hidden
;
background
:
#fff
;
background
:
#fff
;
border
:
1px
solid
#bbb
;
border-bottom
:
1px
solid
#bbb
;
border-bottom
:
1px
solid
#bbb
;
margin-top
:
3px
;
@include
box-shadow
(
0
0
4px
#dfdfdf
);
@include
box-shadow
(
0
0
4px
#dfdfdf
);
border
:
1px
solid
#bbb
;
@include
box-sizing
(
border-box
);
margin-top
:
3px
;
overflow
:
hidden
;
@media
screen
and
(
min-width
:
1400px
)
{
@media
screen
and
(
min-width
:
1400px
)
{
@include
border-radius
(
4px
);
@include
border-radius
(
4px
);
...
...
staticbook.html
View file @
ccc3c710
<
%
inherit
file=
"main.html"
/>
<
%
inherit
file=
"main.html"
/>
<
%
block
name=
"js_extra"
>
<script>
<script>
var
page
=
$
{
page
};
var
page
=
$
{
page
};
...
@@ -32,18 +34,35 @@ function next_page() {
...
@@ -32,18 +34,35 @@ function next_page() {
goto_page
(
newpage
);
goto_page
(
newpage
);
log_event
(
"book"
,
{
"type"
:
"nextpage"
,
"new"
:
page
});
log_event
(
"book"
,
{
"type"
:
"nextpage"
,
"new"
:
page
});
}
}
$
(
"#open_close_accordion a"
).
click
(
function
(){
if
(
$
(
".book-wrapper"
).
hasClass
(
"closed"
)){
$
(
".book-wrapper"
).
removeClass
(
"closed"
);
}
else
{
$
(
".book-wrapper"
).
addClass
(
"closed"
);
}
});
</script>
</script>
</
%
block>
<
%
include
file=
"navigation.html"
args=
"active_page='book'"
/>
<
%
include
file=
"navigation.html"
args=
"active_page='book'"
/>
<section
class=
"main-content"
>
<section
class=
"main-content"
>
<div
class=
"book-wrapper"
>
<div
class=
"book-wrapper"
>
<section
class=
"book-sidebar"
>
<header
id=
"open_close_accordion"
>
<h2>
Table of Contents
</h2>
<a
href=
"#"
>
close
</a>
</header>
<ul
id=
"booknav"
class=
"treeview-booknav"
>
<ul
id=
"booknav"
class=
"treeview-booknav"
>
<
%
include
file=
"book_toc.html"
/>
<
%
include
file=
"book_toc.html"
/>
</ul>
</ul>
</section>
<section
class=
"book"
>
<section
class=
"book"
>
<section
class=
"page"
>
<section
class=
"page"
>
<nav>
<nav>
<ul>
<ul>
...
...
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