diff --git a/css/style.css b/css/style.css
index 00d59f2..c731ef5 100644
--- a/css/style.css
+++ b/css/style.css
@@ -4,9 +4,11 @@
*{
margin: 0px;
padding: 0px;
- font-family: Arial, sans-serif;
+ font-family: Helvetica,Arial, sans-serif;
width: 100%;
height: 100%;
+ color: black;
+ text-decoration: none;
}
html body{
@@ -72,13 +74,18 @@ html body{
background: linear-gradient(to bottom, rgba(155,155,155,1) 0%,rgba(14,14,14,1) 100%);
}
#timeline {
- color: white;
+ color: white;
height: auto;
min-height: 50%;
max-height: 100%;
}
+
+#timeline section {
+ color: white;
+}
#player {
height: auto;
+
}
#playerlistsec {
@@ -112,6 +119,11 @@ footer{
float: left;
}
+
+#playerlistsec .menu li a{
+ color: black;
+ text-decoration: none;
+}
#playerlistsec .menu li.select{
height: 5%;
min-height: 50px;
@@ -126,14 +138,9 @@ footer{
}
#sidenav li {
+ clear: both;
+ display: list-item;
height: 30px;
width: 100px;
-}
-
-#sidenav li.subli {
- list-style: circle;
- margin-left: 50px;
-}
-#sidenav ul {
margin-left: 50px;
}
diff --git a/index.html b/index.html
index 3f97bce..3c0f197 100644
--- a/index.html
+++ b/index.html
@@ -20,9 +20,7 @@
- item1
- item2
- - item3
- - subitem1
- - subitem2
+ - item3
- item4
diff --git a/js/mlib.js b/js/mlib.js
index 2f35bad..6ba7f71 100644
--- a/js/mlib.js
+++ b/js/mlib.js
@@ -19,10 +19,11 @@ function pageLoad() {
actTrack = 0;
actChapter = 0;
createPlayList();
- jumpById(actTrack, actChapter);
+
select = document.getElementById('list' + actTrack + '.' + actChapter);
select.setAttribute("class", "select");
+ jumpById(actTrack, actChapter);
}
function createPlayList() {
@@ -34,10 +35,10 @@ function createPlayList() {
if (trackObj.chapters) {
for (var chapter in trackObj.chapters) {
var chapterObj = trackObj.chapters[chapter];
- listEntries = listEntries + "" + entryNumber++ + ": " + chapterObj.title + "";
+ listEntries = listEntries + "" + entryNumber++ + ": " + chapterObj.title + "";
}
} else {
- listEntries = listEntries + "" + entryNumber++ + ": " + trackObj.title + "";
+ listEntries = listEntries + "" + entryNumber++ + ": " + trackObj.title + "";
}
}
playList.innerHTML = listEntries;
@@ -58,22 +59,25 @@ function jumpById(trackId, chapterId) {
actTrack = trackId;
actChapter = chapterId;
-
+ trackChapChanged(actTrack, actChapter);
mediaSource.src = trackSrc + "#t=" + trackTime;
player.load();
}
function timeUpdate() {
+ var oldChapter = actChapter;
actChapter = calcChapterId(actTrack, player.currentTime);
- bread.innerHTML = createBreadCrumb(actTrack, actChapter);
+ if (actChapter !== oldChapter) {
+ trackChapChanged(actTrack, actChapter);
+ }
}
-function createBreadCrumb(trackId, chapterId) {
+function trackChapChanged(trackId, chapterId) {
episodeInfo.innerHTML = "";
trackInfo.innerHTML = "";
chapterInfo.innerHTML = "";
-
+
episodeInfo.innerHTML = episodeObj.info;
var trackObj = episodeObj.tracks[trackId];
trackInfo.innerHTML = trackObj.info;
@@ -83,11 +87,12 @@ function createBreadCrumb(trackId, chapterId) {
chapterInfo.innerHTML = chapterObj.info;
actNewTitle = actNewTitle + " -> " + chapterObj.title;
}
-
+
select.setAttribute("class", "");
select = document.getElementById('list' + actTrack + '.' + actChapter);
select.setAttribute("class", "select");
- return actNewTitle;
+
+ bread.innerHTML = actNewTitle;
}
function calcChapterId(trackId, time) {
var trackObj = episodeObj.tracks[trackId];
@@ -104,5 +109,6 @@ function calcChapterId(trackId, time) {
}
function trackEnded() {
- jumpById(actTrack + 1, 0);
+
+ jumpById(actTrack+1, 0);
}
\ No newline at end of file