diff --git a/Gruntfile.js b/Gruntfile.js
index fc3064f1..27c6fcd3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,6 +1,8 @@
module.exports = function (grunt) {
"use strict";
+ var assets = require('postcss-assets');
+
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
@@ -11,8 +13,6 @@ module.exports = function (grunt) {
' *\n' +
' * Copyright (c) 2010 - <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
' * Licensed under the <%= pkg.license %> License.\n' +
- ' * https://raw.github.com/worseisbetter/galleria/master/LICENSE\n' +
- ' *\n' +
' */\n\n',
clean: {
@@ -28,28 +28,24 @@ module.exports = function (grunt) {
'dist/<%= pkg.name %>.min.js': ['src/<%= pkg.name %>.js'],
'dist/plugins/flickr/<%= pkg.name %>.flickr.min.js': ['src/plugins/flickr/<%= pkg.name %>.flickr.js'],
'dist/plugins/history/<%= pkg.name %>.history.min.js': ['src/plugins/history/<%= pkg.name %>.history.js'],
- 'dist/themes/classic/<%= pkg.name %>.classic.min.js': ['src/themes/classic/<%= pkg.name %>.classic.js'],
- 'dist/themes/fullscreen/<%= pkg.name %>.fullscreen.min.js': ['src/themes/fullscreen/<%= pkg.name %>.fullscreen.js']
- }
- }
- },
-
- cssmin: {
- dist: {
- files: {
- 'dist/themes/classic/<%= pkg.name %>.classic.min.css': ['src/themes/classic/<%= pkg.name %>.classic.css'],
- 'dist/themes/fullscreen/<%= pkg.name %>.fullscreen.min.css': ['src/themes/fullscreen/<%= pkg.name %>.fullscreen.css']
}
}
},
replace: {
dist: {
- src: ['src/themes/*/demo-cdn.html', 'README.rst'],
- overwrite: true,
- replacements: [{
- from: /\/libs\/galleria\/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\//g,
- to: '\/libs/galleria/<%= pkg.version %>/'
+ options: {
+ patterns: [
+ {
+ match: /\/libs\/galleria\/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\//g,
+ replacement: '\/libs/galleria/<%= pkg.version %>/'
+ }
+ ],
+ usePrefix: false,
+ },
+ files: [{
+ expand: true,
+ src: ['src/themes/*/demo-cdn.html', 'README.rst']
}]
}
},
@@ -59,7 +55,7 @@ module.exports = function (grunt) {
files: [{
expand: true,
cwd: 'src/',
- src: ['**/*'],
+ src: ['**/*.html', '**/*.js'],
dest: 'dist'
}]
}
@@ -67,13 +63,70 @@ module.exports = function (grunt) {
});
- grunt.loadNpmTasks('grunt-text-replace');
+ var themes = ['azur', 'folio', 'fullscreen', 'miniml', 'twelve', 'classic'];
+ themes.forEach(function(name) {
+
+ grunt.config(['uglify', name], {
+ options: {
+ banner: '<%= banner %>'
+ },
+
+ files: [{
+ src: 'src/themes/' + name + '/galleria.' + name + '.js',
+ dest: 'dist/themes/' + name + '/galleria.' + name + '.min.js'
+ }]
+ });
+
+ grunt.config(['postcss', name], {
+ options: {
+ processors: [
+ assets()
+ ]
+ },
+ files: [{
+ src: 'src/themes/' + name + '/galleria-inline.' + name + '.css',
+ dest: 'dist/themes/' + name + '/galleria.' + name + '.css'
+ }]
+ });
+
+ grunt.config(['cssmin', name], {
+ files: [{
+ src: 'dist/themes/' + name + '/galleria.' + name + '.css',
+ dest: 'dist/themes/' + name + '/galleria.' + name + '.min.css'
+ }]
+ });
+
+ });
+
+ grunt.config(['replace', 'inline'], {
+ options: {
+ patterns: [
+ {
+ match: 'url(',
+ replacement: 'inline('
+ }
+ ],
+ usePrefix: false,
+ },
+ files: [{
+ expand: true,
+ cwd: 'src/',
+ src: ['themes/*/galleria.*.css'],
+ dest: 'src/',
+ rename: function(destBase, destPath) {
+ return destBase+destPath.replace('galleria.', 'galleria-inline.');
+ }
+ }]
+ });
+
+ grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-postcss');
// Default task(s).
- grunt.registerTask('default', ['clean', 'uglify', 'cssmin', 'replace', 'copy']);
+ grunt.registerTask('default', ['clean', 'replace', 'uglify', 'postcss', 'cssmin', 'copy']);
};
diff --git a/README.rst b/README.rst
index 132410ec..aedf60af 100644
--- a/README.rst
+++ b/README.rst
@@ -12,13 +12,13 @@ Info, demos, docs and everything else: https://galleria.io
Documentation
=============
-https://docs.galleria.io
+https://galleria.io/docs
FAQ
=============
-https://docs.galleria.io/references/faq.html
+https://galleria.io/docs/references/faq.html
Installation
@@ -46,6 +46,6 @@ CDN
---
::
-
+
https://cdnjs.com/libraries/galleria
diff --git a/dist/galleria.js b/dist/galleria.js
index 024be3f3..f9e4602e 100644
--- a/dist/galleria.js
+++ b/dist/galleria.js
@@ -1,10 +1,8 @@
/**
- * Galleria v1.6.0 2019-10-13
- * http://galleria.io
+ * Galleria v1.6.1
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT license
- * https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
@@ -40,7 +38,7 @@ var doc = window.document,
protoArray = Array.prototype,
// internal constants
- VERSION = 1.60,
+ VERSION = 1.61,
DEBUG = true,
TIMEOUT = 30000,
DUMMY = false,
@@ -904,7 +902,7 @@ var doc = window.document,
// If failed, tell the dev to download the latest theme
Galleria.raise( 'Theme CSS could not load after 20 sec. ' + ( Galleria.QUIRK ?
'Your browser is in Quirks Mode, please add a correct doctype.' :
- 'Please download the latest theme at http://galleria.io/customer/.' ), true );
+ 'Please download the latest theme.' ), true );
},
timeout: 5000
});
diff --git a/dist/galleria.min.js b/dist/galleria.min.js
index 6fd62a36..dd3c6f18 100644
--- a/dist/galleria.min.js
+++ b/dist/galleria.min.js
@@ -1,14 +1,12 @@
/**
- * Galleria - v1.6.0 2019-10-14
- * https://galleria.io
+ * Galleria - v1.6.1 2019-10-17
+ *
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT License.
- * https://raw.github.com/worseisbetter/galleria/master/LICENSE
- *
*/
-!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&module.exports?module.exports=b(a,require("jquery")):a.Galleria=b(a,a.jQuery)}(window,function(a,b,c,d){var e=a.document,f=b(e),g=b(a),h=b,i=Array.prototype,j=!0,k=3e4,l=!1,m=navigator.userAgent.toLowerCase(),n=a.location.hash.replace(/#\//,""),o="file:"==a.location.protocol?"http:":a.location.protocol,p=Math,q=function(){},r=function(){return!1},s=!(a.screen.width>1279&&1==a.devicePixelRatio||a.screen.width>1e3&&a.innerWidth<.9*a.screen.width),t=function(){var a=3,b=e.createElement("div"),c=b.getElementsByTagName("i");do{b.innerHTML="\x3c!--[if gt IE "+ ++a+"]>4?a:e.documentMode||d}(),u=function(){return{html:e.documentElement,body:e.body,head:e.getElementsByTagName("head")[0],title:e.title}},v=a.parent!==a.self,w="data ready thumbnail loadstart loadfinish image play pause progress fullscreen_enter fullscreen_exit idle_enter idle_exit rescale lightbox_open lightbox_close lightbox_image",x=function(){var a=[];return b.each(w.split(" "),function(b,c){a.push(c),/_/.test(c)&&a.push(c.replace(/_/g,""))}),a}(),y=function(a){var c;return"object"!=typeof a?a:(b.each(a,function(d,e){/^[a-z]+_/.test(d)&&(c="",b.each(d.split("_"),function(a,b){c+=a>0?b.substr(0,1).toUpperCase()+b.substr(1):b}),a[c]=e,delete a[d])}),a)},z=function(a){return b.inArray(a,x)>-1?c[a.toUpperCase()]:a},A={youtube:{reg:/https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&(?:amp;)?)*v(?:<[A-Z]+>)?=([0-9a-zA-Z\-\_]+))/i,embed:function(){return o+"//www.youtube.com/embed/"+this.id},get_thumb:function(a){return o+"//img.youtube.com/vi/"+this.id+"/default.jpg"},get_image:function(a){return o+"//img.youtube.com/vi/"+this.id+"/maxresdefault.jpg"}},vimeo:{reg:/https?:\/\/(?:www\.)?(vimeo\.com)\/(?:hd#)?([0-9]+)/i,embed:function(){return o+"//player.vimeo.com/video/"+this.id},getUrl:function(){return o+"//vimeo.com/api/v2/video/"+this.id+".json?callback=?"},get_thumb:function(a){return a[0].thumbnail_medium},get_image:function(a){return a[0].thumbnail_large}},dailymotion:{reg:/https?:\/\/(?:www\.)?(dailymotion\.com)\/video\/([^_]+)/,embed:function(){return o+"//www.dailymotion.com/embed/video/"+this.id},getUrl:function(){return"https://api.dailymotion.com/video/"+this.id+"?fields=thumbnail_240_url,thumbnail_720_url&callback=?"},get_thumb:function(a){return a.thumbnail_240_url},get_image:function(a){return a.thumbnail_720_url}},_inst:[]},B=function(c,d){for(var e=0;e=h+d.timeout?(d.error(),!1):void c._waiters.push(g=a.setTimeout(i,10))};c._waiters.push(g=a.setTimeout(i,10))},toggleQuality:function(a,b){7!==t&&8!==t||!a||"IMG"!=a.nodeName.toUpperCase()||(void 0===b&&(b="nearest-neighbor"===a.style.msInterpolationMode),a.style.msInterpolationMode=b?"bicubic":"nearest-neighbor")},insertStyleTag:function(a,c){if(!c||!b("#"+c).length){var d=e.createElement("style");if(c&&(d.id=c),u().head.appendChild(d),d.styleSheet)d.styleSheet.cssText=a;else{var f=e.createTextNode(a);d.appendChild(f)}}},loadScript:function(a,c){var d=!1,e=b(" -->
+
+
+
+
+
+