Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
423de186
Commit
423de186
authored
12 years ago
by
Tom Giannattasio
Committed by
Carlos Andrés Rocha
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added carousel to dashboard page
parent
9be89ab3
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/static/sass/multicourse/_dashboard.scss
+97
-0
97 additions, 0 deletions
lms/static/sass/multicourse/_dashboard.scss
lms/templates/dashboard.html
+87
-0
87 additions, 0 deletions
lms/templates/dashboard.html
with
184 additions
and
0 deletions
lms/static/sass/multicourse/_dashboard.scss
+
97
−
0
View file @
423de186
...
...
@@ -124,6 +124,103 @@
}
}
}
.news-carousel
{
@include
clearfix
;
margin
:
30px
10px
0
;
border
:
1px
solid
rgb
(
200
,
200
,
200
);
background
:
rgb
(
252
,
252
,
252
);
@include
box-shadow
(
inset
0
0
3px
0
rgba
(
0
,
0
,
0
,
0
.15
));
*
{
font-family
:
$sans-serif
;
}
header
{
@include
clearfix
;
height
:
50px
;
}
.page-dots
{
float
:
right
;
margin
:
18px
15px
0
0
;
li
{
float
:
left
;
margin-left
:
6px
;
}
}
.page-dot
{
display
:
block
;
width
:
11px
;
height
:
11px
;
border-radius
:
11px
;
background
:
$light-gray
;
&
:hover
{
background
:
#ccc
;
}
&
.current
{
background
:
$blue
;
}
}
h4
{
float
:
left
;
margin-left
:
15px
;
font-size
:
15px
;
line-height
:
48px
;
font-weight
:
700
;
text-transform
:
uppercase
;
}
.pages
{
position
:
relative
;
}
.page
{
display
:
none
;
position
:
absolute
;
top
:
0
;
left
:
0
;
&
:first-child
{
display
:
block
;
}
}
section
{
padding
:
0
10px
;
}
.news-image
{
height
:
125px
;
margin-bottom
:
15px
;
img
{
width
:
100%
;
border
:
1px
solid
$light-gray
;
}
}
h5
{
margin-bottom
:
8px
;
margin-left
:
5px
;
a
{
font-size
:
16px
;
font-weight
:
700
;
}
}
.excerpt
{
margin-left
:
5px
;
font-size
:
13px
;
padding-bottom
:
40px
;
}
}
}
.my-courses
{
...
...
This diff is collapsed.
Click to expand it.
lms/templates/dashboard.html
+
87
−
0
View file @
423de186
...
...
@@ -14,6 +14,48 @@
<script
type=
"text/javascript"
>
(
function
()
{
var
carouselPageHeight
=
0
;
var
carouselIndex
=
0
;
var
carouselDelay
=
5000
;
var
carouselPages
=
$
(
'
.news-carousel .page
'
).
length
;
$
(
'
.news-carousel .page
'
).
each
(
function
()
{
console
.
log
(
$
(
this
).
outerHeight
());
carouselPageHeight
=
Math
.
max
(
$
(
this
).
outerHeight
(),
carouselPageHeight
);
});
$
(
'
.news-carousel .pages
'
).
css
(
'
height
'
,
carouselPageHeight
);
$
(
'
.news-carousel .page-dot
'
).
bind
(
'
click
'
,
setCarouselPage
);
var
carouselTimer
=
setInterval
(
nextCarouselPage
,
carouselDelay
);
function
nextCarouselPage
()
{
carouselIndex
=
carouselIndex
+
1
<
carouselPages
?
carouselIndex
+
1
:
0
;
setCarouselPage
(
null
,
carouselIndex
);
}
function
setCarouselPage
(
e
,
index
)
{
console
.
log
(
'
set
'
);
var
$pageToShow
;
var
transitionSpeed
;
$
(
'
.news-carousel .page-dots
'
).
find
(
'
.current
'
).
removeClass
(
'
current
'
);
if
(
e
)
{
clearInterval
(
carouselTimer
);
carouselTimer
=
setInterval
(
nextCarouselPage
,
carouselDelay
);
carouselIndex
=
$
(
this
).
closest
(
'
li
'
).
index
();
transitionSpeed
=
250
;
$pageToShow
=
$
(
'
.news-carousel .page
'
).
eq
(
$
(
this
).
closest
(
'
li
'
).
index
());
$
(
this
).
addClass
(
'
current
'
);
}
else
{
transitionSpeed
=
750
;
$pageToShow
=
$
(
'
.news-carousel .page
'
).
eq
(
index
);
$
(
'
.news-carousel .page-dot
'
).
eq
(
index
).
addClass
(
'
current
'
);
}
$pageToShow
.
fadeIn
(
transitionSpeed
);
$
(
'
.news-carousel .page
'
).
not
(
$pageToShow
).
fadeOut
(
transitionSpeed
);
}
$
(
"
.unenroll
"
).
click
(
function
(
event
)
{
$
(
"
#unenroll_course_id
"
).
val
(
$
(
event
.
target
).
data
(
"
course-id
"
)
);
$
(
"
#unenroll_course_number
"
).
text
(
$
(
event
.
target
).
data
(
"
course-number
"
)
);
...
...
@@ -107,6 +149,51 @@
</li>
</ul>
</section>
<article
class=
"news-carousel"
>
<header>
<h4>
edX News
</h4>
<nav
class=
"page-dots"
>
<ol>
<li><a
href=
"#"
class=
"page-dot current"
></a></li>
<li><a
href=
"#"
class=
"page-dot"
></a></li>
<li><a
href=
"#"
class=
"page-dot"
></a></li>
</ol>
</nav>
</header>
<div
class=
"pages"
>
<section
class=
"page"
>
<div
class=
"news-image"
>
<a
href=
"#"
><img
src=
"/static/content-berkeley-cs169x/images/course_image.jpg"
/></a>
</div>
<h5><a
href=
"#"
>
BerkeleyX to offer Computer Graphics course
</a></h5>
<div
class=
"excerpt"
>
<p>
BerkeleyX will be offering CS184.1x: Foundations of Computer Graphics starting on November 5, 2012.
</p>
<p><a
href=
"#"
>
Learn More ›
</a></p>
</div>
</section>
<section
class=
"page"
>
<div
class=
"news-image"
>
<a
href=
"#"
><img
src=
"/static/content-mit-6002x/images/course_image.jpg"
/></a>
</div>
<h5><a
href=
"#"
>
MIT has a new class
</a></h5>
<div
class=
"excerpt"
>
<p>
BerkeleyX will be offering CS184.1x: Foundations of Computer Graphics starting on November 5, 2012.
</p>
<p><a
href=
"#"
>
Learn More ›
</a></p>
</div>
</section>
<section
class=
"page"
>
<div
class=
"news-image"
>
<a
href=
"#"
><img
src=
"/static/6.00x/images/course_image.jpg"
/></a>
</div>
<h5><a
href=
"#"
>
Look at this class, too!
</a></h5>
<div
class=
"excerpt"
>
<p>
BerkeleyX will be offering CS184.1x: Foundations of Computer Graphics starting on November 5, 2012.
</p>
<p><a
href=
"#"
>
Learn More ›
</a></p>
</div>
</section>
</div>
</article>
</section>
<section
class=
"my-courses"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment