summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2019-05-31 20:27:31 -0400
committerLukas Fleischer <lfleischer@calcurse.org>2019-05-31 20:28:07 -0400
commit40136423330ad6ecf5099126f2f0803ddcb3fb0d (patch)
tree98ec3438522e73003b042c2bd89a4ff92fa73c7e
parent9ec1ba4ef9329edb0ac48757ed63cb75edc54cff (diff)
downloadcalcurse.org-40136423330ad6ecf5099126f2f0803ddcb3fb0d.tar.gz
calcurse.org-40136423330ad6ecf5099126f2f0803ddcb3fb0d.zip
Remove outdated screenshots
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--css/lightbox.css181
-rw-r--r--images/screenshots/args.jpgbin52612 -> 0 bytes
-rw-r--r--images/screenshots/compact.pngbin33420 -> 0 bytes
-rw-r--r--images/screenshots/config.jpgbin67152 -> 0 bytes
-rw-r--r--images/screenshots/files.jpgbin196048 -> 0 bytes
-rw-r--r--images/screenshots/help.jpgbin69000 -> 0 bytes
-rw-r--r--images/screenshots/i18n.jpgbin135977 -> 0 bytes
-rw-r--r--images/screenshots/main-1.jpgbin94513 -> 0 bytes
-rw-r--r--images/screenshots/main-2.jpgbin62113 -> 0 bytes
-rw-r--r--images/screenshots/pcal.jpgbin123514 -> 0 bytes
-rw-r--r--images/screenshots/popup.jpgbin38528 -> 0 bytes
-rw-r--r--images/screenshots/theme.jpgbin63947 -> 0 bytes
-rw-r--r--images/screenshots/thumb/args.pngbin5196 -> 0 bytes
-rw-r--r--images/screenshots/thumb/compact.pngbin5932 -> 0 bytes
-rw-r--r--images/screenshots/thumb/config.pngbin5099 -> 0 bytes
-rw-r--r--images/screenshots/thumb/files.pngbin20925 -> 0 bytes
-rw-r--r--images/screenshots/thumb/help.pngbin5614 -> 0 bytes
-rw-r--r--images/screenshots/thumb/i18n.pngbin13797 -> 0 bytes
-rw-r--r--images/screenshots/thumb/main-1.pngbin7637 -> 0 bytes
-rw-r--r--images/screenshots/thumb/main-2.pngbin9656 -> 0 bytes
-rw-r--r--images/screenshots/thumb/pcal.pngbin5064 -> 0 bytes
-rw-r--r--images/screenshots/thumb/popup.pngbin2883 -> 0 bytes
-rw-r--r--images/screenshots/thumb/theme.pngbin5559 -> 0 bytes
-rw-r--r--index.html74
-rw-r--r--js/lightbox.js351
25 files changed, 1 insertions, 605 deletions
diff --git a/css/lightbox.css b/css/lightbox.css
deleted file mode 100644
index 60c2b27..0000000
--- a/css/lightbox.css
+++ /dev/null
@@ -1,181 +0,0 @@
-/* line 6, ../sass/lightbox.sass */
-#lightboxOverlay {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 9999;
- background-color: black;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
- opacity: 0.85;
- display: none;
-}
-
-/* line 15, ../sass/lightbox.sass */
-#lightbox {
- position: absolute;
- left: 0;
- width: 100%;
- z-index: 10000;
- text-align: center;
- line-height: 0;
- font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
- font-weight: normal;
-}
-/* line 24, ../sass/lightbox.sass */
-#lightbox img {
- width: auto;
- height: auto;
-}
-/* line 27, ../sass/lightbox.sass */
-#lightbox a img {
- border: none;
-}
-
-/* line 30, ../sass/lightbox.sass */
-.lb-outerContainer {
- position: relative;
- background-color: white;
- *zoom: 1;
- width: 250px;
- height: 250px;
- margin: 0 auto;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- -ms-border-radius: 4px;
- -o-border-radius: 4px;
- border-radius: 4px;
-}
-/* line 38, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.12.1/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
-.lb-outerContainer:after {
- content: "";
- display: table;
- clear: both;
-}
-
-/* line 39, ../sass/lightbox.sass */
-.lb-container {
- padding: 10px;
-}
-
-/* line 42, ../sass/lightbox.sass */
-.lb-loader {
- position: absolute;
- top: 40%;
- left: 0%;
- height: 25%;
- width: 100%;
- text-align: center;
- line-height: 0;
-}
-
-/* line 51, ../sass/lightbox.sass */
-.lb-nav {
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- z-index: 10;
-}
-
-/* line 59, ../sass/lightbox.sass */
-.lb-container > .nav {
- left: 0;
-}
-
-/* line 62, ../sass/lightbox.sass */
-.lb-nav a {
- outline: none;
-}
-
-/* line 65, ../sass/lightbox.sass */
-.lb-prev, .lb-next {
- width: 49%;
- height: 100%;
- background-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
- /* Trick IE into showing hover */
- display: block;
-}
-
-/* line 72, ../sass/lightbox.sass */
-.lb-prev {
- left: 0;
- float: left;
-}
-
-/* line 76, ../sass/lightbox.sass */
-.lb-next {
- right: 0;
- float: right;
-}
-
-/* line 81, ../sass/lightbox.sass */
-.lb-prev:hover {
- background: url(../images/prev.png) left 48% no-repeat;
-}
-
-/* line 85, ../sass/lightbox.sass */
-.lb-next:hover {
- background: url(../images/next.png) right 48% no-repeat;
-}
-
-/* line 88, ../sass/lightbox.sass */
-.lb-dataContainer {
- margin: 0 auto;
- padding-top: 5px;
- *zoom: 1;
- width: 100%;
- -moz-border-radius-bottomleft: 4px;
- -webkit-border-bottom-left-radius: 4px;
- -ms-border-bottom-left-radius: 4px;
- -o-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -ms-border-bottom-right-radius: 4px;
- -o-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
-}
-/* line 38, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.12.1/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
-.lb-dataContainer:after {
- content: "";
- display: table;
- clear: both;
-}
-
-/* line 95, ../sass/lightbox.sass */
-.lb-data {
- padding: 0 10px;
- color: #bbbbbb;
-}
-/* line 98, ../sass/lightbox.sass */
-.lb-data .lb-details {
- width: 85%;
- float: left;
- text-align: left;
- line-height: 1.1em;
-}
-/* line 103, ../sass/lightbox.sass */
-.lb-data .lb-caption {
- font-size: 13px;
- font-weight: bold;
- line-height: 1em;
-}
-/* line 107, ../sass/lightbox.sass */
-.lb-data .lb-number {
- display: block;
- clear: left;
- padding-bottom: 1em;
- font-size: 11px;
-}
-/* line 112, ../sass/lightbox.sass */
-.lb-data .lb-close {
- width: 35px;
- float: right;
- padding-bottom: 0.7em;
- outline: none;
-}
-/* line 117, ../sass/lightbox.sass */
-.lb-data .lb-close:hover {
- cursor: pointer;
-}
diff --git a/images/screenshots/args.jpg b/images/screenshots/args.jpg
deleted file mode 100644
index ba46a8d..0000000
--- a/images/screenshots/args.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/compact.png b/images/screenshots/compact.png
deleted file mode 100644
index 9fdfbd8..0000000
--- a/images/screenshots/compact.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/config.jpg b/images/screenshots/config.jpg
deleted file mode 100644
index af8816f..0000000
--- a/images/screenshots/config.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/files.jpg b/images/screenshots/files.jpg
deleted file mode 100644
index ca5d52c..0000000
--- a/images/screenshots/files.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/help.jpg b/images/screenshots/help.jpg
deleted file mode 100644
index f56957d..0000000
--- a/images/screenshots/help.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/i18n.jpg b/images/screenshots/i18n.jpg
deleted file mode 100644
index f07ac1c..0000000
--- a/images/screenshots/i18n.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/main-1.jpg b/images/screenshots/main-1.jpg
deleted file mode 100644
index 1ce24f2..0000000
--- a/images/screenshots/main-1.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/main-2.jpg b/images/screenshots/main-2.jpg
deleted file mode 100644
index 2a92e5f..0000000
--- a/images/screenshots/main-2.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/pcal.jpg b/images/screenshots/pcal.jpg
deleted file mode 100644
index 9fe9605..0000000
--- a/images/screenshots/pcal.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/popup.jpg b/images/screenshots/popup.jpg
deleted file mode 100644
index 0294010..0000000
--- a/images/screenshots/popup.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/theme.jpg b/images/screenshots/theme.jpg
deleted file mode 100644
index 2eb72d7..0000000
--- a/images/screenshots/theme.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/args.png b/images/screenshots/thumb/args.png
deleted file mode 100644
index 80e0f0c..0000000
--- a/images/screenshots/thumb/args.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/compact.png b/images/screenshots/thumb/compact.png
deleted file mode 100644
index dcf9299..0000000
--- a/images/screenshots/thumb/compact.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/config.png b/images/screenshots/thumb/config.png
deleted file mode 100644
index 28cc7f0..0000000
--- a/images/screenshots/thumb/config.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/files.png b/images/screenshots/thumb/files.png
deleted file mode 100644
index 6aa10ba..0000000
--- a/images/screenshots/thumb/files.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/help.png b/images/screenshots/thumb/help.png
deleted file mode 100644
index 2f086e6..0000000
--- a/images/screenshots/thumb/help.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/i18n.png b/images/screenshots/thumb/i18n.png
deleted file mode 100644
index eff53d9..0000000
--- a/images/screenshots/thumb/i18n.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/main-1.png b/images/screenshots/thumb/main-1.png
deleted file mode 100644
index 362a255..0000000
--- a/images/screenshots/thumb/main-1.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/main-2.png b/images/screenshots/thumb/main-2.png
deleted file mode 100644
index 0e84637..0000000
--- a/images/screenshots/thumb/main-2.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/pcal.png b/images/screenshots/thumb/pcal.png
deleted file mode 100644
index ec358ed..0000000
--- a/images/screenshots/thumb/pcal.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/popup.png b/images/screenshots/thumb/popup.png
deleted file mode 100644
index 825054b..0000000
--- a/images/screenshots/thumb/popup.png
+++ /dev/null
Binary files differ
diff --git a/images/screenshots/thumb/theme.png b/images/screenshots/thumb/theme.png
deleted file mode 100644
index 392bf6e..0000000
--- a/images/screenshots/thumb/theme.png
+++ /dev/null
Binary files differ
diff --git a/index.html b/index.html
index 24bd3dc..5cae8d3 100644
--- a/index.html
+++ b/index.html
@@ -8,11 +8,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src="/js/lightbox.js"></script>
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./css/style.css" media="all" />
- <link rel="stylesheet" type="text/css" href="/css/lightbox.css" media="screen" />
<script type="application/ld+json">
{
@@ -76,81 +74,11 @@
<li><strong>UTF-8</strong> support</li>
</ul>
-<h2 id="screenshots">Demo and Screenshots</h2>
+<h2 id="screenshots">Demo</h2>
<p style="text-align: center; padding:1cm;">
<img src="/images/demo.gif" alt="Demo">
</p>
-<div style="text-align: center;">
- <ul class="gallery">
- <li>
- <a href="/images/screenshots/main-1.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/main-1.png" alt="main screen">
- <span>Main screen</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/main-2.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/main-2.png" alt="alternative color scheme">
- <span>Alternative color scheme</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/compact.png" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/compact.png" alt="compact mode">
- <span>Compact panels</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/popup.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/popup.png" alt="popup">
- <span>Item popup</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/theme.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/theme.png" alt="themes">
- <span>Color configuration</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/config.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/config.png" alt="config">
- <span>Layout configuration</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/help.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/help.png" alt="themes">
- <span>Online help</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/files.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/files.png" alt="data files">
- <span>Configuration file</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/args.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/args.png" alt="command-line arguments">
- <span>Command-line arguments</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/i18n.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/i18n.png" alt="calcurse and i18n">
- <span>Internationalization</span>
- </a>
- </li>
- <li>
- <a href="/images/screenshots/pcal.jpg" rel="lightbox[screenshot]">
- <img src="/images/screenshots/thumb/pcal.png" alt="calcurse pcal export">
- <span>Exports</span>
- </a>
- </li>
- </ul>
-</div>
</div>
<div id="footer">
Copyright &copy; 2012-2018 <a href="/support/#devs">calcurse Development Team</a>.
diff --git a/js/lightbox.js b/js/lightbox.js
deleted file mode 100644
index 14fb3ad..0000000
--- a/js/lightbox.js
+++ /dev/null
@@ -1,351 +0,0 @@
-
-/*
-Lightbox v2.51
-by Lokesh Dhakar - http://www.lokeshdhakar.com
-
-For more information, visit:
-http://lokeshdhakar.com/projects/lightbox2/
-
-Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
-- free for use in both personal and commercial projects
-- attribution requires leaving author name, author link, and the license info intact
-
-Thanks
-- Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), and Thomas Fuchs(mir.aculo.us) for ideas, libs, and snippets.
-- Artemy Tregubenko (arty.name) for cleanup and help in updating to latest proto-aculous in v2.05.
-
-
-Table of Contents
-=================
-LightboxOptions
-
-Lightbox
-- constructor
-- init
-- enable
-- build
-- start
-- changeImage
-- sizeContainer
-- showImage
-- updateNav
-- updateDetails
-- preloadNeigbhoringImages
-- enableKeyboardNav
-- disableKeyboardNav
-- keyboardAction
-- end
-
-options = new LightboxOptions
-lightbox = new Lightbox options
-*/
-
-(function() {
- var $, Lightbox, LightboxOptions;
-
- $ = jQuery;
-
- LightboxOptions = (function() {
-
- function LightboxOptions() {
- this.fileLoadingImage = '/images/loading.gif';
- this.fileCloseImage = '/images/close.png';
- this.resizeDuration = 700;
- this.fadeDuration = 500;
- this.labelImage = "Image";
- this.labelOf = "of";
- }
-
- return LightboxOptions;
-
- })();
-
- Lightbox = (function() {
-
- function Lightbox(options) {
- this.options = options;
- this.album = [];
- this.currentImageIndex = void 0;
- this.init();
- }
-
- Lightbox.prototype.init = function() {
- this.enable();
- return this.build();
- };
-
- Lightbox.prototype.enable = function() {
- var _this = this;
- return $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox]', function(e) {
- _this.start($(e.currentTarget));
- return false;
- });
- };
-
- Lightbox.prototype.build = function() {
- var $lightbox,
- _this = this;
- $("<div>", {
- id: 'lightboxOverlay'
- }).after($('<div/>', {
- id: 'lightbox'
- }).append($('<div/>', {
- "class": 'lb-outerContainer'
- }).append($('<div/>', {
- "class": 'lb-container'
- }).append($('<img/>', {
- "class": 'lb-image'
- }), $('<div/>', {
- "class": 'lb-nav'
- }).append($('<a/>', {
- "class": 'lb-prev'
- }), $('<a/>', {
- "class": 'lb-next'
- })), $('<div/>', {
- "class": 'lb-loader'
- }).append($('<a/>', {
- "class": 'lb-cancel'
- }).append($('<img/>', {
- src: this.options.fileLoadingImage
- }))))), $('<div/>', {
- "class": 'lb-dataContainer'
- }).append($('<div/>', {
- "class": 'lb-data'
- }).append($('<div/>', {
- "class": 'lb-details'
- }).append($('<span/>', {
- "class": 'lb-caption'
- }), $('<span/>', {
- "class": 'lb-number'
- })), $('<div/>', {
- "class": 'lb-closeContainer'
- }).append($('<a/>', {
- "class": 'lb-close'
- }).append($('<img/>', {
- src: this.options.fileCloseImage
- }))))))).appendTo($('body'));
- $('#lightboxOverlay').hide().on('click', function(e) {
- _this.end();
- return false;
- });
- $lightbox = $('#lightbox');
- $lightbox.hide().on('click', function(e) {
- if ($(e.target).attr('id') === 'lightbox') _this.end();
- return false;
- });
- $lightbox.find('.lb-outerContainer').on('click', function(e) {
- if ($(e.target).attr('id') === 'lightbox') _this.end();
- return false;
- });
- $lightbox.find('.lb-prev').on('click', function(e) {
- _this.changeImage(_this.currentImageIndex - 1);
- return false;
- });
- $lightbox.find('.lb-next').on('click', function(e) {
- _this.changeImage(_this.currentImageIndex + 1);
- return false;
- });
- $lightbox.find('.lb-loader, .lb-close').on('click', function(e) {
- _this.end();
- return false;
- });
- };
-
- Lightbox.prototype.start = function($link) {
- var $lightbox, $window, a, i, imageNumber, left, top, _len, _ref;
- $(window).on("resize", this.sizeOverlay);
- $('select, object, embed').css({
- visibility: "hidden"
- });
- $('#lightboxOverlay').width($(document).width()).height($(document).height()).fadeIn(this.options.fadeDuration);
- this.album = [];
- imageNumber = 0;
- if ($link.attr('rel') === 'lightbox') {
- this.album.push({
- link: $link.attr('href'),
- title: $link.attr('title')
- });
- } else {
- _ref = $($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]');
- for (i = 0, _len = _ref.length; i < _len; i++) {
- a = _ref[i];
- this.album.push({
- link: $(a).attr('href'),
- title: $(a).attr('title')
- });
- if ($(a).attr('href') === $link.attr('href')) imageNumber = i;
- }
- }
- $window = $(window);
- top = $window.scrollTop() + $window.height() / 10;
- left = $window.scrollLeft();
- $lightbox = $('#lightbox');
- $lightbox.css({
- top: top + 'px',
- left: left + 'px'
- }).fadeIn(this.options.fadeDuration);
- this.changeImage(imageNumber);
- };
-
- Lightbox.prototype.changeImage = function(imageNumber) {
- var $image, $lightbox, preloader,
- _this = this;
- this.disableKeyboardNav();
- $lightbox = $('#lightbox');
- $image = $lightbox.find('.lb-image');
- this.sizeOverlay();
- $('#lightboxOverlay').fadeIn(this.options.fadeDuration);
- $('.loader').fadeIn('slow');
- $lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
- $lightbox.find('.lb-outerContainer').addClass('animating');
- preloader = new Image;
- preloader.onload = function() {
- $image.attr('src', _this.album[imageNumber].link);
- $image.width = preloader.width;
- $image.height = preloader.height;
- return _this.sizeContainer(preloader.width, preloader.height);
- };
- preloader.src = this.album[imageNumber].link;
- this.currentImageIndex = imageNumber;
- };
-
- Lightbox.prototype.sizeOverlay = function() {
- return $('#lightboxOverlay').width($(document).width()).height($(document).height());
- };
-
- Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
- var $container, $lightbox, $outerContainer, containerBottomPadding, containerLeftPadding, containerRightPadding, containerTopPadding, newHeight, newWidth, oldHeight, oldWidth,
- _this = this;
- $lightbox = $('#lightbox');
- $outerContainer = $lightbox.find('.lb-outerContainer');
- oldWidth = $outerContainer.outerWidth();
- oldHeight = $outerContainer.outerHeight();
- $container = $lightbox.find('.lb-container');
- containerTopPadding = parseInt($container.css('padding-top'), 10);
- containerRightPadding = parseInt($container.css('padding-right'), 10);
- containerBottomPadding = parseInt($container.css('padding-bottom'), 10);
- containerLeftPadding = parseInt($container.css('padding-left'), 10);
- newWidth = imageWidth + containerLeftPadding + containerRightPadding;
- newHeight = imageHeight + containerTopPadding + containerBottomPadding;
- if (newWidth !== oldWidth && newHeight !== oldHeight) {
- $outerContainer.animate({
- width: newWidth,
- height: newHeight
- }, this.options.resizeDuration, 'swing');
- } else if (newWidth !== oldWidth) {
- $outerContainer.animate({
- width: newWidth
- }, this.options.resizeDuration, 'swing');
- } else if (newHeight !== oldHeight) {
- $outerContainer.animate({
- height: newHeight
- }, this.options.resizeDuration, 'swing');
- }
- setTimeout(function() {
- $lightbox.find('.lb-dataContainer').width(newWidth);
- $lightbox.find('.lb-prevLink').height(newHeight);
- $lightbox.find('.lb-nextLink').height(newHeight);
- _this.showImage();
- }, this.options.resizeDuration);
- };
-
- Lightbox.prototype.showImage = function() {
- var $lightbox;
- $lightbox = $('#lightbox');
- $lightbox.find('.lb-loader').hide();
- $lightbox.find('.lb-image').fadeIn('slow');
- this.updateNav();
- this.updateDetails();
- this.preloadNeighboringImages();
- this.enableKeyboardNav();
- };
-
- Lightbox.prototype.updateNav = function() {
- var $lightbox;
- $lightbox = $('#lightbox');
- $lightbox.find('.lb-nav').show();
- if (this.currentImageIndex > 0) $lightbox.find('.lb-prev').show();
- if (this.currentImageIndex < this.album.length - 1) {
- $lightbox.find('.lb-next').show();
- }
- };
-
- Lightbox.prototype.updateDetails = function() {
- var $lightbox,
- _this = this;
- $lightbox = $('#lightbox');
- if (typeof this.album[this.currentImageIndex].title !== 'undefined' && this.album[this.currentImageIndex].title !== "") {
- $lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast');
- }
- if (this.album.length > 1) {
- $lightbox.find('.lb-number').html(this.options.labelImage + ' ' + (this.currentImageIndex + 1) + ' ' + this.options.labelOf + ' ' + this.album.length).fadeIn('fast');
- } else {
- $lightbox.find('.lb-number').hide();
- }
- $lightbox.find('.lb-outerContainer').removeClass('animating');
- $lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration, function() {
- return _this.sizeOverlay();
- });
- };
-
- Lightbox.prototype.preloadNeighboringImages = function() {
- var preloadNext, preloadPrev;
- if (this.album.length > this.currentImageIndex + 1) {
- preloadNext = new Image;
- preloadNext.src = this.album[this.currentImageIndex + 1].link;
- }
- if (this.currentImageIndex > 0) {
- preloadPrev = new Image;
- preloadPrev.src = this.album[this.currentImageIndex - 1].link;
- }
- };
-
- Lightbox.prototype.enableKeyboardNav = function() {
- $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
- };
-
- Lightbox.prototype.disableKeyboardNav = function() {
- $(document).off('.keyboard');
- };
-
- Lightbox.prototype.keyboardAction = function(event) {
- var KEYCODE_ESC, KEYCODE_LEFTARROW, KEYCODE_RIGHTARROW, key, keycode;
- KEYCODE_ESC = 27;
- KEYCODE_LEFTARROW = 37;
- KEYCODE_RIGHTARROW = 39;
- keycode = event.keyCode;
- key = String.fromCharCode(keycode).toLowerCase();
- if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
- this.end();
- } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
- if (this.currentImageIndex !== 0) {
- this.changeImage(this.currentImageIndex - 1);
- }
- } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
- if (this.currentImageIndex !== this.album.length - 1) {
- this.changeImage(this.currentImageIndex + 1);
- }
- }
- };
-
- Lightbox.prototype.end = function() {
- this.disableKeyboardNav();
- $(window).off("resize", this.sizeOverlay);
- $('#lightbox').fadeOut(this.options.fadeDuration);
- $('#lightboxOverlay').fadeOut(this.options.fadeDuration);
- return $('select, object, embed').css({
- visibility: "visible"
- });
- };
-
- return Lightbox;
-
- })();
-
- $(function() {
- var lightbox, options;
- options = new LightboxOptions;
- return lightbox = new Lightbox(options);
- });
-
-}).call(this);