Added Slider.js to homepage
authorGarry Collum <gcollum@gmail.com>
Wed, 20 Jul 2016 19:15:38 +0000 (15:15 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 10 Aug 2016 16:21:10 +0000 (12:21 -0400)
Open-ILS/src/kcpl_templates/opac/css/js-image-slider.css.tt2 [new file with mode: 0644]
Open-ILS/src/kcpl_templates/opac/parts/base.tt2 [new file with mode: 0644]
Open-ILS/src/kcpl_templates/opac/parts/homesearch.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/src/kcpl_templates/opac/css/js-image-slider.css.tt2 b/Open-ILS/src/kcpl_templates/opac/css/js-image-slider.css.tt2
new file mode 100644 (file)
index 0000000..bdc49d6
--- /dev/null
@@ -0,0 +1,114 @@
+/* http://www.menucool.com */\r
+\r
+/*slider frame*/\r
+#sliderFrame \r
+{\r
+    width:690px;\r
+    margin:0 auto; /*remove the "margin:0 auto;" if you want to align the whole slider to the left side*/\r
+    padding:20px;\r
+    box-shadow: 0 0 5px #BBB;border:1px solid #CCC; background-color:#FFF;\r
+}\r
+     \r
+        \r
+\r
+#slider {\r
+    float:left;\r
+    width:400px;height:315px;/* Make it the same size as your images. */\r
+       background:#fff url(loading.gif) no-repeat 50% 50%;\r
+       position:relative;\r
+       margin:0 auto;/*make the image slider center-aligned */\r
+}\r
+#slider img {\r
+       position:absolute;\r
+       border:none;\r
+       visibility:hidden;\r
+}\r
+\r
+/* the link style (if an image is wrapped in a link) */\r
+#slider a.imgLink {\r
+       z-index:2;\r
+       display:none;position:absolute;\r
+       top:0px;left:0px;border:0;padding:0;margin:0;\r
+       width:100%;height:100%;\r
+}\r
+\r
+/* Caption styles */\r
+div.mc-caption-bg, div.mc-caption-bg2 {\r
+       position:absolute;\r
+       width:400px;\r
+       height:auto;\r
+       padding:10px;\r
+       left:120px; /*if the caption needs to be aligned from right, specify by right instead of left. i.e. right:20px;*/\r
+       bottom:10px;/*if the caption needs to be aligned from top, specify by top instead of bottom. i.e. top:150px;*/\r
+       z-index:3;\r
+       overflow:hidden;\r
+       font-size:0;\r
+}\r
+div.mc-caption-bg {\r
+       background:#DDD; /*Caption background color. Can be set to "background:transparent;", or set to semi-transparent through the sliderOptions.captionOpacity setting in the javascript.*/\r
+       border:1px solid white;\r
+       border-radius: 5px;\r
+}\r
+div.mc-caption {\r
+       font:bold 13px/16px Arial;\r
+       color:#069;\r
+       z-index:4;\r
+       text-align:center;\r
+}\r
+\r
+/* ADded to manke the captions invisible */\r
+div.mc-caption-bg, div.mc-caption-bg2 {\r
+       display: none;\r
+}\r
+div.mc-caption a { \r
+       color:#060;\r
+}\r
+\r
+\r
+/* ------ built-in navigation bullets wrapper that is relative to the #slider ------*/\r
+div.navBulletsWrapper  {\r
+       display:none;\r
+}\r
+\r
+\r
+/*thumbnails*/\r
+#thumbs \r
+{\r
+    float:left;\r
+    margin-left:10px;\r
+    width:230px;\r
+    font:normal 11px/13px Arial;\r
+    border-top:1px solid #CCC;\r
+    color:#666;\r
+}\r
+#thumbs .thumb \r
+{\r
+    border:1px solid #CCC;\r
+    border-top:1px solid #FFF;\r
+    padding:11px 8px;\r
+    background:#EEE;\r
+}\r
+#thumbs .thumb-on \r
+{\r
+    background:#FFF;\r
+}\r
+\r
+#thumbs img{border:1px solid #DDD; cursor:pointer; width:70px; height:44px;}\r
+\r
+#thumbs .frame {float:left;padding:2px;border:1px solid #CCC;background:white;border-radius:3px;box-shadow:0 0 3px #BBB;font-size:0;line-height:0;}\r
+#thumbs .thumb-content {float:left;width:110px;padding-left:18px;}\r
+\r
+/* Captions in #thumbs .thumb-content */\r
+#thumbs .thumb-content p {font-weight:bold; color:#BF5D9B; margin:0 0 3px;padding:0;}\r
+#thumbs .thumb-on .thumb-content p {color:#BB0000;}\r
+\r
+\r
+/* --------- Others ------- */\r
+#slider \r
+{\r
+       transform: translate3d(0,0,0);\r
+    -ms-transform:translate3d(0,0,0);\r
+    -moz-transform:translate3d(0,0,0);\r
+    -o-transform:translate3d(0,0,0);\r
+}\r
+\r
diff --git a/Open-ILS/src/kcpl_templates/opac/parts/base.tt2 b/Open-ILS/src/kcpl_templates/opac/parts/base.tt2
new file mode 100644 (file)
index 0000000..9d6e16b
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang='[% ctx.locale.replace('_', '-') %]'>
+    <head prefix="og: http://ogp.me/ns#">
+        <meta charset="utf-8" />
+        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+        [% IF ctx.refresh %]
+        <meta http-equiv="refresh" content="[% ctx.refresh %]" />
+        [% ELSIF ctx.authtime AND !ctx.is_staff %]
+        <meta http-equiv="refresh" content="[% ctx.authtime %]; url=[% ctx.home_page %]" />
+        [% END %]
+        <meta name = "viewport" content = "initial-scale = 1.0">
+        <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
+        <link rel="stylesheet" type="text/css" href="[% ctx.opac_root %]/css/style.css" />
+        <link rel="stylesheet" type="text/css" href="[% ctx.opac_root %]/css/js-image-slider.css" />
+        [%- libname = ctx.get_aou(ctx.search_ou).name;
+            libname = libname | html;
+            libsname = ctx.get_aou(ctx.search_ou).shortname; %]
+        <title>[%- IF ctx.user_stats.messages.unread;
+                      l('([_1])', ctx.user_stats.messages.unread);
+                   END;
+               -%]
+               [% l('[_1] - [_2]', ctx.page_title, libname) %]</title>
+        <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
+        <link type="application/opensearchdescription+xml" rel='search' title="[% l('[_1] OpenSearch', libname) %]" href="/opac/extras/opensearch/1.1/[% libsname | uri %]/-/osd.xml" />
+        [%-# Hook for page-specific metadata such as <meta name="robots" content="noindex"> %]
+        [%- ctx.metalinks.push('<meta property="og:title" content="' _ ctx.page_title _ '" />'); %]
+        [%- ctx.metalinks.push('<meta property="og:site_name" content="' _ libname _ '" />'); %]
+        [% FOREACH meta IN ctx.metalinks; meta _ "\n"; END; -%]
+        [% IF want_dojo %]
+        <style type="text/css">
+            @import "[% ctx.media_prefix %]/js/dojo/dijit/themes/tundra/tundra.css";
+        </style>
+        [% END %]
+
+        [% IF !ctx.is_staff %]
+            [% INCLUDE 'opac/parts/goog_analytics.tt2' %]
+        [% END %]
+        [% PROCESS 'opac/parts/stripe.tt2' %]
+    </head>
+    <body[% IF want_dojo; ' class="tundra"'; END %]>
+        <h1 class="sr-only">[% l('Catalog') %]</h1>
+        [%#Each content page needs (at minimum) an <h2> describing the content%]
+        [% content %] 
+        <h2 class="sr-only">[% l('Additional Resources') %]</h2>
+        [% INCLUDE 'opac/parts/footer.tt2' %]
+        [% INCLUDE 'opac/parts/js.tt2' %]
+        [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
+            [%- INCLUDE 'opac/parts/chilifresh.tt2' %]
+        [%- END %]
+    </body>
+</html>
diff --git a/Open-ILS/src/kcpl_templates/opac/parts/homesearch.tt2 b/Open-ILS/src/kcpl_templates/opac/parts/homesearch.tt2
new file mode 100644 (file)
index 0000000..efeafd8
--- /dev/null
@@ -0,0 +1,39 @@
+<!-- <div id="homesearch_main_logo">
+    <img src="[% ctx.media_prefix %]/opac/images/main_logo.png" 
+        [% img_alt(l('Evergreen Logo')) %]/>
+</div>
+-->
+
+<div id="sliderFrame">
+  <div id="slider">
+     <a href="http://www.kentonlibrary.org/freegal"> <img src="[% ctx.media_prefix %]/opac/images/kcpl/slider01.png" alt="Slider image 1" /></a>
+     <a href="http://www.kentonlibrary.org/ebooks"> <img src="[% ctx.media_prefix %]/opac/images/kcpl/slider02.png" alt="Slider image 2" /></a>
+     <a href="http://www.kentonlibrary.org/zinio"> <img src="[% ctx.media_prefix %]/opac/images/kcpl/slider03.png" alt="Slider image 3" /></a>
+     <a href="http://www.hoopladigital.com"> <img src="[% ctx.media_prefix %]/opac/images/kcpl/slider04.png" alt="Slider image 4" /></a>
+  </div>
+   <!--thumbnails-->
+   <div id="thumbs">
+     <div class="thumb">
+       <div class="frame"><img src="/opac/images/kcpl/thumb1.png" alt="Slider thumb1"/></div>
+        <div class="thumb-content"><p>Freegal</p>Download 5 Free Songs Each Week</div>
+       <div style="clear:both;"></div>
+    </div>
+     <div class="thumb">
+       <div class="frame"><img src="/opac/images/kcpl/thumb2.png" alt="Slider thumb2"/></div>
+        <div class="thumb-content"><p>eBooks</p>New eBooks Available</div>
+       <div style="clear:both;"></div>
+    </div>
+     <div class="thumb">
+       <div class="frame"><img src="/opac/images/kcpl/thumb3.png" alt="Slider thumb3"/></div>
+        <div class="thumb-content"><p>Download Magazines</p>Free on your PC, MAC or tablet</div>
+       <div style="clear:both;"></div>
+    </div>
+     <div class="thumb">
+       <div class="frame"><img src="/opac/images/kcpl/thumb4.png" alt="Slider thumb4"/></div>
+        <div class="thumb-content"><p>Download Music, Videos and Audio Books</p>Hoopla Digital</div>
+       <div style="clear:both;"></div>
+    </div>
+  </div>
+
+  <div style="clear:both;height:0;"></div>
+</div>