').appendTo("body"),s=r.children(),q=s.innerWidth()-s.height(99).innerWidth();r.remove();return q}}if(i.support.fixedPosition===e){i.support.fixedPosition=(function(){var r=i('').appendTo("body"),q=(r[0].offsetTop===20||r[0].offsetTop===15);r.remove();return q}())}i.extend(p.defaults,{scrollbarWidth:i.scrollbarWidth(),fixed:i.support.fixedPosition,parent:i("body")})})}(window,document,jQuery));
\ No newline at end of file
diff --git a/js/jquery-1.9.1.min.js b/resources/jQuery/jquery-1.9.1.min.js
similarity index 100%
rename from js/jquery-1.9.1.min.js
rename to resources/jQuery/jquery-1.9.1.min.js
diff --git a/resources/jquery-cookie/jquery.cookies.js b/resources/jquery-cookie/jquery.cookies.js
new file mode 100644
index 0000000..7401208
--- /dev/null
+++ b/resources/jquery-cookie/jquery.cookies.js
@@ -0,0 +1,8 @@
+/*!
+ * jQuery Cookie Plugin v1.3.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+(function(a,b,c){function e(a){return a}function f(a){return g(decodeURIComponent(a.replace(d," ")))}function g(a){return 0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),a}function h(a){return i.json?JSON.parse(a):a}var d=/\+/g,i=a.cookie=function(d,g,j){if(g!==c){if(j=a.extend({},i.defaults,j),null===g&&(j.expires=-1),"number"==typeof j.expires){var k=j.expires,l=j.expires=new Date;l.setDate(l.getDate()+k)}return g=i.json?JSON.stringify(g):g+"",b.cookie=[encodeURIComponent(d),"=",i.raw?g:encodeURIComponent(g),j.expires?"; expires="+j.expires.toUTCString():"",j.path?"; path="+j.path:"",j.domain?"; domain="+j.domain:"",j.secure?"; secure":""].join("")}for(var m=i.raw?e:f,n=b.cookie.split("; "),o=d?null:{},p=0,q=n.length;q>p;p++){var r=n[p].split("="),s=m(r.shift()),t=m(r.join("="));if(d&&d===s){o=h(t);break}d||(o[s]=h(t))}return o};i.defaults={},a.removeCookie=function(b,c){return null!==a.cookie(b)?(a.cookie(b,null,c),!0):!1}})(jQuery,document);
\ No newline at end of file
diff --git a/resources/lru/lru.js b/resources/lru/lru.js
new file mode 100644
index 0000000..d014942
--- /dev/null
+++ b/resources/lru/lru.js
@@ -0,0 +1,249 @@
+/**
+ * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most
+ * recently used items while discarding least recently used items when its limit
+ * is reached.
+ *
+ * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson
+ * See README.md for details.
+ *
+ * Illustration of the design:
+ *
+ * entry entry entry entry
+ * ______ ______ ______ ______
+ * | head |.newer => | |.newer => | |.newer => | tail |
+ * | A | | B | | C | | D |
+ * |______| <= older.|______| <= older.|______| <= older.|______|
+ *
+ * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added
+ */
+function LRUCache (limit) {
+ // Current size of the cache. (Read-only).
+ this.size = 0;
+ // Maximum number of items this cache can hold.
+ this.limit = limit;
+ this._keymap = {};
+}
+
+/**
+ * Put into the cache associated with . Returns the entry which was
+ * removed to make room for the new entry. Otherwise undefined is returned
+ * (i.e. if there was enough room already).
+ */
+LRUCache.prototype.put = function(key, value) {
+ var entry = {key:key, value:value};
+ // Note: No protection agains replacing, and thus orphan entries. By design.
+ this._keymap[key] = entry;
+ if (this.tail) {
+ // link previous tail to the new tail (entry)
+ this.tail.newer = entry;
+ entry.older = this.tail;
+ } else {
+ // we're first in -- yay
+ this.head = entry;
+ }
+ // add new entry to the end of the linked list -- it's now the freshest entry.
+ this.tail = entry;
+ if (this.size === this.limit) {
+ // we hit the limit -- remove the head
+ return this.shift();
+ } else {
+ // increase the size counter
+ this.size++;
+ }
+}
+
+/**
+ * Purge the least recently used (oldest) entry from the cache. Returns the
+ * removed entry or undefined if the cache was empty.
+ *
+ * If you need to perform any form of finalization of purged items, this is a
+ * good place to do it. Simply override/replace this function:
+ *
+ * var c = new LRUCache(123);
+ * c.shift = function() {
+ * var entry = LRUCache.prototype.shift.call(this);
+ * doSomethingWith(entry);
+ * return entry;
+ * }
+ */
+LRUCache.prototype.shift = function() {
+ // todo: handle special case when limit == 1
+ var entry = this.head;
+ if (entry) {
+ if (this.head.newer) {
+ this.head = this.head.newer;
+ this.head.older = undefined;
+ } else {
+ this.head = undefined;
+ }
+ // Remove last strong reference to and remove links from the purged
+ // entry being returned:
+ entry.newer = entry.older = undefined;
+ // delete is slow, but we need to do this to avoid uncontrollable growth:
+ delete this._keymap[entry.key];
+ }
+ return entry;
+}
+
+/**
+ * Get and register recent use of . Returns the value associated with
+ * or undefined if not in cache.
+ */
+LRUCache.prototype.get = function(key, returnEntry) {
+ // First, find our cache entry
+ var entry = this._keymap[key];
+ if (entry === undefined) return; // Not cached. Sorry.
+ // As was found in the cache, register it as being requested recently
+ if (entry === this.tail) {
+ // Already the most recenlty used entry, so no need to update the list
+ return entry.value;
+ }
+ // HEAD--------------TAIL
+ // <.older .newer>
+ // <--- add direction --
+ // A B C E
+ if (entry.newer) {
+ if (entry === this.head)
+ this.head = entry.newer;
+ entry.newer.older = entry.older; // C <-- E.
+ }
+ if (entry.older)
+ entry.older.newer = entry.newer; // C. --> E
+ entry.newer = undefined; // D --x
+ entry.older = this.tail; // D. --> E
+ if (this.tail)
+ this.tail.newer = entry; // E. <-- D
+ this.tail = entry;
+ return returnEntry ? entry : entry.value;
+}
+
+// ----------------------------------------------------------------------------
+// Following code is optional and can be removed without breaking the core
+// functionality.
+
+/**
+ * Check if is in the cache without registering recent use. Feasible if
+ * you do not want to chage the state of the cache, but only "peek" at it.
+ * Returns the entry associated with if found, or undefined if not found.
+ */
+LRUCache.prototype.find = function(key) {
+ return this._keymap[key];
+}
+
+/**
+ * Update the value of entry with . Returns the old value, or undefined if
+ * entry was not in the cache.
+ */
+LRUCache.prototype.set = function(key, value) {
+ var oldvalue, entry = this.get(key, true);
+ if (entry) {
+ oldvalue = entry.value;
+ entry.value = value;
+ } else {
+ oldvalue = this.put(key, value);
+ if (oldvalue) oldvalue = oldvalue.value;
+ }
+ return oldvalue;
+}
+
+/**
+ * Remove entry from cache and return its value. Returns undefined if not
+ * found.
+ */
+LRUCache.prototype.remove = function(key) {
+ var entry = this._keymap[key];
+ if (!entry) return;
+ delete this._keymap[entry.key]; // need to do delete unfortunately
+ if (entry.newer && entry.older) {
+ // relink the older entry with the newer entry
+ entry.older.newer = entry.newer;
+ entry.newer.older = entry.older;
+ } else if (entry.newer) {
+ // remove the link to us
+ entry.newer.older = undefined;
+ // link the newer entry to head
+ this.head = entry.newer;
+ } else if (entry.older) {
+ // remove the link to us
+ entry.older.newer = undefined;
+ // link the newer entry to head
+ this.tail = entry.older;
+ } else {// if(entry.older === undefined && entry.newer === undefined) {
+ this.head = this.tail = undefined;
+ }
+
+ this.size--;
+ return entry.value;
+}
+
+/** Removes all entries */
+LRUCache.prototype.removeAll = function() {
+ // This should be safe, as we never expose strong refrences to the outside
+ this.head = this.tail = undefined;
+ this.size = 0;
+ this._keymap = {};
+}
+
+/**
+ * Return an array containing all keys of entries stored in the cache object, in
+ * arbitrary order.
+ */
+if (typeof Object.keys === 'function') {
+ LRUCache.prototype.keys = function() { return Object.keys(this._keymap); }
+} else {
+ LRUCache.prototype.keys = function() {
+ var keys = [];
+ for (var k in this._keymap) keys.push(k);
+ return keys;
+ }
+}
+
+/**
+ * Call `fun` for each entry. Starting with the newest entry if `desc` is a true
+ * value, otherwise starts with the oldest (head) enrty and moves towards the
+ * tail.
+ *
+ * `fun` is called with 3 arguments in the context `context`:
+ * `fun.call(context, Object key, Object value, LRUCache self)`
+ */
+LRUCache.prototype.forEach = function(fun, context, desc) {
+ if (context === true) { desc = true; context = undefined; }
+ else if (typeof context !== 'object') context = this;
+ if (desc) {
+ var entry = this.tail;
+ while (entry) {
+ fun.call(context, entry.key, entry.value, this);
+ entry = entry.older;
+ }
+ } else {
+ var entry = this.head;
+ while (entry) {
+ fun.call(context, entry.key, entry.value, this);
+ entry = entry.newer;
+ }
+ }
+}
+
+/** Returns a JSON (array) representation */
+LRUCache.prototype.toJSON = function() {
+ var s = [], entry = this.head;
+ while (entry) {
+ s.push({key:entry.key.toJSON(), value:entry.value.toJSON()});
+ entry = entry.newer;
+ }
+ return s;
+}
+
+/** Returns a String representation */
+LRUCache.prototype.toString = function() {
+ var s = '', entry = this.head;
+ while (entry) {
+ s += String(entry.key)+':'+entry.value;
+ if (entry = entry.newer)
+ s += ' < ';
+ }
+ return s;
+}
+
+// Export ourselves
+if (typeof this === 'object') this.LRUCache = LRUCache;
diff --git a/styles/style-default.css b/styles/style-default.css
index 2f910db..6875370 100644
--- a/styles/style-default.css
+++ b/styles/style-default.css
@@ -46,6 +46,16 @@ a:hover { color:#000; text-decoration: none; }
.books:hover { width: 100%; background-color: #778899; }
.link a:hover { display:inline-block; width: 100%; background-color: #778899; /*Dirty IE Hack*/ zoom: 1; *display: inline;}
+.mfp-content .bookpopup {
+ position: relative;
+ background: #FFF;
+ padding: 20px;
+ width: auto;
+ max-width: 700px;
+ margin: 20px auto;
+}
+
+
img
{
margin:0;
@@ -156,8 +166,12 @@ max-width:800px;
text-decoration : none;
font-weight: bold;
padding: 5px 10px 5px 10px;
+ text-align: center;
}
+.download img {
+ vertical-align:middle;
+}
.books h4{
display: inline;
diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html
new file mode 100644
index 0000000..e5b5662
--- /dev/null
+++ b/templates/default/bookdetail.html
@@ -0,0 +1,53 @@
+
+
+ {{? it.book.hasCover == 1}}
+
+
+
+ {{?}}
+
+
+ {{?}}
+
\ No newline at end of file
diff --git a/templates/default/footer.html b/templates/default/footer.html
new file mode 100644
index 0000000..6c9863f
--- /dev/null
+++ b/templates/default/footer.html
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/templates/default/header.html b/templates/default/header.html
new file mode 100644
index 0000000..f94a40c
--- /dev/null
+++ b/templates/default/header.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+