From fdd362ef4b8c20ce5a4ae23a788731da1059dc30 Mon Sep 17 00:00:00 2001 From: David Seifried Date: Fri, 3 Jun 2011 17:39:05 -0400 Subject: [PATCH] [#384]Made a few styling changes, beginning more work on monday/over the weekend --- plugins/timeline/popcorn.timeline.css | 52 +++++++++++++++ plugins/timeline/popcorn.timeline.html | 90 ++++++++++++++++++++++++++ plugins/timeline/popcorn.timeline.js | 68 +++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 plugins/timeline/popcorn.timeline.css create mode 100644 plugins/timeline/popcorn.timeline.html create mode 100644 plugins/timeline/popcorn.timeline.js diff --git a/plugins/timeline/popcorn.timeline.css b/plugins/timeline/popcorn.timeline.css new file mode 100644 index 0000000..cb94c54 --- /dev/null +++ b/plugins/timeline/popcorn.timeline.css @@ -0,0 +1,52 @@ +@charset "UTF-8"; +body { +font-family: "Helvetica Neue", Helvetica, Arial; +font-size:12px; +} + +#footer { +width: 100%; +height: 20px; +position: fixed; +text-align:right; +right: 0px; +overflow: hidden; +background-color:#000000; +color: white; +top: 0; +border-bottom: 1px solid #333; +padding: 10px; +} +#playback { +width: 700px; +left: 0px; +top: 0px; +z-index:100; +} + +#details2 { +color: #fff; +padding: 7px; +right: 0px; +top: 0px; +line-height: 180%; +} +#details3 { +padding: 7px; +right: 0px; +top: 0px; +line-height: 180%; +border-top: 1px solid #333; +} +#big { +font-size:24px; +line-height: 130%; +} +#mid { +font-size: 16px; +} + +// Thanks again to Nic for this css + + + diff --git a/plugins/timeline/popcorn.timeline.html b/plugins/timeline/popcorn.timeline.html new file mode 100644 index 0000000..498162e --- /dev/null +++ b/plugins/timeline/popcorn.timeline.html @@ -0,0 +1,90 @@ + + + + Popcorn Google Feed Plug-in Demo + + + + + + + +

Popcorn Timeline Plug-in Demo

+

Continuos timeline elements will be added to the div throughout the video

+
+ +
+
+

Vertical Feed:

+
+ + diff --git a/plugins/timeline/popcorn.timeline.js b/plugins/timeline/popcorn.timeline.js new file mode 100644 index 0000000..7d98c0c --- /dev/null +++ b/plugins/timeline/popcorn.timeline.js @@ -0,0 +1,68 @@ +// PLUGIN: Timeline +(function (Popcorn) { + + var i = 0; + + var head = document.getElementsByTagName("head")[0]; + var css = document.createElement('link'); + css.type = "text/css"; + css.rel = "stylesheet"; + css.href = "asdf.css"; + head.insertBefore( css, head.firstChild ); + + + Popcorn.plugin( "timeline" , function( options ) { + + // create a new div and append it to the parent div so nothing + // that already exists in the parent div gets overwritten + var newdiv = document.createElement( "div" ); + newdiv.style.display = "none"; + newdiv.id = "timelineDiv"+i; + + if ( document.getElementById( options.target ) ) { + + document.getElementById( options.target ).appendChild( newdiv ); + + // if this isnt the first div added to the target div + if( i ){ + + // insert the current div before the previous div inserted + document.getElementById( options.target ).insertBefore( newdiv, document.getElementById( "timelineDiv" + ( i - 1 ) ) ); + } + } + + i++; + + newdiv.innerHTML = "

" + options.title + "
" + + "" + options.text + "
" + + "
" + options.links + "

"; + + return { + + start: function( event, options ){ + newdiv.setAttribute( "style", "display:block" ); + }, + + end: function(event, options){ + newdiv.setAttribute( "style", "display:none" ); + } + }; + }, + { + + about: { + name: "Popcorn Timeline Plugin", + version: "0.1", + author: "David Seifried @dcseifried", + website: "dseifried.wordpress.com" + }, + + options: { + start : { elem:"input", type:"text", label:"In" }, + end : { elem:"input", type:"text", label:"Out" }, + target : "feed-container", + text : { elem:"input", type:"text", label:"text" } + } + }); + +})( Popcorn ); -- 2.43.0