diff --git a/css/main.css b/css/main.css index 4d6404b..3858256 100644 --- a/css/main.css +++ b/css/main.css @@ -36,3 +36,22 @@ body { fill: none; stroke-width: 2px; } + +.frame { width: 100%; height: 160px; padding: 0; } +.frame .slidee { margin: 0; padding: 0; height: 100%; list-style: none; } +.frame .slidee li { float: left; margin: 0 5px 0 0; padding: 0; width: 120px; height: 100%; } + +.scrollbar { + width: 100%; + height: 10px; + background-color: hsl(0, 0%, 94.1%); +} +.scrollbar .handle { + width: 100px; /* overriden if dynamicHandle: 1 */ + height: 100%; + background: #222; +} + +.slidee li { + border: 1px solid black; +} diff --git a/index.html b/index.html index 6ff0528..612c7fb 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,34 @@ +
+
+ +
+
+
+
+
@@ -72,6 +100,7 @@ + @@ -82,5 +111,6 @@ + diff --git a/js/main.js b/js/main.js index 09a159e..5652d8f 100644 --- a/js/main.js +++ b/js/main.js @@ -5,6 +5,30 @@ */ preprocessor.load(function(data) { + var $frame = $('.strecken-selector'); + var $slidee = $frame.children('ul').eq(0); + var $wrap = $frame.parent(); + var options = { + horizontal: 1, + itemNav: 'basic', + smart: 1, + activateOn: 'click', + mouseDragging: 1, + touchDragging: 1, + releaseSwing: 1, + startAt: 3, + scrollBar: $wrap.find('.scrollbar'), + scrollBy: 1, + pagesBar: $wrap.find('.pages'), + activatePageOn: 'click', + speed: 300, + elasticBounds: 1, + dragHandle: 1, + dynamicHandle: 1, + clickBar: 1, + }; + $('.frame').sly(options); + // Some sample code for a year selector - TODO: Improve a lot and move somewhere else var yearSelector = $("#seasonByYearSelector"); var seasons = processor.getSeasonsWithLapData();