Compare commits
7 Commits
master
...
2f3a3f9561
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f3a3f9561 | |||
| 55e40f76a1 | |||
| 4e9fb52318 | |||
| 850d2e7235 | |||
| 97645b3476 | |||
| ab914a391f | |||
| 842e02f4bb |
4
cli/cron.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
wget -qO- https://spot.lutran.fr/index.php?a=update_project > /dev/null
|
||||
|
||||
#Crontab job: 0 * * * * . /var/www/spot/spot_cron.sh > /dev/null
|
||||
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Franzz\\Spot\\": "inc/"
|
||||
"Franzz\\Spot\\": "lib/"
|
||||
},
|
||||
"files": [
|
||||
"settings.php"
|
||||
"config/settings.php"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
16
composer.lock
generated
@@ -27,16 +27,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.8.0",
|
||||
"version": "v6.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "df16b615e371d81fb79e506277faea67a1be18f1"
|
||||
"reference": "e88da8d679acc3824ff231fdc553565b802ac016"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/df16b615e371d81fb79e506277faea67a1be18f1",
|
||||
"reference": "df16b615e371d81fb79e506277faea67a1be18f1",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016",
|
||||
"reference": "e88da8d679acc3824ff231fdc553565b802ac016",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -46,13 +46,13 @@
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
||||
"doctrine/annotations": "^1.2.6 || ^1.13.3",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.7.1",
|
||||
"squizlabs/php_codesniffer": "^3.7.2",
|
||||
"yoast/phpunit-polyfills": "^1.0.4"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -95,7 +95,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.0"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -103,7 +103,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-03-06T14:43:22+00:00"
|
||||
"time": "2023-08-29T08:26:30+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
||||
@@ -36,18 +36,18 @@ class Converter extends PhpObject {
|
||||
|
||||
public static function isGeoJsonValid($sCodeName) {
|
||||
$bResult = false;
|
||||
$sGpxFilePath = Geo::getFilePath($sCodeName, Gpx::EXT);
|
||||
$sGeoJsonFilePath = Geo::getFilePath($sCodeName, GeoJson::EXT);
|
||||
$sGpxFilePath = Gpx::getFilePath($sCodeName);
|
||||
$sGeoJsonFilePath = GeoJson::getFilePath($sCodeName);
|
||||
|
||||
//No need to generate if gpx is missing
|
||||
if(!file_exists($sGpxFilePath) || file_exists($sGeoJsonFilePath) && filemtime($sGeoJsonFilePath) > filemtime(Geo::getFilePath($sCodeName, Gpx::EXT))) $bResult = true;
|
||||
if(!file_exists($sGpxFilePath) || file_exists($sGeoJsonFilePath) && filemtime($sGeoJsonFilePath) > filemtime(Gpx::getFilePath($sCodeName))) $bResult = true;
|
||||
return $bResult;
|
||||
}
|
||||
}
|
||||
|
||||
class Geo extends PhpObject {
|
||||
|
||||
const GEO_FOLDER = 'geo/';
|
||||
const GEO_FOLDER = '../geo/';
|
||||
const OPT_SIMPLE = 'simplification';
|
||||
|
||||
protected $asTracks;
|
||||
@@ -55,12 +55,16 @@ class Geo extends PhpObject {
|
||||
|
||||
public function __construct($sCodeName) {
|
||||
parent::__construct(get_class($this), Settings::DEBUG, PhpObject::MODE_HTML);
|
||||
$this->sFilePath = self::getFilePath($sCodeName, static::EXT);
|
||||
$this->sFilePath = self::getFilePath($sCodeName);
|
||||
$this->asTracks = array();
|
||||
}
|
||||
|
||||
public static function getFilePath($sCodeName, $sExt) {
|
||||
return self::GEO_FOLDER.$sCodeName.$sExt;
|
||||
public static function getFilePath($sCodeName) {
|
||||
return self::GEO_FOLDER.$sCodeName.static::EXT;
|
||||
}
|
||||
|
||||
public static function getDistFilePath($sCodeName) {
|
||||
return 'geo/'.$sCodeName.static::EXT;
|
||||
}
|
||||
|
||||
public function getLog() {
|
||||
@@ -144,8 +144,8 @@ class Project extends PhpObject {
|
||||
|
||||
if($sCodeName != '' && !Converter::isGeoJsonValid($sCodeName)) Converter::convertToGeoJson($sCodeName);
|
||||
|
||||
$asProject['geofilepath'] = Spot::addTimestampToFilePath(Geo::getFilePath($sCodeName, GeoJson::EXT));
|
||||
$asProject['gpxfilepath'] = Spot::addTimestampToFilePath(Geo::getFilePath($sCodeName, Gpx::EXT));
|
||||
$asProject['geofilepath'] = Spot::addTimestampToFilePath(GeoJson::getDistFilePath($sCodeName));
|
||||
$asProject['gpxfilepath'] = Spot::addTimestampToFilePath(Gpx::getDistFilePath($sCodeName));
|
||||
$asProject['codename'] = $sCodeName;
|
||||
}
|
||||
return $bSpecificProj?$asProject:$asProjects;
|
||||
@@ -40,6 +40,8 @@ class Spot extends Main
|
||||
|
||||
const DEFAULT_LANG = 'en';
|
||||
|
||||
const MAIN_PAGE = 'index';
|
||||
|
||||
private Project $oProject;
|
||||
private Media $oMedia;
|
||||
private User $oUser;
|
||||
@@ -158,42 +160,42 @@ class Spot extends Main
|
||||
);
|
||||
}
|
||||
|
||||
public function getAppMainPage()
|
||||
{
|
||||
public function getAppParams() {
|
||||
|
||||
//Cache Page List
|
||||
$asPages = array_diff($this->asMasks, array('email_update', 'email_conf'));
|
||||
if(!$this->oUser->checkUserClearance(User::CLEARANCE_ADMIN)) {
|
||||
$asPages = array_diff($asPages, array('admin', 'upload'));
|
||||
}
|
||||
|
||||
$asGlobalVars = array(
|
||||
'vars' => array(
|
||||
'chunk_size' => self::FEED_CHUNK_SIZE,
|
||||
'default_project_codename' => $this->oProject->getProjectCodeName(),
|
||||
'projects' => $this->oProject->getProjects(),
|
||||
'user' => $this->oUser->getUserInfo()
|
||||
),
|
||||
'consts' => array(
|
||||
'server' => $this->asContext['serv_name'],
|
||||
'modes' => Project::MODES,
|
||||
'clearances' => User::CLEARANCES,
|
||||
'default_timezone' => Settings::TIMEZONE
|
||||
)
|
||||
);
|
||||
|
||||
return self::getJsonResult(true, '', parent::getParams($asGlobalVars, self::MAIN_PAGE, $asPages));
|
||||
}
|
||||
|
||||
public function getAppMainPage()
|
||||
{
|
||||
return parent::getMainPage(
|
||||
self::MAIN_PAGE,
|
||||
array(
|
||||
'vars' => array(
|
||||
'chunk_size' => self::FEED_CHUNK_SIZE,
|
||||
'default_project_codename' => $this->oProject->getProjectCodeName(),
|
||||
'projects' => $this->oProject->getProjects(),
|
||||
'user' => $this->oUser->getUserInfo()
|
||||
),
|
||||
'consts' => array(
|
||||
'server' => $this->asContext['serv_name'],
|
||||
'modes' => Project::MODES,
|
||||
'clearances' => User::CLEARANCES,
|
||||
'default_timezone' => Settings::TIMEZONE
|
||||
)
|
||||
),
|
||||
'index',
|
||||
array(
|
||||
'language' => $this->oLang->getLanguage(),
|
||||
'host_url' => $this->asContext['serv_name'],
|
||||
'filepath_css' => self::addTimestampToFilePath('style/spot.css'),
|
||||
'filepath_js_d3' => self::addTimestampToFilePath('script/d3.min.js'),
|
||||
'filepath_js_leaflet' => self::addTimestampToFilePath('script/leaflet.min.js'),
|
||||
'filepath_js_jquery' => self::addTimestampToFilePath('script/jquery.min.js'),
|
||||
'filepath_js_jquery_mods' => self::addTimestampToFilePath('script/jquery.mods.js'),
|
||||
'filepath_js_spot' => self::addTimestampToFilePath('script/spot.js'),
|
||||
'filepath_js_lightbox' => self::addTimestampToFilePath('script/lightbox.js')
|
||||
),
|
||||
$asPages
|
||||
'language' => $this->oLang->getLanguage(),
|
||||
'host_url' => $this->asContext['serv_name'],
|
||||
'filepath_css' => self::addTimestampToFilePath('spot.css'),
|
||||
'filepath_js' => self::addTimestampToFilePath('../dist/app.js')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,12 @@ class Uploader extends UploadHandler
|
||||
$this->oMedia = &$oMedia;
|
||||
$this->oLang = &$oLang;
|
||||
$this->sBody = '';
|
||||
parent::__construct(array('image_versions'=>array(), 'accept_file_types'=>'/\.(gif|jpe?g|png|mov|mp4)$/i'));
|
||||
|
||||
parent::__construct(array(
|
||||
'upload_dir' => Media::MEDIA_FOLDER,
|
||||
'image_versions' => array(),
|
||||
'accept_file_types' => '/\.(gif|jpe?g|png|mov|mp4)$/i'
|
||||
));
|
||||
}
|
||||
|
||||
protected function validate($uploaded_file, $file, $error, $index, $content_range) {
|
||||
@@ -5,7 +5,8 @@
|
||||
//Start buffering
|
||||
ob_start();
|
||||
|
||||
$oLoader = require __DIR__.'/vendor/autoload.php';
|
||||
//Run from /dist/
|
||||
$oLoader = require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
use Franzz\Objects\ToolBox;
|
||||
use Franzz\Objects\Main;
|
||||
@@ -35,6 +36,9 @@ if($sAction!='')
|
||||
{
|
||||
switch($sAction)
|
||||
{
|
||||
case 'params':
|
||||
$sResult = $oSpot->getAppParams();
|
||||
break;
|
||||
case 'markers':
|
||||
$sResult = $oSpot->getMarkers();
|
||||
break;
|
||||
2
script/d3.min.js
vendored
2
script/jquery.min.js
vendored
23
script/leaflet.min.js
vendored
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 821 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Lightbox v2.11.3
|
||||
* Lightbox v2.11.4
|
||||
* by Lokesh Dhakar
|
||||
*
|
||||
* More info:
|
||||
@@ -46,8 +46,6 @@
|
||||
fadeDuration: 600,
|
||||
fitImagesInViewport: true,
|
||||
imageFadeDuration: 600,
|
||||
// maxWidth: 800,
|
||||
// maxHeight: 600,
|
||||
positionFromTop: 50,
|
||||
resizeDuration: 700,
|
||||
showImageNumberLabel: true,
|
||||
@@ -62,10 +60,8 @@
|
||||
to prevent xss and other injection attacks.
|
||||
*/
|
||||
sanitizeTitle: false
|
||||
//ADDED-START
|
||||
, hasVideo: true
|
||||
, hasVideo: true
|
||||
, onMediaChange: (oMedia) => {}
|
||||
//ADDED-END
|
||||
};
|
||||
|
||||
Lightbox.prototype.option = function(options) {
|
||||
@@ -147,7 +143,6 @@
|
||||
</div>\
|
||||
').appendTo($('body'));
|
||||
|
||||
|
||||
// Cache jQuery objects
|
||||
this.$lightbox = $('#lightbox');
|
||||
this.$overlay = $('#lightboxOverlay');
|
||||
@@ -155,8 +150,7 @@
|
||||
this.$container = this.$lightbox.find('.lb-container');
|
||||
this.$image = this.$lightbox.find('.lb-image');
|
||||
this.$nav = this.$lightbox.find('.lb-nav');
|
||||
|
||||
//ADDED-START
|
||||
|
||||
if(self.options.hasVideo) {
|
||||
this.$video = $('<video class="lb-video" controls autoplay></video>');
|
||||
this.$image.after(this.$video);
|
||||
@@ -166,8 +160,7 @@
|
||||
bottom: parseInt(this.$video.css('border-bottom-width'), 10),
|
||||
left: parseInt(this.$video.css('border-left-width'), 10)
|
||||
};
|
||||
}
|
||||
//ADDED-END
|
||||
}
|
||||
|
||||
// Store css values for future lookup
|
||||
this.containerPadding = {
|
||||
@@ -185,11 +178,8 @@
|
||||
};
|
||||
|
||||
// Attach event handlers to the newly minted DOM elements
|
||||
//ADDED-START
|
||||
//this.$overlay.hide().on('click', function() {
|
||||
this.$overlay.hide().add(this.$lightbox.find('.lb-dataContainer')).on('click', function() {
|
||||
//ADDED-END
|
||||
self.end();
|
||||
this.$overlay.hide().add(this.$lightbox.find('.lb-dataContainer')).on('click', function() {
|
||||
self.end();
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -250,9 +240,13 @@
|
||||
});
|
||||
|
||||
|
||||
this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
|
||||
self.end();
|
||||
return false;
|
||||
this.$lightbox.find('.lb-loader, .lb-close').on('click keyup', function(e) {
|
||||
// If mouse click OR 'enter' or 'space' keypress, close LB
|
||||
if (
|
||||
e.type === 'click' || (e.type === 'keyup' && (e.which === 13 || e.which === 32))) {
|
||||
self.end();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -265,7 +259,6 @@
|
||||
|
||||
this.sizeOverlay();
|
||||
|
||||
//ADDED-START
|
||||
//Manage Zoom Event
|
||||
this.$nav.mousewheel((e) => {
|
||||
var asImg = self.album[this.currentImageIndex];
|
||||
@@ -324,7 +317,6 @@
|
||||
self.$image.css('--translate-x', fTransX + 'px');
|
||||
self.$image.css('--translate-y', fTransY + 'px');
|
||||
}
|
||||
//ADDED-END
|
||||
|
||||
this.album = [];
|
||||
var imageNumber = 0;
|
||||
@@ -349,7 +341,7 @@
|
||||
// If image is part of a set
|
||||
$links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
|
||||
for (var j = 0; j < $links.length; j = ++j) {
|
||||
this.addToAlbum($($links[j]));
|
||||
this.addToAlbum($($links[j]));
|
||||
if ($links[j] === $link[0]) {
|
||||
imageNumber = j;
|
||||
}
|
||||
@@ -358,14 +350,7 @@
|
||||
}
|
||||
|
||||
// Position Lightbox
|
||||
//ADDED-START
|
||||
//var top = $window.scrollTop() + this.options.positionFromTop;
|
||||
//var left = $window.scrollLeft();
|
||||
this.$lightbox/*.css({
|
||||
top: top + 'px',
|
||||
left: left + 'px'
|
||||
})*/.fadeIn(this.options.fadeDuration);
|
||||
//ADDED-END
|
||||
this.$lightbox.fadeIn(this.options.fadeDuration);
|
||||
|
||||
// Disable scrolling of the page while open
|
||||
if (this.options.disableScrolling) {
|
||||
@@ -379,20 +364,18 @@
|
||||
this.album.push({
|
||||
alt: $link.attr('data-alt'),
|
||||
link: $link.attr('href'),
|
||||
title: $link.attr('data-title') || $link.attr('title')
|
||||
//ADDED-START
|
||||
, orientation: $link.attr('data-orientation')
|
||||
, type: $link.attr('data-type')
|
||||
, id: $link.attr('data-id')
|
||||
, $Media: $link.attr('data-type')=='video'?this.$video:this.$image
|
||||
, width: $link.find('img').attr('width')
|
||||
, height: $link.find('img').attr('height')
|
||||
, set: $link.attr('data-lightbox') || $link.attr('rel')
|
||||
//ADDED-END
|
||||
title: $link.attr('data-title') || $link.attr('title'),
|
||||
|
||||
orientation: $link.attr('data-orientation'),
|
||||
type: $link.attr('data-type'),
|
||||
id: $link.attr('data-id'),
|
||||
$Media: $link.attr('data-type')=='video'?this.$video:this.$image,
|
||||
width: $link.find('img').attr('width'),
|
||||
height: $link.find('img').attr('height'),
|
||||
set: $link.attr('data-lightbox') || $link.attr('rel')
|
||||
});
|
||||
}
|
||||
|
||||
//ADDED-START
|
||||
|
||||
Lightbox.prototype.getMaxSizes = function(iMediaWidth, iMediaHeight, sMediaType) {
|
||||
var iWindowWidth = $(window).width();
|
||||
var iWindowHeight = $(window).height();
|
||||
@@ -473,20 +456,20 @@
|
||||
|
||||
// Hide most UI elements in preparation for the animated resizing of the lightbox.
|
||||
Lightbox.prototype.changeImage = function(imageNumber) {
|
||||
var self = this;
|
||||
var filename = this.album[imageNumber].link;
|
||||
|
||||
// Disable keyboard nav during transitions
|
||||
this.disableKeyboardNav();
|
||||
var self = this;
|
||||
var filename = this.album[imageNumber].link;
|
||||
|
||||
// Show loading state
|
||||
this.$overlay.fadeIn(this.options.fadeDuration);
|
||||
$('.lb-loader').fadeIn('slow');
|
||||
// Disable keyboard nav during transitions
|
||||
this.disableKeyboardNav();
|
||||
|
||||
this.$lightbox.find('.lb-image, .lb-video, .lb-nav, .lb-prev, .lb-next, .lb-number, .lb-caption, .lb-close').hide();
|
||||
// Show loading state
|
||||
this.$overlay.fadeIn(this.options.fadeDuration);
|
||||
$('.lb-loader').fadeIn('slow');
|
||||
|
||||
this.$lightbox.find('.lb-image, .lb-video, .lb-nav, .lb-prev, .lb-next, .lb-number, .lb-caption, .lb-close').hide();
|
||||
this.$image.css({'--scale': '1', '--translate-x': '0', '--translate-y': '0'});
|
||||
self.$lightbox.find('.lb-dataContainer').css({width:'200px', height:'30px'});
|
||||
this.$outerContainer.addClass('animating');
|
||||
this.$outerContainer.addClass('animating');
|
||||
this.$container.removeClass('moveable moving');
|
||||
|
||||
this.options.onMediaChange(self.album[imageNumber]);
|
||||
@@ -534,31 +517,19 @@
|
||||
break;
|
||||
}
|
||||
|
||||
this.currentImageIndex = imageNumber;
|
||||
this.currentImageIndex = imageNumber;
|
||||
};
|
||||
//ADDED-END
|
||||
|
||||
// Stretch overlay to fit the viewport
|
||||
Lightbox.prototype.sizeOverlay = function(e) {
|
||||
//var self = this;
|
||||
|
||||
/*
|
||||
/*
|
||||
We use a setTimeout 0 to pause JS execution and let the rendering catch-up.
|
||||
Why do this? If the `disableScrolling` option is set to true, a class is added to the body
|
||||
tag that disables scrolling and hides the scrollbar. We want to make sure the scrollbar is
|
||||
hidden before we measure the document width, as the presence of the scrollbar will affect the
|
||||
number.
|
||||
*/
|
||||
//ADDED-START
|
||||
/*
|
||||
setTimeout(function() {
|
||||
self.$overlay
|
||||
.width($(document).width())
|
||||
.height($(document).height());
|
||||
|
||||
}, 0);
|
||||
*/
|
||||
if(e) {
|
||||
if(e) {
|
||||
if(typeof oResizeTimer != 'undefined') clearTimeout(oResizeTimer);
|
||||
oResizeTimer = setTimeout(
|
||||
() => {
|
||||
@@ -573,17 +544,16 @@
|
||||
},
|
||||
200
|
||||
);
|
||||
}
|
||||
//ADDED-END
|
||||
}
|
||||
};
|
||||
|
||||
// Animate the size of the lightbox to fit the image we are showing
|
||||
// This method also shows the the image.
|
||||
//ADDED-START
|
||||
//Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
|
||||
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight, media) {
|
||||
media = media || 'image';
|
||||
//ADDED-END
|
||||
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight, media) {
|
||||
media = media || 'image';
|
||||
//ADDED-END
|
||||
var self = this;
|
||||
|
||||
var oldWidth = this.$outerContainer.outerWidth();
|
||||
@@ -597,19 +567,13 @@
|
||||
//ADDED-END
|
||||
|
||||
function postResize() {
|
||||
//ADDED-START
|
||||
//self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||
if(self.$lightbox.hasClass('vertical')) self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||
else self.$lightbox.find('.lb-dataContainer').height(newHeight);
|
||||
//ADDED-END
|
||||
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
||||
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
||||
|
||||
// Set focus on one of the two root nodes so keyboard events are captured.
|
||||
//ADDED-START
|
||||
//self.$overlay.focus();
|
||||
self.$overlay.trigger( 'focus' );
|
||||
//ADDED-END
|
||||
self.$overlay.trigger('focus');
|
||||
|
||||
self.showImage();
|
||||
}
|
||||
@@ -630,11 +594,8 @@
|
||||
Lightbox.prototype.showImage = function() {
|
||||
this.$lightbox.find('.lb-loader').stop(true).hide();
|
||||
|
||||
//ADDED-START
|
||||
//this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
|
||||
if(this.options.hasVideo && this.album[this.currentImageIndex].type == 'video') this.$lightbox.find('.lb-video').fadeIn(this.options.imageFadeDuration);
|
||||
else this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
|
||||
//ADDED-END
|
||||
|
||||
this.updateNav();
|
||||
this.updateDetails();
|
||||
@@ -691,29 +652,10 @@
|
||||
$caption.text(this.album[this.currentImageIndex].title);
|
||||
} else {
|
||||
$caption.html(this.album[this.currentImageIndex].title);
|
||||
}
|
||||
//ADDED-START
|
||||
//$caption.fadeIn('fast');
|
||||
}
|
||||
$caption.add(this.$lightbox.find('.lb-close')).fadeIn('fast');
|
||||
//ADDED-END
|
||||
}
|
||||
|
||||
//ADDED-START
|
||||
/*
|
||||
//ADDED-END
|
||||
if (this.album.length > 1 && this.options.showImageNumberLabel) {
|
||||
var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
|
||||
//ADDED-START
|
||||
//this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
|
||||
this.$lightbox.find('.lb-number').empty().append(labelText).fadeIn('fast');
|
||||
//ADDED-END
|
||||
} else {
|
||||
this.$lightbox.find('.lb-number').hide();
|
||||
}
|
||||
//ADDED-START
|
||||
*/
|
||||
//ADDED-END
|
||||
|
||||
this.$outerContainer.removeClass('animating');
|
||||
|
||||
this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
|
||||
@@ -734,9 +676,7 @@
|
||||
};
|
||||
|
||||
Lightbox.prototype.enableKeyboardNav = function() {
|
||||
//ADDED-START
|
||||
this.disableKeyboardNav();
|
||||
//ADDED-END
|
||||
this.disableKeyboardNav();
|
||||
this.$lightbox.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
||||
this.$overlay.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
||||
};
|
||||
@@ -775,19 +715,17 @@
|
||||
Lightbox.prototype.end = function() {
|
||||
this.disableKeyboardNav();
|
||||
|
||||
//ADDED-START
|
||||
if(this.options.hasVideo) {
|
||||
var $lbContainer = this.$lightbox.find('.lb-container');
|
||||
var $hasVideoNav = $lbContainer.hasClass('lb-video-nav');
|
||||
this.$video.attr('src', '');
|
||||
if(this.options.hasVideo) {
|
||||
var $lbContainer = this.$lightbox.find('.lb-container');
|
||||
var $hasVideoNav = $lbContainer.hasClass('lb-video-nav');
|
||||
this.$video.attr('src', '');
|
||||
|
||||
if($hasVideoNav) $lbContainer.removeClass('lb-video-nav');
|
||||
}
|
||||
oSpot.flushHash();
|
||||
//ADDED-END
|
||||
if($hasVideoNav) $lbContainer.removeClass('lb-video-nav');
|
||||
}
|
||||
oSpot.flushHash();
|
||||
|
||||
$(window).off('resize', this.sizeOverlay);
|
||||
this.$nav.off('mousewheel');
|
||||
this.$nav.off('mousewheel');
|
||||
this.$lightbox.fadeOut(this.options.fadeDuration);
|
||||
this.$overlay.fadeOut(this.options.fadeDuration);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$fa-font-path: "fa/fonts";
|
||||
$fa-font-path: 'fonts';
|
||||
$fa-css-prefix: fa;
|
||||
|
||||
@import 'fa/solid';
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Google Fonts - Ubuntu v15 - https://fonts.googleapis.com/css?family=Ubuntu:400,700&subset=latin-ext&display=swap */
|
||||
/* Google Fonts - Ubuntu v20 - https://fonts.googleapis.com/css?family=Ubuntu:400,700&subset=latin-ext&display=swap */
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
@@ -6,7 +6,7 @@
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKcg72j00.woff2) format('woff2');
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKcg72j00.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@@ -15,8 +15,8 @@
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKew72j00.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKew72j00.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
@@ -24,7 +24,7 @@
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKcw72j00.woff2) format('woff2');
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKcw72j00.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@@ -33,7 +33,7 @@
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKfA72j00.woff2) format('woff2');
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKfA72j00.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
/* latin-ext */
|
||||
@@ -42,8 +42,8 @@
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCs6KVjbNBYlgoKcQ72j00.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgoKcQ72j00.woff2) format('woff2');
|
||||
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
@@ -52,7 +52,7 @@
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(fonts/4iCs6KVjbNBYlgoKfw72.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
@@ -60,7 +60,7 @@
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjvWyNL4U.woff2) format('woff2');
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvWyNL4U.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@@ -69,8 +69,8 @@
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjtGyNL4U.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjtGyNL4U.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
@@ -78,7 +78,7 @@
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjvGyNL4U.woff2) format('woff2');
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvGyNL4U.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@@ -87,7 +87,7 @@
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjs2yNL4U.woff2) format('woff2');
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjs2yNL4U.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
/* latin-ext */
|
||||
@@ -96,8 +96,8 @@
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCxCvjvmyNL4U.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvmyNL4U.woff2) format('woff2');
|
||||
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
@@ -106,5 +106,5 @@
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url(fonts/4iCv6KVjbNBYlgoCxCvjsGyN.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@@ -9,8 +9,8 @@ $stroke-width-mouse-focus : 1;
|
||||
$stroke-width-height-focus: 2;
|
||||
$stroke-width-axis : 2;
|
||||
|
||||
@import 'leaflet/leaflet';
|
||||
@import 'leaflet/leaflet_heightgraph';
|
||||
@import '../../node_modules/leaflet/dist/leaflet';
|
||||
@import '../../node_modules/leaflet.heightgraph/src/L.Control.Heightgraph.css';
|
||||
|
||||
/* Leaflet fixes */
|
||||
.leaflet-container {
|
||||
@@ -108,3 +108,7 @@ $stroke-width-axis : 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.leaflet-default-icon-path {
|
||||
background-image: none;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@import 'lightbox/lightbox';
|
||||
@import '../../node_modules/lightbox2/src/css/lightbox.css';
|
||||
|
||||
@mixin lightbox-icon($icon) {
|
||||
background: none;
|
||||