convert to a fotogallery
13
foto_gallery.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=uWSGI Simple Sample for Flat Page with Index Default
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
#User=www-data
|
||||||
|
#Group=www-data
|
||||||
|
WorkingDirectory=/srv/foto_gallery
|
||||||
|
Environment="PATH=/srv/foto_gallery/.env/bin"
|
||||||
|
ExecStart=/srv/foto_gallery/.env/bin/uwsgi --ini uwsgi.ini
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
139
foto_gallery/__init__.py
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
"""
|
||||||
|
This module is based on flask_flatpages and creates a website structure based on a file structure.
|
||||||
|
By default the .md extension creates a html website
|
||||||
|
"""
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
from flask import Flask, Blueprint,render_template, send_from_directory,jsonify, url_for, abort
|
||||||
|
#from flask_flatpages import FlatPages, pygments_style_defs
|
||||||
|
import flatpages_index
|
||||||
|
from flatpages_index import FlatPagesIndex
|
||||||
|
from flask_frozen import Freezer
|
||||||
|
from config import Config
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
from PIL import Image, ExifTags, ImageOps
|
||||||
|
from functools import partial
|
||||||
|
#from .flatpages import FileLists
|
||||||
|
|
||||||
|
# This is the directory, required for absolute file paths
|
||||||
|
#package_directory = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
# Loading the config file
|
||||||
|
#cfg = Config((os.path.join(package_directory, '../config.cfg')))
|
||||||
|
cfg = Config("config.cfg")
|
||||||
|
# Loading constants from config file
|
||||||
|
#FLATPAGES_AUTO_RELOAD = cfg.get("FLATPAGES_AUTO_RELOAD",True) # Default can be overwritten by config cfg
|
||||||
|
#FLATPAGES_EXTENSION = cfg.get("FLATPAGES_EXTENSION",".md") # Default can be overwritten by config cfg
|
||||||
|
#FLATPAGES_ROOT = os.path.abspath(cfg.pages_root)
|
||||||
|
#FLATPAGES_DEFAULT_TEMPLATE = cfg.get("FLATPAGES_DEFAULT_TEMPLATE","gallery.html")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Initialize application
|
||||||
|
app = Flask(__name__)
|
||||||
|
app.config.update(cfg)
|
||||||
|
app.logger.setLevel(logging.DEBUG)
|
||||||
|
# Initialize FlatPages Index
|
||||||
|
|
||||||
|
flatpages = FlatPagesIndex(app)
|
||||||
|
flatpages_index.Links.endpoint="intern.post"
|
||||||
|
flatpages_index.Links.thumb_url=lambda s,x: url_for("intern.thumb",size=128,name=x)
|
||||||
|
flatpages_index.Links.image_url=lambda s,x: url_for("intern.post",name=x)
|
||||||
|
|
||||||
|
flatpages.get('index')
|
||||||
|
|
||||||
|
app.logger.info('Initialize Foto Gallery App')
|
||||||
|
app.logger.info('flatpages loaded %d pages' % len(flatpages._pages))
|
||||||
|
app.logger.info("Data directory is: %s" % flatpages.root)
|
||||||
|
app.logger.info("Url prefix;: %s" % cfg.url_prefix)
|
||||||
|
app.url_map.strict_slashes=True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
freezer = Freezer(app)
|
||||||
|
|
||||||
|
|
||||||
|
page_blueprint = Blueprint('intern', __name__)
|
||||||
|
|
||||||
|
@page_blueprint.route('/thumb<int:size>/<path:name>')
|
||||||
|
def thumb(size=64,name=''):
|
||||||
|
if not size in [32,64,128,256,512]:
|
||||||
|
abort(404)
|
||||||
|
file_name=os.path.join(app.config["FLATPAGES_ROOT"],name)
|
||||||
|
thumb_name=os.path.join("thumbs","thumbs_%i" % size, name)
|
||||||
|
thumb_path, thumb_fn=os.path.split(thumb_name)
|
||||||
|
if os.path.exists(file_name)and not os.path.exists(thumb_name):
|
||||||
|
print("creating thumb")
|
||||||
|
image= Image.open(file_name,'r')
|
||||||
|
s=size, size
|
||||||
|
for orientation in ExifTags.TAGS.keys():
|
||||||
|
if ExifTags.TAGS[orientation]=='Orientation':
|
||||||
|
break
|
||||||
|
exif=dict(image._getexif().items())
|
||||||
|
|
||||||
|
if exif[orientation] == 3:
|
||||||
|
image=image.rotate(180, expand=True)
|
||||||
|
elif exif[orientation] == 6:
|
||||||
|
image=image.rotate(270, expand=True)
|
||||||
|
elif exif[orientation] == 8:
|
||||||
|
image=image.rotate(90, expand=True)
|
||||||
|
thumb=ImageOps.fit(image,s,Image.ANTIALIAS)
|
||||||
|
print("writing %s"% thumb_name)
|
||||||
|
|
||||||
|
os.makedirs(thumb_path,exist_ok=True)
|
||||||
|
thumb.save(thumb_name)
|
||||||
|
image.close()
|
||||||
|
thumb.close()
|
||||||
|
print("sending from %s file %s" % ("thumbs/thumbs_%i/" % size,name))
|
||||||
|
if not os.path.exists(os.path.join(thumb_path,thumb_fn)):
|
||||||
|
print ("doesn't exist")
|
||||||
|
return send_from_directory(os.path.join("../thumbs","thumbs_%i" % size),name)
|
||||||
|
|
||||||
|
|
||||||
|
@page_blueprint.route('/<path:name>/',strict_slashes=True)
|
||||||
|
@page_blueprint.route('/')
|
||||||
|
def post(name=''):
|
||||||
|
print("Post: %s" % name)
|
||||||
|
page = flatpages.get(name)
|
||||||
|
|
||||||
|
if not page is None:
|
||||||
|
page["has_img"]=True
|
||||||
|
page.links.endpoint='intern.post'
|
||||||
|
|
||||||
|
|
||||||
|
return render_template(page["template"], post=page,
|
||||||
|
pth=page["dirpath"])
|
||||||
|
|
||||||
|
if os.path.exists(os.path.join(app.config["FLATPAGES_ROOT"],name)):
|
||||||
|
return send_from_directory(app.config["FLATPAGES_ROOT"],name)
|
||||||
|
elif os.path.exists(os.path.join('static',name)):
|
||||||
|
print("send from static dir %s" % name)
|
||||||
|
return send_from_directory('static',name)
|
||||||
|
else:
|
||||||
|
return send_from_directory('blueimp',name)
|
||||||
|
|
||||||
|
|
||||||
|
@page_blueprint.route('/<path:name>.json',strict_slashes=False)
|
||||||
|
@page_blueprint.route('/.json',strict_slashes=False)
|
||||||
|
def postjson(name='index'):
|
||||||
|
print("Post: %s" % name)
|
||||||
|
|
||||||
|
page = flatpages.get(name)
|
||||||
|
if not page is None:
|
||||||
|
page["has_img"]=True # can be overwritten by file
|
||||||
|
page.links.endpoint='intern.postjson'
|
||||||
|
|
||||||
|
return jsonify(page=dict(page))
|
||||||
|
|
||||||
|
if os.path.exists(u'{}/{}'.format(FLATPAGES_ROOT,path)):
|
||||||
|
return send_from_directory(FLATPAGES_ROOT,path)
|
||||||
|
else:
|
||||||
|
return send_from_directory('static',path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
app.register_blueprint(page_blueprint, url_prefix=cfg.url_prefix,static_folder='static')
|
||||||
|
app.add_url_rule('%s/<path:name>' % cfg.url_prefix,'page', post)
|
||||||
25
foto_gallery/blueimp/.github/workflows/nodejs.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Node CI
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [8.x, 10.x, 12.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: npm install, build, and test
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build --if-present
|
||||||
|
npm test
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
1
foto_gallery/blueimp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
23
foto_gallery/blueimp/LICENSE.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright © 2013 Sebastian Tschan, https://blueimp.net
|
||||||
|
|
||||||
|
Swipe implementation based on: https://github.com/thebird/Swipe
|
||||||
|
Copyright © 2013 Brad Birdsall, https://github.com/thebird
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
1169
foto_gallery/blueimp/README.md
Normal file
95
foto_gallery/blueimp/css/blueimp-gallery-indicator.css
Executable file
@@ -0,0 +1,95 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
/*
|
||||||
|
* blueimp Gallery Indicator CSS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.blueimp-gallery > .indicator {
|
||||||
|
position: absolute;
|
||||||
|
top: auto;
|
||||||
|
right: 15px;
|
||||||
|
bottom: 15px;
|
||||||
|
left: 15px;
|
||||||
|
margin: 0 40px;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 10px;
|
||||||
|
display: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .indicator > li {
|
||||||
|
display: inline-block;
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
margin: 6px 3px 0 3px;
|
||||||
|
-webkit-box-sizing: content-box;
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
background: #ccc;
|
||||||
|
background: rgba(255, 255, 255, 0.25) center no-repeat;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 0 2px #000;
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IE7 fixes */
|
||||||
|
* + html .blueimp-gallery > .indicator > li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueimp-gallery > .indicator > li:hover,
|
||||||
|
.blueimp-gallery > .indicator > .active {
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #fff;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueimp-gallery > .indicator > li:after {
|
||||||
|
opacity: 0;
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
top: -5em;
|
||||||
|
width: 75px;
|
||||||
|
height: 75px;
|
||||||
|
transition: transform 600ms ease-out, opacity 400ms ease-out;
|
||||||
|
transform: translateX(-50%) translateY(0) translateZ(0px);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueimp-gallery > .indicator > li:hover:after {
|
||||||
|
opacity: 1;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: inherit;
|
||||||
|
transform: translateX(-50%) translateY(-5px) translateZ(0px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueimp-gallery > .indicator > .active:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueimp-gallery-controls > .indicator {
|
||||||
|
display: block;
|
||||||
|
/* Fix z-index issues (controls behind slide element) on Android: */
|
||||||
|
-webkit-transform: translateZ(0);
|
||||||
|
-moz-transform: translateZ(0);
|
||||||
|
-ms-transform: translateZ(0);
|
||||||
|
-o-transform: translateZ(0);
|
||||||
|
transform: translateZ(0);
|
||||||
|
}
|
||||||
|
.blueimp-gallery-single > .indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
92
foto_gallery/blueimp/css/blueimp-gallery-video.css
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
/*
|
||||||
|
* blueimp Gallery Video Factory CSS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-content > img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: auto;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
/* Prevent artifacts in Mozilla Firefox: */
|
||||||
|
backface-visibility: hidden;
|
||||||
|
-moz-backface-visibility: hidden;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-content > video {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-content > iframe {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-playing > iframe {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-content > a {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: -64px auto 0;
|
||||||
|
width: 128px;
|
||||||
|
height: 128px;
|
||||||
|
background: url(../img/video-play.png) center no-repeat;
|
||||||
|
opacity: 0.8;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-playing > a,
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-playing > img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-playing > video {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-loading > a {
|
||||||
|
background: url(../img/loading.gif) center no-repeat;
|
||||||
|
background-size: 64px 64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IE7 fixes */
|
||||||
|
* + html .blueimp-gallery > .slides > .slide > .video-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
* + html .blueimp-gallery > .slides > .slide > .video-content > a {
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueimp-gallery > .slides > .slide > .video-content > a:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Replace PNGs with SVGs for capable browsers (excluding IE<9) */
|
||||||
|
body:last-child
|
||||||
|
.blueimp-gallery
|
||||||
|
> .slides
|
||||||
|
> .slide
|
||||||
|
> .video-content:not(.video-loading)
|
||||||
|
> a {
|
||||||
|
background-image: url(../img/video-play.svg);
|
||||||
|
}
|
||||||
224
foto_gallery/blueimp/css/blueimp-gallery.css
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
/*
|
||||||
|
* blueimp Gallery CSS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
.blueimp-gallery,
|
||||||
|
.blueimp-gallery > .slides > .slide > .slide-content {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
-webkit-transition: opacity 0.2s linear;
|
||||||
|
-moz-transition: opacity 0.2s linear;
|
||||||
|
-ms-transition: opacity 0.2s linear;
|
||||||
|
-o-transition: opacity 0.2s linear;
|
||||||
|
transition: opacity 0.2s linear;
|
||||||
|
/* Prevent artifacts in Mozilla Firefox: */
|
||||||
|
backface-visibility: hidden;
|
||||||
|
-moz-backface-visibility: hidden;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .slide-content {
|
||||||
|
margin: auto;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.blueimp-gallery {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 999999;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #000;
|
||||||
|
background: rgba(0, 0, 0, 0.9);
|
||||||
|
opacity: 0;
|
||||||
|
display: none;
|
||||||
|
direction: ltr;
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery-carousel {
|
||||||
|
position: relative;
|
||||||
|
z-index: auto;
|
||||||
|
margin: 1em auto;
|
||||||
|
/* Set the carousel width/height ratio to 16/9: */
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
box-shadow: 0 0 10px #000;
|
||||||
|
-ms-touch-action: pan-y;
|
||||||
|
touch-action: pan-y;
|
||||||
|
}
|
||||||
|
.blueimp-gallery-display {
|
||||||
|
display: block;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides {
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.blueimp-gallery-carousel > .slides {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide {
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
text-align: center;
|
||||||
|
-webkit-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
-moz-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
-ms-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
-o-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide-loading {
|
||||||
|
background: url(../img/loading.gif) center no-repeat;
|
||||||
|
background-size: 64px 64px;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide-loading > .slide-content {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide-error {
|
||||||
|
background: url(../img/error.png) center no-repeat;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide-error > .slide-content {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .prev,
|
||||||
|
.blueimp-gallery > .next {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 15px;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
margin-top: -23px;
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 60px;
|
||||||
|
font-weight: 100;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: 0 0 2px #000;
|
||||||
|
text-align: center;
|
||||||
|
background: #222;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
-webkit-box-sizing: content-box;
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
border: 3px solid #fff;
|
||||||
|
-webkit-border-radius: 23px;
|
||||||
|
-moz-border-radius: 23px;
|
||||||
|
border-radius: 23px;
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: pointer;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .next {
|
||||||
|
left: auto;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .close,
|
||||||
|
.blueimp-gallery > .title {
|
||||||
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
left: 15px;
|
||||||
|
margin: 0 40px 0 0;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 0 2px #000;
|
||||||
|
opacity: 0.8;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .close {
|
||||||
|
padding: 15px;
|
||||||
|
right: 15px;
|
||||||
|
left: auto;
|
||||||
|
margin: -15px;
|
||||||
|
font-size: 30px;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .play-pause {
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
bottom: 15px;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
background: url(../img/play-pause.png) 0 0 no-repeat;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.5;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery-playing > .play-pause {
|
||||||
|
background-position: -15px 0;
|
||||||
|
}
|
||||||
|
.blueimp-gallery-controls > .prev,
|
||||||
|
.blueimp-gallery-controls > .next,
|
||||||
|
.blueimp-gallery-controls > .close,
|
||||||
|
.blueimp-gallery-controls > .title,
|
||||||
|
.blueimp-gallery-controls > .play-pause {
|
||||||
|
display: block;
|
||||||
|
/* Fix z-index issues (controls behind slide element) on Android: */
|
||||||
|
-webkit-transform: translateZ(0);
|
||||||
|
-moz-transform: translateZ(0);
|
||||||
|
-ms-transform: translateZ(0);
|
||||||
|
-o-transform: translateZ(0);
|
||||||
|
transform: translateZ(0);
|
||||||
|
}
|
||||||
|
.blueimp-gallery-single > .prev,
|
||||||
|
.blueimp-gallery-left > .prev,
|
||||||
|
.blueimp-gallery-single > .next,
|
||||||
|
.blueimp-gallery-right > .next,
|
||||||
|
.blueimp-gallery-single > .play-pause {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .slides > .slide > .slide-content,
|
||||||
|
.blueimp-gallery > .prev,
|
||||||
|
.blueimp-gallery > .next,
|
||||||
|
.blueimp-gallery > .close,
|
||||||
|
.blueimp-gallery > .play-pause {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.blueimp-gallery > .prev:hover,
|
||||||
|
.blueimp-gallery > .next:hover,
|
||||||
|
.blueimp-gallery > .close:hover,
|
||||||
|
.blueimp-gallery > .title:hover,
|
||||||
|
.blueimp-gallery > .play-pause:hover {
|
||||||
|
color: #fff;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Replace PNGs with SVGs for capable browsers (excluding IE<9) */
|
||||||
|
body:last-child .blueimp-gallery > .slides > .slide-error {
|
||||||
|
background-image: url(../img/error.svg);
|
||||||
|
}
|
||||||
|
body:last-child .blueimp-gallery > .play-pause {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-size: 40px 20px;
|
||||||
|
background-image: url(../img/play-pause.svg);
|
||||||
|
}
|
||||||
|
body:last-child .blueimp-gallery-playing > .play-pause {
|
||||||
|
background-position: -20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IE7 fixes */
|
||||||
|
* + html .blueimp-gallery > .slides > .slide {
|
||||||
|
min-height: 300px;
|
||||||
|
}
|
||||||
|
* + html .blueimp-gallery > .slides > .slide > .slide-content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
2
foto_gallery/blueimp/css/blueimp-gallery.min.css
vendored
Normal file
1
foto_gallery/blueimp/css/blueimp-gallery.min.css.map
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["blueimp-gallery.css","blueimp-gallery-indicator.css","blueimp-gallery-video.css"],"names":[],"mappings":"iBAYA,iBACA,+CACE,SAAU,SACV,IAAK,EACL,MAAO,EACP,OAAQ,EACR,KAAM,EACN,mBAAoB,QAAQ,IAAK,OACjC,gBAAiB,QAAQ,IAAK,OAC9B,eAAgB,QAAQ,IAAK,OAC7B,cAAe,QAAQ,IAAK,OAC5B,WAAY,QAAQ,IAAK,OAEzB,oBAAqB,OACrB,yBAA0B,OAE5B,+CACE,OAAQ,KACR,MAAO,KACP,OAAQ,KACR,UAAW,KACX,WAAY,KACZ,QAAS,EAEX,iBACE,SAAU,MACV,QAAS,OACT,SAAU,OACV,WAAY,KACZ,WAAY,eACZ,QAAS,EACT,QAAS,KACT,UAAW,IACX,iBAAkB,KAClB,aAAc,KAEhB,0BACE,SAAU,SACV,QAAS,KACT,OAAQ,IAAI,KAEZ,eAAgB,OAChB,WAAY,EAAE,EAAE,KAAK,KACrB,iBAAkB,MAClB,aAAc,MAEhB,yBACE,QAAS,MACT,QAAS,EAEX,yBACE,SAAU,SACV,OAAQ,KACR,SAAU,OAEZ,kCACE,SAAU,SAEZ,gCACE,SAAU,SACV,MAAO,KACP,OAAQ,KACR,WAAY,OACZ,mCAAoC,+BACpC,gCAAiC,+BACjC,+BAAgC,+BAChC,8BAA+B,+BAC/B,2BAA4B,+BAE9B,wCACE,WAAY,wBAAwB,OAAO,UAC3C,gBAAiB,KAAK,KAExB,uDACE,QAAS,EAEX,sCACE,WAAY,sBAAsB,OAAO,UAE3C,qDACE,QAAS,KAGX,uBADA,uBAEE,SAAU,SACV,IAAK,IACL,KAAM,KACN,MAAO,KACP,OAAQ,KACR,WAAY,MACZ,YAAa,gBAAgB,CAAE,SAAS,CAAE,KAAK,CAAE,WACjD,UAAW,KACX,YAAa,IACb,YAAa,KACb,MAAO,KACP,gBAAiB,KACjB,YAAa,EAAE,EAAE,IAAI,KACrB,WAAY,OACZ,WAAY,KACZ,WAAY,eACZ,mBAAoB,YACpB,gBAAiB,YACjB,WAAY,YACZ,OAAQ,IAAI,MAAM,KAClB,sBAAuB,KACvB,mBAAoB,KACpB,cAAe,KACf,QAAS,GACT,OAAQ,QACR,QAAS,KAEX,uBACE,KAAM,KACN,MAAO,KAET,wBACA,wBACE,SAAU,SACV,IAAK,KACL,KAAM,KACN,OAAQ,EAAE,KAAK,EAAE,EACjB,UAAW,KACX,YAAa,KACb,MAAO,KACP,YAAa,EAAE,EAAE,IAAI,KACrB,QAAS,GACT,QAAS,KAEX,wBACE,QAAS,KACT,MAAO,KACP,KAAM,KACN,OAAQ,MACR,UAAW,KACX,gBAAiB,KACjB,OAAQ,QAEV,6BACE,SAAU,SACV,MAAO,KACP,OAAQ,KACR,MAAO,KACP,OAAQ,KACR,WAAY,2BAA2B,EAAE,EAAE,UAC3C,OAAQ,QACR,QAAS,GACT,QAAS,KAEX,qCACE,oBAAqB,MAAM,EAI7B,iCADA,gCAGA,sCAJA,gCAGA,iCAEE,QAAS,MAET,kBAAmB,cACnB,eAAgB,cAChB,cAAe,cACf,aAAc,cACd,UAAW,cAGb,4BAEA,6BADA,8BAEA,oCAJA,8BAKE,QAAS,KAKX,wBADA,uBAEA,6BAHA,uBADA,+CAKE,oBAAqB,KACrB,mBAAoB,KACpB,iBAAkB,KAClB,gBAAiB,KACjB,YAAa,KAIf,8BADA,6BAGA,mCAJA,6BAGA,8BAEE,MAAO,KACP,QAAS,EAIX,sDACE,iBAAkB,sBAEpB,6CACE,MAAO,KACP,OAAQ,KACR,gBAAiB,KAAK,KACtB,iBAAkB,2BAEpB,qDACE,oBAAqB,MAAM,EAI7B,uCACE,WAAY,MAEd,sDACE,SAAU,SClNZ,4BACE,SAAU,SACV,IAAK,KACL,MAAO,KACP,OAAQ,KACR,KAAM,KACN,OAAQ,EAAE,KACV,QAAS,EACT,WAAY,KACZ,WAAY,OACZ,YAAa,KACb,QAAS,KACT,oBAAqB,KACrB,mBAAoB,KACpB,iBAAkB,KAClB,gBAAiB,KACjB,YAAa,KAEf,+BACE,QAAS,aACT,MAAO,IACP,OAAQ,IACR,OAAQ,IAAI,IAAI,EAAE,IAClB,mBAAoB,YACpB,gBAAiB,YACjB,WAAY,YACZ,OAAQ,IAAI,MAAM,YAClB,WAAY,KACZ,WAAY,sBAA0B,OAAO,UAC7C,cAAe,IACf,WAAY,EAAE,EAAE,IAAI,KACpB,QAAS,GACT,OAAQ,QAIV,sCACE,QAAS,OAIX,oCADA,qCAEE,iBAAkB,KAClB,aAAc,KACd,QAAS,EAGX,qCACE,QAAS,EACT,QAAS,MACT,SAAU,SACV,QAAS,GACT,IAAK,KACL,MAAO,KACP,OAAQ,KACR,WAAY,UAAU,IAAM,QAAQ,CAAE,QAAQ,IAAM,SACpD,UAAW,iBAAiB,cAAc,cAC1C,eAAgB,KAGlB,2CACE,QAAS,EACT,cAAe,IACf,WAAY,QACZ,UAAW,iBAAiB,iBAAiB,cAG/C,0CACE,QAAS,KAGX,qCACE,QAAS,MAET,kBAAmB,cACnB,eAAgB,cAChB,cAAe,cACf,aAAc,cACd,UAAW,cAEb,mCACE,QAAS,KCjFX,mDACE,SAAU,SACV,IAAK,EACL,MAAO,EACP,OAAQ,EACR,KAAM,EACN,OAAQ,KACR,MAAO,KACP,OAAQ,KACR,UAAW,KACX,WAAY,KAEZ,oBAAqB,OACrB,yBAA0B,OAE5B,qDACE,SAAU,SACV,IAAK,EACL,KAAM,EACN,MAAO,KACP,OAAQ,KACR,QAAS,KAEX,sDACE,SAAU,SACV,IAAK,KACL,KAAM,EACN,MAAO,KACP,OAAQ,KACR,OAAQ,KAEV,sDACE,IAAK,EAEP,iDACE,SAAU,SACV,IAAK,IACL,MAAO,EACP,KAAM,EACN,OAAQ,MAAM,KAAK,EACnB,MAAO,MACP,OAAQ,MACR,WAAY,2BAA2B,OAAO,UAC9C,QAAS,GACT,OAAQ,QAEV,iDACA,mDACE,QAAS,KAEX,qDACE,QAAS,MAEX,iDACE,WAAY,wBAAwB,OAAO,UAC3C,gBAAiB,KAAK,KAIxB,sDACE,OAAQ,KAEV,wDACE,KAAM,IACN,YAAa,MAGf,uDACE,QAAS,EAIX,qFAME,iBAAkB"}
|
||||||
51
foto_gallery/blueimp/css/demo/demo.css
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery Demo CSS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
max-width: 750px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 1em;
|
||||||
|
font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1.4em;
|
||||||
|
background: #222;
|
||||||
|
color: #fff;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-ms-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: orange;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
h2,
|
||||||
|
.links {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 481px) {
|
||||||
|
.navigation {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.navigation li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.navigation li:not(:first-child):before {
|
||||||
|
content: '| ';
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
foto_gallery/blueimp/img/error.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
5
foto_gallery/blueimp/img/error.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64" height="64">
|
||||||
|
<circle cx="32" cy="32" r="25" stroke="red" stroke-width="7" fill="black" fill-opacity="0.2"/>
|
||||||
|
<rect x="28" y="7" width="8" height="50" fill="red" transform="rotate(45, 32, 32)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 306 B |
BIN
foto_gallery/blueimp/img/loading.gif
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
foto_gallery/blueimp/img/play-pause.png
Normal file
|
After Width: | Height: | Size: 606 B |
6
foto_gallery/blueimp/img/play-pause.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="30" height="15">
|
||||||
|
<polygon points="2,1 2,14 13,7" stroke="black" stroke-width="1" fill="white"/>
|
||||||
|
<rect x="17" y="2" width="4" height="11" stroke="black" stroke-width="1" fill="white"/>
|
||||||
|
<rect x="24" y="2" width="4" height="11" stroke="black" stroke-width="1" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 382 B |
BIN
foto_gallery/blueimp/img/video-play.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
5
foto_gallery/blueimp/img/video-play.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64" height="64">
|
||||||
|
<circle cx="32" cy="32" r="25" stroke="white" stroke-width="7" fill="black" fill-opacity="0.2"/>
|
||||||
|
<polygon points="26,22 26,42 43,32" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 274 B |
107
foto_gallery/blueimp/index.html
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* blueimp Gallery Demo
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<!--[if IE]>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<![endif]-->
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>blueimp Gallery</title>
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="blueimp Gallery is a touch-enabled, responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading and can be extended to display additional content types."
|
||||||
|
/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="stylesheet" href="css/blueimp-gallery.css" />
|
||||||
|
<link rel="stylesheet" href="css/blueimp-gallery-indicator.css" />
|
||||||
|
<link rel="stylesheet" href="css/blueimp-gallery-video.css" />
|
||||||
|
<link rel="stylesheet" href="css/demo/demo.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>blueimp Gallery</h1>
|
||||||
|
<p>
|
||||||
|
<a href="https://github.com/blueimp/Gallery">blueimp Gallery</a> is a
|
||||||
|
touch-enabled, responsive and customizable image & video gallery,
|
||||||
|
carousel and lightbox, optimized for both mobile and desktop web
|
||||||
|
browsers.<br />
|
||||||
|
It features swipe, mouse and keyboard navigation, transition effects,
|
||||||
|
slideshow functionality, fullscreen support and on-demand content loading
|
||||||
|
and can be extended to display additional content types.
|
||||||
|
</p>
|
||||||
|
<ul class="navigation">
|
||||||
|
<li><a href="https://github.com/blueimp/Gallery/tags">Download</a></li>
|
||||||
|
<li><a href="https://github.com/blueimp/Gallery">Source Code</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="https://github.com/blueimp/Gallery/blob/master/README.md"
|
||||||
|
>Documentation</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
<a href="https://github.com/blueimp/Gallery">blueimp Gallery</a> is based
|
||||||
|
on <a href="http://swipejs.com/">Swipe</a>.
|
||||||
|
</p>
|
||||||
|
<br />
|
||||||
|
<h2>Carousel image gallery</h2>
|
||||||
|
<!-- The Gallery as inline carousel -->
|
||||||
|
<div
|
||||||
|
id="blueimp-image-carousel"
|
||||||
|
class="blueimp-gallery blueimp-gallery-carousel"
|
||||||
|
>
|
||||||
|
<div class="slides"></div>
|
||||||
|
<h3 class="title"></h3>
|
||||||
|
<a class="prev">‹</a>
|
||||||
|
<a class="next">›</a>
|
||||||
|
<a class="play-pause"></a>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<h2>Carousel video gallery</h2>
|
||||||
|
<!-- The Gallery as inline carousel -->
|
||||||
|
<div
|
||||||
|
id="blueimp-video-carousel"
|
||||||
|
class="blueimp-gallery blueimp-gallery-controls blueimp-gallery-carousel"
|
||||||
|
>
|
||||||
|
<div class="slides"></div>
|
||||||
|
<h3 class="title"></h3>
|
||||||
|
<a class="prev">‹</a>
|
||||||
|
<a class="next">›</a>
|
||||||
|
<a class="play-pause"></a>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<h2>Lightbox image gallery</h2>
|
||||||
|
<!-- The container for the list of example images -->
|
||||||
|
<div id="links" class="links"></div>
|
||||||
|
<!-- The Gallery as lightbox dialog -->
|
||||||
|
<div id="blueimp-gallery" class="blueimp-gallery">
|
||||||
|
<div class="slides"></div>
|
||||||
|
<h3 class="title"></h3>
|
||||||
|
<a class="prev">‹</a>
|
||||||
|
<a class="next">›</a>
|
||||||
|
<a class="close">×</a>
|
||||||
|
<a class="play-pause"></a>
|
||||||
|
<ol class="indicator"></ol>
|
||||||
|
</div>
|
||||||
|
<script src="js/blueimp-helper.js"></script>
|
||||||
|
<script src="js/blueimp-gallery.js"></script>
|
||||||
|
<script src="js/blueimp-gallery-fullscreen.js"></script>
|
||||||
|
<script src="js/blueimp-gallery-indicator.js"></script>
|
||||||
|
<script src="js/blueimp-gallery-video.js"></script>
|
||||||
|
<script src="js/blueimp-gallery-vimeo.js"></script>
|
||||||
|
<script src="js/blueimp-gallery-youtube.js"></script>
|
||||||
|
<script src="js/vendor/jquery.js"></script>
|
||||||
|
<script src="js/jquery.blueimp-gallery.js"></script>
|
||||||
|
<script src="js/demo/demo.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
84
foto_gallery/blueimp/js/blueimp-gallery-fullscreen.js
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery Fullscreen JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define */
|
||||||
|
|
||||||
|
;(function(factory) {
|
||||||
|
'use strict'
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// Register as an anonymous AMD module:
|
||||||
|
define(['./blueimp-helper', './blueimp-gallery'], factory)
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery)
|
||||||
|
}
|
||||||
|
})(function($, Gallery) {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype.options, {
|
||||||
|
// Defines if the gallery should open in fullscreen mode:
|
||||||
|
fullScreen: false
|
||||||
|
})
|
||||||
|
|
||||||
|
var initialize = Gallery.prototype.initialize
|
||||||
|
var close = Gallery.prototype.close
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype, {
|
||||||
|
getFullScreenElement: function() {
|
||||||
|
return (
|
||||||
|
document.fullscreenElement ||
|
||||||
|
document.webkitFullscreenElement ||
|
||||||
|
document.mozFullScreenElement ||
|
||||||
|
document.msFullscreenElement
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
requestFullScreen: function(element) {
|
||||||
|
if (element.requestFullscreen) {
|
||||||
|
element.requestFullscreen()
|
||||||
|
} else if (element.webkitRequestFullscreen) {
|
||||||
|
element.webkitRequestFullscreen()
|
||||||
|
} else if (element.mozRequestFullScreen) {
|
||||||
|
element.mozRequestFullScreen()
|
||||||
|
} else if (element.msRequestFullscreen) {
|
||||||
|
element.msRequestFullscreen()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
exitFullScreen: function() {
|
||||||
|
if (document.exitFullscreen) {
|
||||||
|
document.exitFullscreen()
|
||||||
|
} else if (document.webkitCancelFullScreen) {
|
||||||
|
document.webkitCancelFullScreen()
|
||||||
|
} else if (document.mozCancelFullScreen) {
|
||||||
|
document.mozCancelFullScreen()
|
||||||
|
} else if (document.msExitFullscreen) {
|
||||||
|
document.msExitFullscreen()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize: function() {
|
||||||
|
initialize.call(this)
|
||||||
|
if (this.options.fullScreen && !this.getFullScreenElement()) {
|
||||||
|
this.requestFullScreen(this.container[0])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
close: function() {
|
||||||
|
if (this.getFullScreenElement() === this.container[0]) {
|
||||||
|
this.exitFullScreen()
|
||||||
|
}
|
||||||
|
close.call(this)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return Gallery
|
||||||
|
})
|
||||||
145
foto_gallery/blueimp/js/blueimp-gallery-indicator.js
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery Indicator JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define */
|
||||||
|
|
||||||
|
;(function(factory) {
|
||||||
|
'use strict'
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// Register as an anonymous AMD module:
|
||||||
|
define(['./blueimp-helper', './blueimp-gallery'], factory)
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery)
|
||||||
|
}
|
||||||
|
})(function($, Gallery) {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype.options, {
|
||||||
|
// The tag name, Id, element or querySelector of the indicator container:
|
||||||
|
indicatorContainer: 'ol',
|
||||||
|
// The class for the active indicator:
|
||||||
|
activeIndicatorClass: 'active',
|
||||||
|
// The list object property (or data attribute) with the thumbnail URL,
|
||||||
|
// used as alternative to a thumbnail child element:
|
||||||
|
thumbnailProperty: 'thumbnail',
|
||||||
|
// Defines if the gallery indicators should display a thumbnail:
|
||||||
|
thumbnailIndicators: true
|
||||||
|
})
|
||||||
|
|
||||||
|
var initSlides = Gallery.prototype.initSlides
|
||||||
|
var addSlide = Gallery.prototype.addSlide
|
||||||
|
var resetSlides = Gallery.prototype.resetSlides
|
||||||
|
var handleClick = Gallery.prototype.handleClick
|
||||||
|
var handleSlide = Gallery.prototype.handleSlide
|
||||||
|
var handleClose = Gallery.prototype.handleClose
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype, {
|
||||||
|
createIndicator: function(obj) {
|
||||||
|
var indicator = this.indicatorPrototype.cloneNode(false)
|
||||||
|
var title = this.getItemProperty(obj, this.options.titleProperty)
|
||||||
|
var thumbnailProperty = this.options.thumbnailProperty
|
||||||
|
var thumbnailUrl
|
||||||
|
var thumbnail
|
||||||
|
if (this.options.thumbnailIndicators) {
|
||||||
|
if (thumbnailProperty) {
|
||||||
|
thumbnailUrl = this.getItemProperty(obj, thumbnailProperty)
|
||||||
|
}
|
||||||
|
if (thumbnailUrl === undefined) {
|
||||||
|
thumbnail = obj.getElementsByTagName && $(obj).find('img')[0]
|
||||||
|
if (thumbnail) {
|
||||||
|
thumbnailUrl = thumbnail.src
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (thumbnailUrl) {
|
||||||
|
indicator.style.backgroundImage = 'url("' + thumbnailUrl + '")'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (title) {
|
||||||
|
indicator.title = title
|
||||||
|
}
|
||||||
|
return indicator
|
||||||
|
},
|
||||||
|
|
||||||
|
addIndicator: function(index) {
|
||||||
|
if (this.indicatorContainer.length) {
|
||||||
|
var indicator = this.createIndicator(this.list[index])
|
||||||
|
indicator.setAttribute('data-index', index)
|
||||||
|
this.indicatorContainer[0].appendChild(indicator)
|
||||||
|
this.indicators.push(indicator)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setActiveIndicator: function(index) {
|
||||||
|
if (this.indicators) {
|
||||||
|
if (this.activeIndicator) {
|
||||||
|
this.activeIndicator.removeClass(this.options.activeIndicatorClass)
|
||||||
|
}
|
||||||
|
this.activeIndicator = $(this.indicators[index])
|
||||||
|
this.activeIndicator.addClass(this.options.activeIndicatorClass)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
initSlides: function(reload) {
|
||||||
|
if (!reload) {
|
||||||
|
this.indicatorContainer = this.container.find(
|
||||||
|
this.options.indicatorContainer
|
||||||
|
)
|
||||||
|
if (this.indicatorContainer.length) {
|
||||||
|
this.indicatorPrototype = document.createElement('li')
|
||||||
|
this.indicators = this.indicatorContainer[0].children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
initSlides.call(this, reload)
|
||||||
|
},
|
||||||
|
|
||||||
|
addSlide: function(index) {
|
||||||
|
addSlide.call(this, index)
|
||||||
|
this.addIndicator(index)
|
||||||
|
},
|
||||||
|
|
||||||
|
resetSlides: function() {
|
||||||
|
resetSlides.call(this)
|
||||||
|
this.indicatorContainer.empty()
|
||||||
|
this.indicators = []
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClick: function(event) {
|
||||||
|
var target = event.target || event.srcElement
|
||||||
|
var parent = target.parentNode
|
||||||
|
if (parent === this.indicatorContainer[0]) {
|
||||||
|
// Click on indicator element
|
||||||
|
this.preventDefault(event)
|
||||||
|
this.slide(this.getNodeIndex(target))
|
||||||
|
} else if (parent.parentNode === this.indicatorContainer[0]) {
|
||||||
|
// Click on indicator child element
|
||||||
|
this.preventDefault(event)
|
||||||
|
this.slide(this.getNodeIndex(parent))
|
||||||
|
} else {
|
||||||
|
return handleClick.call(this, event)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSlide: function(index) {
|
||||||
|
handleSlide.call(this, index)
|
||||||
|
this.setActiveIndicator(index)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClose: function() {
|
||||||
|
if (this.activeIndicator) {
|
||||||
|
this.activeIndicator.removeClass(this.options.activeIndicatorClass)
|
||||||
|
}
|
||||||
|
handleClose.call(this)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return Gallery
|
||||||
|
})
|
||||||
169
foto_gallery/blueimp/js/blueimp-gallery-video.js
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery Video Factory JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define */
|
||||||
|
|
||||||
|
;(function(factory) {
|
||||||
|
'use strict'
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// Register as an anonymous AMD module:
|
||||||
|
define(['./blueimp-helper', './blueimp-gallery'], factory)
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery)
|
||||||
|
}
|
||||||
|
})(function($, Gallery) {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype.options, {
|
||||||
|
// The class for video content elements:
|
||||||
|
videoContentClass: 'video-content',
|
||||||
|
// The class for video when it is loading:
|
||||||
|
videoLoadingClass: 'video-loading',
|
||||||
|
// The class for video when it is playing:
|
||||||
|
videoPlayingClass: 'video-playing',
|
||||||
|
// The list object property (or data attribute) for the video poster URL:
|
||||||
|
videoPosterProperty: 'poster',
|
||||||
|
// The list object property (or data attribute) for the video sources array:
|
||||||
|
videoSourcesProperty: 'sources'
|
||||||
|
})
|
||||||
|
|
||||||
|
var handleSlide = Gallery.prototype.handleSlide
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype, {
|
||||||
|
handleSlide: function(index) {
|
||||||
|
handleSlide.call(this, index)
|
||||||
|
if (this.playingVideo) {
|
||||||
|
this.playingVideo.pause()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
videoFactory: function(obj, callback, videoInterface) {
|
||||||
|
var that = this
|
||||||
|
var options = this.options
|
||||||
|
var videoContainerNode = this.elementPrototype.cloneNode(false)
|
||||||
|
var videoContainer = $(videoContainerNode)
|
||||||
|
var errorArgs = [
|
||||||
|
{
|
||||||
|
type: 'error',
|
||||||
|
target: videoContainerNode
|
||||||
|
}
|
||||||
|
]
|
||||||
|
var video = videoInterface || document.createElement('video')
|
||||||
|
var url = this.getItemProperty(obj, options.urlProperty)
|
||||||
|
var type = this.getItemProperty(obj, options.typeProperty)
|
||||||
|
var title = this.getItemProperty(obj, options.titleProperty)
|
||||||
|
var altText =
|
||||||
|
this.getItemProperty(obj, this.options.altTextProperty) || title
|
||||||
|
var posterUrl = this.getItemProperty(obj, options.videoPosterProperty)
|
||||||
|
var posterImage
|
||||||
|
var sources = this.getItemProperty(obj, options.videoSourcesProperty)
|
||||||
|
var source
|
||||||
|
var playMediaControl
|
||||||
|
var isLoading
|
||||||
|
var hasControls
|
||||||
|
videoContainer.addClass(options.videoContentClass)
|
||||||
|
if (title) {
|
||||||
|
videoContainerNode.title = title
|
||||||
|
}
|
||||||
|
if (video.canPlayType) {
|
||||||
|
if (url && type && video.canPlayType(type)) {
|
||||||
|
video.src = url
|
||||||
|
} else if (sources) {
|
||||||
|
while (sources.length) {
|
||||||
|
source = sources.shift()
|
||||||
|
url = this.getItemProperty(source, options.urlProperty)
|
||||||
|
type = this.getItemProperty(source, options.typeProperty)
|
||||||
|
if (url && type && video.canPlayType(type)) {
|
||||||
|
video.src = url
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (posterUrl) {
|
||||||
|
video.poster = posterUrl
|
||||||
|
posterImage = this.imagePrototype.cloneNode(false)
|
||||||
|
$(posterImage).addClass(options.toggleClass)
|
||||||
|
posterImage.src = posterUrl
|
||||||
|
posterImage.draggable = false
|
||||||
|
posterImage.alt = altText
|
||||||
|
videoContainerNode.appendChild(posterImage)
|
||||||
|
}
|
||||||
|
playMediaControl = document.createElement('a')
|
||||||
|
playMediaControl.setAttribute('target', '_blank')
|
||||||
|
if (!videoInterface) {
|
||||||
|
playMediaControl.setAttribute('download', title)
|
||||||
|
}
|
||||||
|
playMediaControl.href = url
|
||||||
|
if (video.src) {
|
||||||
|
video.controls = true
|
||||||
|
;(videoInterface || $(video))
|
||||||
|
.on('error', function() {
|
||||||
|
that.setTimeout(callback, errorArgs)
|
||||||
|
})
|
||||||
|
.on('pause', function() {
|
||||||
|
if (video.seeking) return
|
||||||
|
isLoading = false
|
||||||
|
videoContainer
|
||||||
|
.removeClass(that.options.videoLoadingClass)
|
||||||
|
.removeClass(that.options.videoPlayingClass)
|
||||||
|
if (hasControls) {
|
||||||
|
that.container.addClass(that.options.controlsClass)
|
||||||
|
}
|
||||||
|
delete that.playingVideo
|
||||||
|
if (that.interval) {
|
||||||
|
that.play()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.on('playing', function() {
|
||||||
|
isLoading = false
|
||||||
|
videoContainer
|
||||||
|
.removeClass(that.options.videoLoadingClass)
|
||||||
|
.addClass(that.options.videoPlayingClass)
|
||||||
|
if (that.container.hasClass(that.options.controlsClass)) {
|
||||||
|
hasControls = true
|
||||||
|
that.container.removeClass(that.options.controlsClass)
|
||||||
|
} else {
|
||||||
|
hasControls = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.on('play', function() {
|
||||||
|
window.clearTimeout(that.timeout)
|
||||||
|
isLoading = true
|
||||||
|
videoContainer.addClass(that.options.videoLoadingClass)
|
||||||
|
that.playingVideo = video
|
||||||
|
})
|
||||||
|
$(playMediaControl).on('click', function(event) {
|
||||||
|
that.preventDefault(event)
|
||||||
|
if (isLoading) {
|
||||||
|
video.pause()
|
||||||
|
} else {
|
||||||
|
video.play()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
videoContainerNode.appendChild(
|
||||||
|
(videoInterface && videoInterface.element) || video
|
||||||
|
)
|
||||||
|
}
|
||||||
|
videoContainerNode.appendChild(playMediaControl)
|
||||||
|
this.setTimeout(callback, [
|
||||||
|
{
|
||||||
|
type: 'load',
|
||||||
|
target: videoContainerNode
|
||||||
|
}
|
||||||
|
])
|
||||||
|
return videoContainerNode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return Gallery
|
||||||
|
})
|
||||||
213
foto_gallery/blueimp/js/blueimp-gallery-vimeo.js
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery Vimeo Video Factory JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define, $f */
|
||||||
|
|
||||||
|
;(function(factory) {
|
||||||
|
'use strict'
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// Register as an anonymous AMD module:
|
||||||
|
define(['./blueimp-helper', './blueimp-gallery-video'], factory)
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery)
|
||||||
|
}
|
||||||
|
})(function($, Gallery) {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (!window.postMessage) {
|
||||||
|
return Gallery
|
||||||
|
}
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype.options, {
|
||||||
|
// The list object property (or data attribute) with the Vimeo video id:
|
||||||
|
vimeoVideoIdProperty: 'vimeo',
|
||||||
|
// The URL for the Vimeo video player, can be extended with custom parameters:
|
||||||
|
// https://developer.vimeo.com/player/embedding
|
||||||
|
vimeoPlayerUrl:
|
||||||
|
'//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID',
|
||||||
|
// The prefix for the Vimeo video player ID:
|
||||||
|
vimeoPlayerIdPrefix: 'vimeo-player-',
|
||||||
|
// Require a click on the native Vimeo player for the initial playback:
|
||||||
|
vimeoClickToPlay: true
|
||||||
|
})
|
||||||
|
|
||||||
|
var textFactory =
|
||||||
|
Gallery.prototype.textFactory || Gallery.prototype.imageFactory
|
||||||
|
var VimeoPlayer = function(url, videoId, playerId, clickToPlay) {
|
||||||
|
this.url = url
|
||||||
|
this.videoId = videoId
|
||||||
|
this.playerId = playerId
|
||||||
|
this.clickToPlay = clickToPlay
|
||||||
|
this.element = document.createElement('div')
|
||||||
|
this.listeners = {}
|
||||||
|
}
|
||||||
|
var counter = 0
|
||||||
|
|
||||||
|
$.extend(VimeoPlayer.prototype, {
|
||||||
|
canPlayType: function() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
|
||||||
|
on: function(type, func) {
|
||||||
|
this.listeners[type] = func
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
loadAPI: function() {
|
||||||
|
var that = this
|
||||||
|
var apiUrl = '//f.vimeocdn.com/js/froogaloop2.min.js'
|
||||||
|
var scriptTags = document.getElementsByTagName('script')
|
||||||
|
var i = scriptTags.length
|
||||||
|
var scriptTag
|
||||||
|
var called
|
||||||
|
/**
|
||||||
|
* Callback function
|
||||||
|
*/
|
||||||
|
function callback() {
|
||||||
|
if (!called && that.playOnReady) {
|
||||||
|
that.play()
|
||||||
|
}
|
||||||
|
called = true
|
||||||
|
}
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
if (scriptTags[i].src === apiUrl) {
|
||||||
|
scriptTag = scriptTags[i]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!scriptTag) {
|
||||||
|
scriptTag = document.createElement('script')
|
||||||
|
scriptTag.src = apiUrl
|
||||||
|
}
|
||||||
|
$(scriptTag).on('load', callback)
|
||||||
|
scriptTags[0].parentNode.insertBefore(scriptTag, scriptTags[0])
|
||||||
|
// Fix for cached scripts on IE 8:
|
||||||
|
if (/loaded|complete/.test(scriptTag.readyState)) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onReady: function() {
|
||||||
|
var that = this
|
||||||
|
this.ready = true
|
||||||
|
this.player.addEvent('play', function() {
|
||||||
|
that.hasPlayed = true
|
||||||
|
that.onPlaying()
|
||||||
|
})
|
||||||
|
this.player.addEvent('pause', function() {
|
||||||
|
that.onPause()
|
||||||
|
})
|
||||||
|
this.player.addEvent('finish', function() {
|
||||||
|
that.onPause()
|
||||||
|
})
|
||||||
|
if (this.playOnReady) {
|
||||||
|
this.play()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPlaying: function() {
|
||||||
|
if (this.playStatus < 2) {
|
||||||
|
this.listeners.playing()
|
||||||
|
this.playStatus = 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPause: function() {
|
||||||
|
this.listeners.pause()
|
||||||
|
delete this.playStatus
|
||||||
|
},
|
||||||
|
|
||||||
|
insertIframe: function() {
|
||||||
|
var iframe = document.createElement('iframe')
|
||||||
|
iframe.src = this.url
|
||||||
|
.replace('VIDEO_ID', this.videoId)
|
||||||
|
.replace('PLAYER_ID', this.playerId)
|
||||||
|
iframe.id = this.playerId
|
||||||
|
this.element.parentNode.replaceChild(iframe, this.element)
|
||||||
|
this.element = iframe
|
||||||
|
},
|
||||||
|
|
||||||
|
play: function() {
|
||||||
|
var that = this
|
||||||
|
if (!this.playStatus) {
|
||||||
|
this.listeners.play()
|
||||||
|
this.playStatus = 1
|
||||||
|
}
|
||||||
|
if (this.ready) {
|
||||||
|
if (
|
||||||
|
!this.hasPlayed &&
|
||||||
|
(this.clickToPlay ||
|
||||||
|
(window.navigator &&
|
||||||
|
/iP(hone|od|ad)/.test(window.navigator.platform)))
|
||||||
|
) {
|
||||||
|
// Manually trigger the playing callback if clickToPlay
|
||||||
|
// is enabled and to workaround a limitation in iOS,
|
||||||
|
// which requires synchronous user interaction to start
|
||||||
|
// the video playback:
|
||||||
|
this.onPlaying()
|
||||||
|
} else {
|
||||||
|
this.player.api('play')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.playOnReady = true
|
||||||
|
if (!window.$f) {
|
||||||
|
this.loadAPI()
|
||||||
|
} else if (!this.player) {
|
||||||
|
this.insertIframe()
|
||||||
|
this.player = $f(this.element)
|
||||||
|
this.player.addEvent('ready', function() {
|
||||||
|
that.onReady()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
pause: function() {
|
||||||
|
if (this.ready) {
|
||||||
|
this.player.api('pause')
|
||||||
|
} else if (this.playStatus) {
|
||||||
|
delete this.playOnReady
|
||||||
|
this.listeners.pause()
|
||||||
|
delete this.playStatus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype, {
|
||||||
|
VimeoPlayer: VimeoPlayer,
|
||||||
|
|
||||||
|
textFactory: function(obj, callback) {
|
||||||
|
var options = this.options
|
||||||
|
var videoId = this.getItemProperty(obj, options.vimeoVideoIdProperty)
|
||||||
|
if (videoId) {
|
||||||
|
if (this.getItemProperty(obj, options.urlProperty) === undefined) {
|
||||||
|
obj[options.urlProperty] = '//vimeo.com/' + videoId
|
||||||
|
}
|
||||||
|
counter += 1
|
||||||
|
return this.videoFactory(
|
||||||
|
obj,
|
||||||
|
callback,
|
||||||
|
new VimeoPlayer(
|
||||||
|
options.vimeoPlayerUrl,
|
||||||
|
videoId,
|
||||||
|
options.vimeoPlayerIdPrefix + counter,
|
||||||
|
options.vimeoClickToPlay
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return textFactory.call(this, obj, callback)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return Gallery
|
||||||
|
})
|
||||||
223
foto_gallery/blueimp/js/blueimp-gallery-youtube.js
Normal file
@@ -0,0 +1,223 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery YouTube Video Factory JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define, YT */
|
||||||
|
|
||||||
|
;(function(factory) {
|
||||||
|
'use strict'
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// Register as an anonymous AMD module:
|
||||||
|
define(['./blueimp-helper', './blueimp-gallery-video'], factory)
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery)
|
||||||
|
}
|
||||||
|
})(function($, Gallery) {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (!window.postMessage) {
|
||||||
|
return Gallery
|
||||||
|
}
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype.options, {
|
||||||
|
// The list object property (or data attribute) with the YouTube video id:
|
||||||
|
youTubeVideoIdProperty: 'youtube',
|
||||||
|
// Optional object with parameters passed to the YouTube video player:
|
||||||
|
// https://developers.google.com/youtube/player_parameters
|
||||||
|
youTubePlayerVars: {
|
||||||
|
wmode: 'transparent'
|
||||||
|
},
|
||||||
|
// Require a click on the native YouTube player for the initial playback:
|
||||||
|
youTubeClickToPlay: true
|
||||||
|
})
|
||||||
|
|
||||||
|
var textFactory =
|
||||||
|
Gallery.prototype.textFactory || Gallery.prototype.imageFactory
|
||||||
|
var YouTubePlayer = function(videoId, playerVars, clickToPlay) {
|
||||||
|
this.videoId = videoId
|
||||||
|
this.playerVars = playerVars
|
||||||
|
this.clickToPlay = clickToPlay
|
||||||
|
this.element = document.createElement('div')
|
||||||
|
this.listeners = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.extend(YouTubePlayer.prototype, {
|
||||||
|
canPlayType: function() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
|
||||||
|
on: function(type, func) {
|
||||||
|
this.listeners[type] = func
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
loadAPI: function() {
|
||||||
|
var that = this
|
||||||
|
var onYouTubeIframeAPIReady = window.onYouTubeIframeAPIReady
|
||||||
|
var apiUrl = '//www.youtube.com/iframe_api'
|
||||||
|
var scriptTags = document.getElementsByTagName('script')
|
||||||
|
var i = scriptTags.length
|
||||||
|
var scriptTag
|
||||||
|
window.onYouTubeIframeAPIReady = function() {
|
||||||
|
if (onYouTubeIframeAPIReady) {
|
||||||
|
onYouTubeIframeAPIReady.apply(this)
|
||||||
|
}
|
||||||
|
if (that.playOnReady) {
|
||||||
|
that.play()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
if (scriptTags[i].src === apiUrl) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scriptTag = document.createElement('script')
|
||||||
|
scriptTag.src = apiUrl
|
||||||
|
scriptTags[0].parentNode.insertBefore(scriptTag, scriptTags[0])
|
||||||
|
},
|
||||||
|
|
||||||
|
onReady: function() {
|
||||||
|
this.ready = true
|
||||||
|
if (this.playOnReady) {
|
||||||
|
this.play()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPlaying: function() {
|
||||||
|
if (this.playStatus < 2) {
|
||||||
|
this.listeners.playing()
|
||||||
|
this.playStatus = 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPause: function() {
|
||||||
|
Gallery.prototype.setTimeout.call(this, this.checkSeek, null, 2000)
|
||||||
|
},
|
||||||
|
|
||||||
|
checkSeek: function() {
|
||||||
|
if (
|
||||||
|
this.stateChange === YT.PlayerState.PAUSED ||
|
||||||
|
this.stateChange === YT.PlayerState.ENDED
|
||||||
|
) {
|
||||||
|
// check if current state change is actually paused
|
||||||
|
this.listeners.pause()
|
||||||
|
delete this.playStatus
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onStateChange: function(event) {
|
||||||
|
switch (event.data) {
|
||||||
|
case YT.PlayerState.PLAYING:
|
||||||
|
this.hasPlayed = true
|
||||||
|
this.onPlaying()
|
||||||
|
break
|
||||||
|
case YT.PlayerState.PAUSED:
|
||||||
|
case YT.PlayerState.ENDED:
|
||||||
|
this.onPause()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
// Save most recent state change to this.stateChange
|
||||||
|
this.stateChange = event.data
|
||||||
|
},
|
||||||
|
|
||||||
|
onError: function(event) {
|
||||||
|
this.listeners.error(event)
|
||||||
|
},
|
||||||
|
|
||||||
|
play: function() {
|
||||||
|
var that = this
|
||||||
|
if (!this.playStatus) {
|
||||||
|
this.listeners.play()
|
||||||
|
this.playStatus = 1
|
||||||
|
}
|
||||||
|
if (this.ready) {
|
||||||
|
if (
|
||||||
|
!this.hasPlayed &&
|
||||||
|
(this.clickToPlay ||
|
||||||
|
(window.navigator &&
|
||||||
|
/iP(hone|od|ad)/.test(window.navigator.platform)))
|
||||||
|
) {
|
||||||
|
// Manually trigger the playing callback if clickToPlay
|
||||||
|
// is enabled and to workaround a limitation in iOS,
|
||||||
|
// which requires synchronous user interaction to start
|
||||||
|
// the video playback:
|
||||||
|
this.onPlaying()
|
||||||
|
} else {
|
||||||
|
this.player.playVideo()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.playOnReady = true
|
||||||
|
if (!(window.YT && YT.Player)) {
|
||||||
|
this.loadAPI()
|
||||||
|
} else if (!this.player) {
|
||||||
|
this.player = new YT.Player(this.element, {
|
||||||
|
videoId: this.videoId,
|
||||||
|
playerVars: this.playerVars,
|
||||||
|
events: {
|
||||||
|
onReady: function() {
|
||||||
|
that.onReady()
|
||||||
|
},
|
||||||
|
onStateChange: function(event) {
|
||||||
|
that.onStateChange(event)
|
||||||
|
},
|
||||||
|
onError: function(event) {
|
||||||
|
that.onError(event)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
pause: function() {
|
||||||
|
if (this.ready) {
|
||||||
|
this.player.pauseVideo()
|
||||||
|
} else if (this.playStatus) {
|
||||||
|
delete this.playOnReady
|
||||||
|
this.listeners.pause()
|
||||||
|
delete this.playStatus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.extend(Gallery.prototype, {
|
||||||
|
YouTubePlayer: YouTubePlayer,
|
||||||
|
|
||||||
|
textFactory: function(obj, callback) {
|
||||||
|
var options = this.options
|
||||||
|
var videoId = this.getItemProperty(obj, options.youTubeVideoIdProperty)
|
||||||
|
if (videoId) {
|
||||||
|
if (this.getItemProperty(obj, options.urlProperty) === undefined) {
|
||||||
|
obj[options.urlProperty] = '//www.youtube.com/watch?v=' + videoId
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
this.getItemProperty(obj, options.videoPosterProperty) === undefined
|
||||||
|
) {
|
||||||
|
obj[options.videoPosterProperty] =
|
||||||
|
'//img.youtube.com/vi/' + videoId + '/maxresdefault.jpg'
|
||||||
|
}
|
||||||
|
return this.videoFactory(
|
||||||
|
obj,
|
||||||
|
callback,
|
||||||
|
new YouTubePlayer(
|
||||||
|
videoId,
|
||||||
|
options.youTubePlayerVars,
|
||||||
|
options.youTubeClickToPlay
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return textFactory.call(this, obj, callback)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return Gallery
|
||||||
|
})
|
||||||
1468
foto_gallery/blueimp/js/blueimp-gallery.js
Normal file
2
foto_gallery/blueimp/js/blueimp-gallery.min.js
vendored
Normal file
1
foto_gallery/blueimp/js/blueimp-gallery.min.js.map
Normal file
204
foto_gallery/blueimp/js/blueimp-helper.js
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
/*
|
||||||
|
* blueimp helper JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define */
|
||||||
|
|
||||||
|
/* eslint-disable no-param-reassign */
|
||||||
|
|
||||||
|
;(function() {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object.assign polyfill
|
||||||
|
*
|
||||||
|
* @param {object} obj1 First object
|
||||||
|
* @param {object} obj2 Second object
|
||||||
|
* @returns {object} Merged object
|
||||||
|
*/
|
||||||
|
function extend(obj1, obj2) {
|
||||||
|
var prop
|
||||||
|
for (prop in obj2) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(obj2, prop)) {
|
||||||
|
obj1[prop] = obj2[prop]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return obj1
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Helper constructor
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @param {*} query jQuery type query argument
|
||||||
|
*/
|
||||||
|
function Helper(query) {
|
||||||
|
if (!this || this.find !== Helper.prototype.find) {
|
||||||
|
// Called as function instead of as constructor,
|
||||||
|
// so we simply return a new instance:
|
||||||
|
return new Helper(query)
|
||||||
|
}
|
||||||
|
this.length = 0
|
||||||
|
if (query) {
|
||||||
|
if (typeof query === 'string') {
|
||||||
|
query = this.find(query)
|
||||||
|
}
|
||||||
|
if (query.nodeType || query === query.window) {
|
||||||
|
// Single HTML element
|
||||||
|
this.length = 1
|
||||||
|
this[0] = query
|
||||||
|
} else {
|
||||||
|
// HTML element collection
|
||||||
|
var i = query.length
|
||||||
|
this.length = i
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
this[i] = query[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Helper.extend = extend
|
||||||
|
|
||||||
|
Helper.contains = function(container, element) {
|
||||||
|
do {
|
||||||
|
element = element.parentNode
|
||||||
|
if (element === container) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
} while (element)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
Helper.parseJSON = function(string) {
|
||||||
|
return window.JSON && JSON.parse(string)
|
||||||
|
}
|
||||||
|
|
||||||
|
extend(Helper.prototype, {
|
||||||
|
find: function(query) {
|
||||||
|
var container = this[0] || document
|
||||||
|
if (typeof query === 'string') {
|
||||||
|
if (container.querySelectorAll) {
|
||||||
|
query = container.querySelectorAll(query)
|
||||||
|
} else if (query.charAt(0) === '#') {
|
||||||
|
query = container.getElementById(query.slice(1))
|
||||||
|
} else {
|
||||||
|
query = container.getElementsByTagName(query)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Helper(query)
|
||||||
|
},
|
||||||
|
|
||||||
|
hasClass: function(className) {
|
||||||
|
if (!this[0]) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return new RegExp('(^|\\s+)' + className + '(\\s+|$)').test(
|
||||||
|
this[0].className
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
addClass: function(className) {
|
||||||
|
var i = this.length
|
||||||
|
var element
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
element = this[i]
|
||||||
|
if (!element.className) {
|
||||||
|
element.className = className
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
if (this.hasClass(className)) {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
element.className += ' ' + className
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
removeClass: function(className) {
|
||||||
|
var regexp = new RegExp('(^|\\s+)' + className + '(\\s+|$)')
|
||||||
|
var i = this.length
|
||||||
|
var element
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
element = this[i]
|
||||||
|
element.className = element.className.replace(regexp, ' ')
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
on: function(eventName, handler) {
|
||||||
|
var eventNames = eventName.split(/\s+/)
|
||||||
|
var i
|
||||||
|
var element
|
||||||
|
while (eventNames.length) {
|
||||||
|
eventName = eventNames.shift()
|
||||||
|
i = this.length
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
element = this[i]
|
||||||
|
if (element.addEventListener) {
|
||||||
|
element.addEventListener(eventName, handler, false)
|
||||||
|
} else if (element.attachEvent) {
|
||||||
|
element.attachEvent('on' + eventName, handler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
off: function(eventName, handler) {
|
||||||
|
var eventNames = eventName.split(/\s+/)
|
||||||
|
var i
|
||||||
|
var element
|
||||||
|
while (eventNames.length) {
|
||||||
|
eventName = eventNames.shift()
|
||||||
|
i = this.length
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
element = this[i]
|
||||||
|
if (element.removeEventListener) {
|
||||||
|
element.removeEventListener(eventName, handler, false)
|
||||||
|
} else if (element.detachEvent) {
|
||||||
|
element.detachEvent('on' + eventName, handler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
empty: function() {
|
||||||
|
var i = this.length
|
||||||
|
var element
|
||||||
|
while (i) {
|
||||||
|
i -= 1
|
||||||
|
element = this[i]
|
||||||
|
while (element.hasChildNodes()) {
|
||||||
|
element.removeChild(element.lastChild)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
first: function() {
|
||||||
|
return new Helper(this[0])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define(function() {
|
||||||
|
return Helper
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
window.blueimp = window.blueimp || {}
|
||||||
|
window.blueimp.helper = Helper
|
||||||
|
}
|
||||||
|
})()
|
||||||
109
foto_gallery/blueimp/js/demo/demo.js
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery Demo JS
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global blueimp, $ */
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
// Load demo images from flickr:
|
||||||
|
$.ajax({
|
||||||
|
url: 'https://api.flickr.com/services/rest/',
|
||||||
|
data: {
|
||||||
|
format: 'json',
|
||||||
|
method: 'flickr.interestingness.getList',
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
|
api_key: '7617adae70159d09ba78cfec73c13be3'
|
||||||
|
},
|
||||||
|
dataType: 'jsonp',
|
||||||
|
jsonp: 'jsoncallback'
|
||||||
|
}).done(function(result) {
|
||||||
|
var carouselLinks = []
|
||||||
|
var linksContainer = $('#links')
|
||||||
|
var baseUrl
|
||||||
|
// Add the demo images as links with thumbnails to the page:
|
||||||
|
$.each(result.photos.photo, function(index, photo) {
|
||||||
|
baseUrl =
|
||||||
|
'https://farm' +
|
||||||
|
photo.farm +
|
||||||
|
'.static.flickr.com/' +
|
||||||
|
photo.server +
|
||||||
|
'/' +
|
||||||
|
photo.id +
|
||||||
|
'_' +
|
||||||
|
photo.secret
|
||||||
|
$('<a/>')
|
||||||
|
.append($('<img>').prop('src', baseUrl + '_s.jpg'))
|
||||||
|
.prop('href', baseUrl + '_b.jpg')
|
||||||
|
.prop('title', photo.title)
|
||||||
|
.attr('data-gallery', '')
|
||||||
|
.appendTo(linksContainer)
|
||||||
|
carouselLinks.push({
|
||||||
|
href: baseUrl + '_c.jpg',
|
||||||
|
title: photo.title
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// Initialize the Gallery as image carousel:
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
blueimp.Gallery(carouselLinks, {
|
||||||
|
container: '#blueimp-image-carousel',
|
||||||
|
carousel: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// Initialize the Gallery as video carousel:
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
blueimp.Gallery(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
title: 'Sintel',
|
||||||
|
href: 'https://archive.org/download/Sintel/sintel-2048-surround.mp4',
|
||||||
|
type: 'video/mp4',
|
||||||
|
poster: 'https://i.imgur.com/MUSw4Zu.jpg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Big Buck Bunny',
|
||||||
|
href:
|
||||||
|
'https://upload.wikimedia.org/wikipedia/commons/c/c0/' +
|
||||||
|
'Big_Buck_Bunny_4K.webm',
|
||||||
|
type: 'video/webm',
|
||||||
|
poster:
|
||||||
|
'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/' +
|
||||||
|
'Big_Buck_Bunny_4K.webm/4000px--Big_Buck_Bunny_4K.webm.jpg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Elephants Dream',
|
||||||
|
href:
|
||||||
|
'https://upload.wikimedia.org/wikipedia/commons/8/83/' +
|
||||||
|
'Elephants_Dream_%28high_quality%29.ogv',
|
||||||
|
type: 'video/ogg',
|
||||||
|
poster:
|
||||||
|
'https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/' +
|
||||||
|
'Elephants_Dream_s1_proog.jpg/800px-Elephants_Dream_s1_proog.jpg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'LES TWINS - An Industry Ahead',
|
||||||
|
type: 'text/html',
|
||||||
|
youtube: 'zi4CIXpx7Bg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'KN1GHT - Last Moon',
|
||||||
|
type: 'text/html',
|
||||||
|
vimeo: '73686146',
|
||||||
|
poster: 'https://secure-a.vimeocdn.com/ts/448/835/448835699_960.jpg'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
{
|
||||||
|
container: '#blueimp-video-carousel',
|
||||||
|
carousel: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
75
foto_gallery/blueimp/js/jquery.blueimp-gallery.js
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* blueimp Gallery jQuery plugin
|
||||||
|
* https://github.com/blueimp/Gallery
|
||||||
|
*
|
||||||
|
* Copyright 2013, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global define */
|
||||||
|
|
||||||
|
;(function(factory) {
|
||||||
|
'use strict'
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define(['jquery', './blueimp-gallery'], factory)
|
||||||
|
} else {
|
||||||
|
factory(window.jQuery, window.blueimp.Gallery)
|
||||||
|
}
|
||||||
|
})(function($, Gallery) {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
// Global click handler to open links with data-gallery attribute
|
||||||
|
// in the Gallery lightbox:
|
||||||
|
$(document).on('click', '[data-gallery]', function(event) {
|
||||||
|
// Get the container id from the data-gallery attribute:
|
||||||
|
var id = $(this).data('gallery')
|
||||||
|
var widget = $(id)
|
||||||
|
var container =
|
||||||
|
(widget.length && widget) || $(Gallery.prototype.options.container)
|
||||||
|
var callbacks = {
|
||||||
|
onopen: function() {
|
||||||
|
container.data('gallery', this).trigger('open')
|
||||||
|
},
|
||||||
|
onopened: function() {
|
||||||
|
container.trigger('opened')
|
||||||
|
},
|
||||||
|
onslide: function() {
|
||||||
|
container.trigger('slide', arguments)
|
||||||
|
},
|
||||||
|
onslideend: function() {
|
||||||
|
container.trigger('slideend', arguments)
|
||||||
|
},
|
||||||
|
onslidecomplete: function() {
|
||||||
|
container.trigger('slidecomplete', arguments)
|
||||||
|
},
|
||||||
|
onclose: function() {
|
||||||
|
container.trigger('close')
|
||||||
|
},
|
||||||
|
onclosed: function() {
|
||||||
|
container.trigger('closed').removeData('gallery')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var options = $.extend(
|
||||||
|
// Retrieve custom options from data-attributes
|
||||||
|
// on the Gallery widget:
|
||||||
|
container.data(),
|
||||||
|
{
|
||||||
|
container: container[0],
|
||||||
|
index: this,
|
||||||
|
event: event
|
||||||
|
},
|
||||||
|
callbacks
|
||||||
|
)
|
||||||
|
// Select all links with the same data-gallery attribute:
|
||||||
|
var links = $(this)
|
||||||
|
.closest('[data-gallery-group], body')
|
||||||
|
.find('[data-gallery="' + id + '"]')
|
||||||
|
if (options.filter) {
|
||||||
|
links = links.filter(options.filter)
|
||||||
|
}
|
||||||
|
return new Gallery(links, options)
|
||||||
|
})
|
||||||
|
})
|
||||||
2
foto_gallery/blueimp/js/jquery.blueimp-gallery.min.js
vendored
Normal file
10364
foto_gallery/blueimp/js/vendor/jquery.js
vendored
Normal file
4009
foto_gallery/blueimp/package-lock.json
generated
Normal file
96
foto_gallery/blueimp/package.json
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"name": "blueimp-gallery",
|
||||||
|
"version": "2.36.0",
|
||||||
|
"title": "blueimp Gallery",
|
||||||
|
"description": "blueimp Gallery is a touch-enabled, responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading and can be extended to display additional content types.",
|
||||||
|
"keywords": [
|
||||||
|
"image",
|
||||||
|
"video",
|
||||||
|
"gallery",
|
||||||
|
"carousel",
|
||||||
|
"lightbox",
|
||||||
|
"mobile",
|
||||||
|
"desktop",
|
||||||
|
"touch",
|
||||||
|
"responsive",
|
||||||
|
"swipe",
|
||||||
|
"mouse",
|
||||||
|
"keyboard",
|
||||||
|
"navigation",
|
||||||
|
"transition",
|
||||||
|
"effects",
|
||||||
|
"slideshow",
|
||||||
|
"fullscreen"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/blueimp/Gallery",
|
||||||
|
"author": {
|
||||||
|
"name": "Sebastian Tschan",
|
||||||
|
"url": "https://blueimp.net"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/blueimp/Gallery.git"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"clean-css-cli": "4",
|
||||||
|
"eslint": "6",
|
||||||
|
"eslint-config-blueimp": "1",
|
||||||
|
"eslint-config-prettier": "6",
|
||||||
|
"eslint-plugin-jsdoc": "15",
|
||||||
|
"eslint-plugin-prettier": "3",
|
||||||
|
"prettier": "1",
|
||||||
|
"stylelint": "10",
|
||||||
|
"stylelint-config-prettier": "5",
|
||||||
|
"stylelint-config-recommended": "2",
|
||||||
|
"uglify-js": "3"
|
||||||
|
},
|
||||||
|
"stylelint": {
|
||||||
|
"extends": [
|
||||||
|
"stylelint-config-recommended",
|
||||||
|
"stylelint-config-prettier"
|
||||||
|
],
|
||||||
|
"ignoreFiles": [
|
||||||
|
"css/*.min.css"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": [
|
||||||
|
"blueimp",
|
||||||
|
"plugin:jsdoc/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"browser": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslintIgnore": [
|
||||||
|
"js/*.min.js",
|
||||||
|
"js/vendor"
|
||||||
|
],
|
||||||
|
"prettier": {
|
||||||
|
"proseWrap": "always",
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "stylelint '**/*.css' && eslint .",
|
||||||
|
"build:js": "cd js && uglifyjs blueimp-helper.js blueimp-gallery.js blueimp-gallery-fullscreen.js blueimp-gallery-indicator.js blueimp-gallery-video.js blueimp-gallery-vimeo.js blueimp-gallery-youtube.js -c -m -o blueimp-gallery.min.js --source-map url=blueimp-gallery.min.js.map",
|
||||||
|
"build:jquery": "cd js && uglifyjs blueimp-gallery.js blueimp-gallery-fullscreen.js blueimp-gallery-indicator.js blueimp-gallery-video.js blueimp-gallery-vimeo.js blueimp-gallery-youtube.js jquery.blueimp-gallery.js -c -m -o jquery.blueimp-gallery.min.js --source-map url=jquery.blueimp-gallery.min.js.map",
|
||||||
|
"build:css": "cd css && cleancss -c ie7 --source-map -o blueimp-gallery.min.css blueimp-gallery.css blueimp-gallery-indicator.css blueimp-gallery-video.css",
|
||||||
|
"build": "npm run build:js && npm run build:jquery && npm run build:css",
|
||||||
|
"preversion": "npm test",
|
||||||
|
"version": "npm run build && git add -A js css",
|
||||||
|
"postversion": "git push --tags origin master master:gh-pages && npm publish"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"css/*.css",
|
||||||
|
"css/*.css.map",
|
||||||
|
"img/*.gif",
|
||||||
|
"img/*.png",
|
||||||
|
"img/*.svg",
|
||||||
|
"js/*.js",
|
||||||
|
"js/*.js.map"
|
||||||
|
],
|
||||||
|
"main": "js/blueimp-gallery.js"
|
||||||
|
}
|
||||||
44
foto_gallery/templates/gallery.html
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{# -*-jinja2-*- #}
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
{% block content %}
|
||||||
|
<h1>{{post.title}}</h1>
|
||||||
|
{{post.html | safe}}
|
||||||
|
{% if post.links.images |length > 0 %}
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- The Gallery as lightbox dialog, should be a document body child element -->
|
||||||
|
<div id="blueimp-gallery" class="blueimp-gallery">
|
||||||
|
<div class="slides"></div>
|
||||||
|
<h3 class="title"></h3>
|
||||||
|
<a class="prev">‹</a>
|
||||||
|
<a class="next">›</a>
|
||||||
|
<a class="close">×</a>
|
||||||
|
<a class="play-pause"></a>
|
||||||
|
<ol class="indicator"></ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="links">
|
||||||
|
{% for d in post.links.images %}
|
||||||
|
<a href="{{d.url}}" title="{{d.title}}">
|
||||||
|
<img src="{{d.thumb_url}}" alt="{{d.title}}" />
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<script src="/gallery/js/blueimp-gallery.min.js"></script>
|
||||||
|
<script>
|
||||||
|
document.getElementById('links').onclick = function(event) {
|
||||||
|
event = event || window.event
|
||||||
|
var target = event.target || event.srcElement,
|
||||||
|
link = target.src ? target.parentNode : target,
|
||||||
|
options = { index: link, event: event },
|
||||||
|
links = this.getElementsByTagName('a')
|
||||||
|
blueimp.Gallery(links, options)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@@ -2,12 +2,13 @@
|
|||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
<LINK href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
<LINK href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||||
|
<link rel="stylesheet" href="/gallery/css/blueimp-gallery.min.css" />
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<nav class="breadcrumb" style="background-color: #FFF">
|
<nav class="breadcrumb" style="background-color: #FFF">
|
||||||
{% for b in post.breadcrumbs %}
|
{% for b in post.links.breadcrumbs %}
|
||||||
<a href="{#url_for('page',name=b.path)#}{{b.url}}" class="breadcrumb-item">{{b.title}} </a>
|
<a href="{#url_for('page',name=b.path)#}{{b.url}}" class="breadcrumb-item">{{b.title}} </a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
<h1>{{post.title}}</h1>
|
<h1>{{post.title}}</h1>
|
||||||
{{post.date}}
|
{{post.date}}
|
||||||
{% if post.sub_index_pages | length > 0 %}
|
{% if post.links.subindexpages | length > 0 %}
|
||||||
<hr/>
|
<hr/>
|
||||||
<b id="up_head"> Unterseiten: </b>
|
<b id="up_head"> Unterseiten: </b>
|
||||||
<ul class="nav flex-column flex-sm-row " labeledby="up_head">
|
<ul class="nav flex-column flex-sm-row " labeledby="up_head">
|
||||||
{% for d in post.sub_index_pages %}
|
{% for d in post.links.subindexpages %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{d.url}}" class="nav-link">
|
<a href="{{d.url}}" class="nav-link">
|
||||||
<h6> {{d.title}} <small class="text-muted">{{d.desc}} </small> </h6>
|
<h6> {{d.title}} <small class="text-muted">{{d.desc}} </small> </h6>
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ post.helloworld() }}
|
|
||||||
{{ post.html|safe }}
|
{{ post.html|safe }}
|
||||||
|
|
||||||
|
|
||||||
{% if post.sub_pages |length > 0 %}
|
{% if post.links["subpages"] |length > 0 %}
|
||||||
<ul class="nav flex-column flex-sm-row" labeledby="inf_head">
|
<ul class="nav flex-column flex-sm-row" labeledby="inf_head">
|
||||||
{% for d in post.sub_pages %}
|
{% for d in post.links.subpages %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{d.url}}" class="nav-link text-info">
|
<a href="{{d.url}}" class="nav-link text-info">
|
||||||
<h6> {{d.title}} <small class="text-muted">{{d.desc}} </small>
|
<h6> {{d.title}} <small class="text-muted">{{d.desc}} </small>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if post.list_files |length > 0 %}
|
{% if post.links.files |length > 0 %}
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
4
install
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
python3 -m venv .env
|
||||||
|
source .env/bin/activate
|
||||||
|
pip3 install -r requirements.txt
|
||||||
@@ -3,4 +3,4 @@ Frozen-Flask
|
|||||||
config
|
config
|
||||||
uwsgi
|
uwsgi
|
||||||
gevent
|
gevent
|
||||||
|
git+https://github.com/andreassteph/flatpages_index.git
|
||||||
|
|||||||
3
run
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source .env/bin/activate
|
||||||
|
uwsgi uwsgi.ini
|
||||||
2
run.py
@@ -1,4 +1,4 @@
|
|||||||
from simple_sample import app,freezer
|
from foto_gallery import app,freezer
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=uWSGI Simple Sample for Flat Page with Index Default
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
#User=www-data
|
|
||||||
#Group=www-data
|
|
||||||
WorkingDirectory=/srv/simple_sample_flat_index
|
|
||||||
Environment="PATH=/srv/simple_sample_flat_index/.env/bin"
|
|
||||||
ExecStart=/srv/simple_sample_flat_index/.env/bin/uwsgi --ini uwsgi.ini
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
"""
|
|
||||||
This module is based on flask_flatpages and creates a website structure based on a file structure.
|
|
||||||
By default the .md extension creates a html website
|
|
||||||
"""
|
|
||||||
import logging
|
|
||||||
import sys
|
|
||||||
from flask import Flask, Blueprint,render_template, send_from_directory,jsonify, url_for
|
|
||||||
#from flask_flatpages import FlatPages, pygments_style_defs
|
|
||||||
from flatpages_index import FlatPagesIndex
|
|
||||||
from flask_frozen import Freezer
|
|
||||||
from config import Config
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
from flatpages_index.utils import path_depth, page_to_link, page_to_link, file_to_link
|
|
||||||
from functools import partial
|
|
||||||
#from .flatpages import FileLists
|
|
||||||
|
|
||||||
# This is the directory, required for absolute file paths
|
|
||||||
package_directory = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
# Loading the config file
|
|
||||||
cfg = Config((os.path.join(package_directory, '../config.cfg')))
|
|
||||||
|
|
||||||
# Loading constants from config file
|
|
||||||
FLATPAGES_AUTO_RELOAD = cfg.get("FLATPAGES_AUTO_RELOAD",True) # Default can be overwritten by config cfg
|
|
||||||
FLATPAGES_EXTENSION = cfg.get("FLATPAGES_EXTENSION",".md") # Default can be overwritten by config cfg
|
|
||||||
FLATPAGES_ROOT = os.path.abspath(cfg.pages_root)
|
|
||||||
|
|
||||||
|
|
||||||
# Initialize application
|
|
||||||
app = Flask(__name__)
|
|
||||||
app.config.from_object(__name__)
|
|
||||||
|
|
||||||
app.logger.setLevel(logging.DEBUG)
|
|
||||||
# Initialize FlatPages Index
|
|
||||||
#FlatPagesIndex.FLATPAGES_ROOT=FLATPAGES_ROOT
|
|
||||||
flatpages = FlatPagesIndex(app)
|
|
||||||
flatpages.get('index')
|
|
||||||
|
|
||||||
app.logger.info('Initialize SimpleSample App')
|
|
||||||
app.logger.info('flatpages loaded %d pages' % len(flatpages._pages))
|
|
||||||
app.logger.info("Data directory is: %s" % flatpages.root)
|
|
||||||
app.logger.info("Url prefix;: %s" % cfg.url_prefix)
|
|
||||||
app.logger.info("Extensions: %s" % FLATPAGES_EXTENSION)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
freezer = Freezer(app)
|
|
||||||
|
|
||||||
|
|
||||||
page_blueprint = Blueprint('intern', __name__)
|
|
||||||
|
|
||||||
@page_blueprint.route('/<path:name>/')
|
|
||||||
@page_blueprint.route('/')
|
|
||||||
def post(name='index'):
|
|
||||||
page = flatpages.get(name)
|
|
||||||
|
|
||||||
if not page is None:
|
|
||||||
page.meta["has_img"]=page.meta.get('has_img',True)
|
|
||||||
page=page.load_linklists(partial(url_for,'intern.post'))
|
|
||||||
return render_template(page.meta["template"], post=page,
|
|
||||||
pth=page.meta["dirpath"])
|
|
||||||
|
|
||||||
if os.path.exists(os.path.join(FLATPAGES_ROOT,name)):
|
|
||||||
return send_from_directory(FLATPAGES_ROOT,name)
|
|
||||||
else:
|
|
||||||
return send_from_directory('static',name)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@page_blueprint.route('/<path:name>.json',strict_slashes=False)
|
|
||||||
def postjson(name='index'):
|
|
||||||
page = flatpages.get(name)
|
|
||||||
if not page is None:
|
|
||||||
page.meta["has_img"]=page.meta.get('has_img',True)
|
|
||||||
|
|
||||||
page=page.load_linklists(partial(url_for,'intern.post'))
|
|
||||||
p=page.meta
|
|
||||||
|
|
||||||
p["html"]=page.html
|
|
||||||
return jsonify(page=p)
|
|
||||||
|
|
||||||
if os.path.exists(u'{}/{}'.format(FLATPAGES_ROOT,path)):
|
|
||||||
return send_from_directory(FLATPAGES_ROOT,path)
|
|
||||||
else:
|
|
||||||
return send_from_directory('static',path)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app.register_blueprint(page_blueprint, url_prefix=cfg.url_prefix,static_folder='static')
|
|
||||||
app.add_url_rule('%s/<path:name>' % cfg.url_prefix,'page', post)
|
|
||||||
13
uwsgi.ini
@@ -6,14 +6,14 @@ master = true
|
|||||||
# No. of processes can be increased
|
# No. of processes can be increased
|
||||||
processes = 7
|
processes = 7
|
||||||
chown-socket =www-data:www-data
|
chown-socket =www-data:www-data
|
||||||
virtualenv = /srv/simple_sample_flat_index/.env
|
virtualenv = /srv/foto_gallery/.env
|
||||||
pythonpath = /srv/simple_sample_flat_index/
|
pythonpath = /srv/foto_gallery/
|
||||||
#pidfile = /srv/simple_sample_flat_index/uwsgi.pid
|
#pidfile = /srv/simple_sample_flat_index/uwsgi.pid
|
||||||
#socket = /srv/simple_sample_flat_index/uwsgi.sock
|
#socket = /srv/simple_sample_flat_index/uwsgi.sock
|
||||||
pidfile=/var/run/simple_sample.pid
|
pidfile=/var/run/foto_gallery.pid
|
||||||
socket = /var/run/simple_sample.sock
|
socket = /var/run/foto_gallery.sock
|
||||||
chmod-socket = 666
|
chmod-socket = 666
|
||||||
module = simple_sample
|
module = foto_gallery
|
||||||
callable= app
|
callable= app
|
||||||
wsgi-file = run.py
|
wsgi-file = run.py
|
||||||
logdate = true
|
logdate = true
|
||||||
@@ -21,4 +21,5 @@ logdate = true
|
|||||||
loglevel = debug
|
loglevel = debug
|
||||||
gevent = 100
|
gevent = 100
|
||||||
vacuum=true
|
vacuum=true
|
||||||
plugins=python3,logfile
|
plugins=python3,logfile
|
||||||
|
py-autoreload=2
|
||||||