publify_core 10.0.4 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +243 -53
- data/app/assets/javascripts/publify.js +0 -1
- data/app/assets/javascripts/publify_admin.js +10 -9
- data/app/assets/stylesheets/accounts.css.scss +0 -2
- data/app/assets/stylesheets/administration_structure.css.scss +0 -4
- data/app/assets/stylesheets/publify.css.scss +0 -1
- data/app/assets/stylesheets/publify_admin.css.scss +0 -2
- data/app/assets/stylesheets/sidebar_admin.css.scss +0 -6
- data/app/controllers/admin/articles_controller.rb +1 -1
- data/app/controllers/admin/base_controller.rb +2 -2
- data/app/controllers/admin/redirects_controller.rb +2 -2
- data/app/controllers/admin/resources_controller.rb +1 -1
- data/app/controllers/admin/seo_controller.rb +2 -2
- data/app/controllers/admin/settings_controller.rb +2 -2
- data/app/controllers/admin/tags_controller.rb +1 -1
- data/app/controllers/admin/users_controller.rb +2 -2
- data/app/controllers/articles_controller.rb +2 -5
- data/app/controllers/authors_controller.rb +0 -2
- data/app/controllers/comments_controller.rb +5 -2
- data/app/controllers/content_controller.rb +0 -4
- data/app/controllers/notes_controller.rb +1 -6
- data/app/controllers/setup_controller.rb +1 -1
- data/app/controllers/tags_controller.rb +0 -1
- data/app/controllers/users/registrations_controller.rb +1 -0
- data/app/helpers/admin/base_helper.rb +20 -13
- data/app/helpers/admin/feedback_helper.rb +4 -4
- data/app/helpers/base_helper.rb +10 -6
- data/app/helpers/xml_helper.rb +4 -0
- data/app/models/article.rb +7 -7
- data/app/models/blog.rb +3 -3
- data/app/models/comment.rb +1 -1
- data/app/models/config_manager.rb +1 -3
- data/app/models/content.rb +4 -5
- data/app/models/content_base.rb +4 -3
- data/app/models/feedback.rb +1 -1
- data/app/models/note.rb +74 -8
- data/app/models/page.rb +1 -1
- data/app/models/redirect.rb +0 -4
- data/app/models/resource.rb +1 -0
- data/app/models/sidebar.rb +6 -14
- data/app/models/tag.rb +2 -2
- data/app/models/text_filter.rb +2 -2
- data/app/models/trigger.rb +1 -1
- data/app/models/user.rb +12 -21
- data/app/uploaders/resource_uploader.rb +1 -0
- data/app/views/admin/articles/_form.html.erb +99 -105
- data/app/views/admin/articles/index.html.erb +15 -23
- data/app/views/admin/dashboard/_comment.html.erb +1 -1
- data/app/views/admin/dashboard/_comments.html.erb +4 -6
- data/app/views/admin/dashboard/_drafts.html.erb +4 -6
- data/app/views/admin/dashboard/_overview.html.erb +2 -5
- data/app/views/admin/dashboard/_welcome.html.erb +19 -19
- data/app/views/admin/dashboard/index.html.erb +3 -3
- data/app/views/admin/feedback/_button.html.erb +7 -13
- data/app/views/admin/feedback/article.html.erb +17 -17
- data/app/views/admin/feedback/edit.html.erb +17 -21
- data/app/views/admin/feedback/index.html.erb +8 -8
- data/app/views/admin/notes/_form.html.erb +5 -5
- data/app/views/admin/notes/_list.html.erb +1 -1
- data/app/views/admin/notes/_note.html.erb +1 -1
- data/app/views/admin/notes/edit.html.erb +1 -1
- data/app/views/admin/notes/index.html.erb +1 -1
- data/app/views/admin/pages/_form.html.erb +23 -27
- data/app/views/admin/post_types/_index_and_form.html.erb +5 -5
- data/app/views/admin/redirects/_index_and_form.html.erb +2 -2
- data/app/views/admin/resources/index.html.erb +20 -8
- data/app/views/admin/seo/_general.html.erb +36 -36
- data/app/views/admin/seo/_permalinks.html.erb +22 -14
- data/app/views/admin/seo/_titles.html.erb +63 -63
- data/app/views/admin/settings/display.html.erb +23 -23
- data/app/views/admin/settings/feedback.html.erb +29 -29
- data/app/views/admin/settings/index.html.erb +21 -21
- data/app/views/admin/settings/write.html.erb +18 -18
- data/app/views/admin/shared/_flash.html.erb +6 -0
- data/app/views/admin/shared/_menu.html.erb +56 -68
- data/app/views/admin/sidebar/_config.html.erb +15 -19
- data/app/views/admin/sidebar/_target.html.erb +3 -3
- data/app/views/admin/sidebar/_target_sidebar.html.erb +14 -13
- data/app/views/admin/sidebar/index.html.erb +2 -2
- data/app/views/admin/tags/_index_and_form.html.erb +3 -3
- data/app/views/admin/themes/index.html.erb +21 -19
- data/app/views/admin/users/_form.html.erb +79 -79
- data/app/views/articles/search.html.erb +1 -1
- data/app/views/layouts/accounts.html.erb +7 -9
- data/app/views/layouts/administration.html.erb +2 -2
- data/app/views/notes/show.html.erb +15 -0
- data/app/views/setup/index.html.erb +1 -1
- data/app/views/shared/_atom_item_article.atom.builder +1 -3
- data/app/views/shared/_rss_item_article.rss.builder +1 -2
- data/config/i18n-tasks.yml +0 -1
- data/config/locales/ar.yml +3 -2
- data/config/locales/da.yml +3 -2
- data/config/locales/de.yml +3 -2
- data/config/locales/en.yml +3 -2
- data/config/locales/es-MX.yml +3 -2
- data/config/locales/fr.yml +3 -2
- data/config/locales/he.yml +3 -2
- data/config/locales/it.yml +3 -2
- data/config/locales/ja.yml +3 -2
- data/config/locales/lt.yml +3 -2
- data/config/locales/nb.yml +3 -2
- data/config/locales/nl.yml +3 -2
- data/config/locales/pl.yml +3 -2
- data/config/locales/pt-BR.yml +3 -2
- data/config/locales/ro.yml +3 -2
- data/config/locales/ru.yml +3 -2
- data/config/locales/zh-CN.yml +3 -2
- data/config/locales/zh-TW.yml +3 -2
- data/config/routes.rb +0 -11
- data/db/migrate/114_fixes_buggy_articles_and_notes.rb +2 -2
- data/db/migrate/20150807134129_simplify_redirect_relations.rb +1 -1
- data/db/migrate/20160605154632_remove_profiles.rb +1 -1
- data/db/migrate/20190208152646_move_text_filter_to_name.rb +2 -2
- data/lib/format.rb +2 -2
- data/lib/publify_core/engine.rb +10 -0
- data/lib/publify_core/string_ext.rb +1 -13
- data/lib/publify_core/text_filter/markdown.rb +5 -1
- data/lib/publify_core/text_filter/markdown_smartquotes.rb +6 -1
- data/lib/publify_core/version.rb +1 -1
- data/lib/publify_core.rb +2 -2
- data/lib/text_filter_plugin.rb +20 -22
- data/lib/theme.rb +56 -37
- metadata +100 -397
- data/app/assets/javascripts/bootstrap/affix.js +0 -164
- data/app/assets/javascripts/bootstrap/alert.js +0 -95
- data/app/assets/javascripts/bootstrap/button.js +0 -125
- data/app/assets/javascripts/bootstrap/collapse.js +0 -212
- data/app/assets/javascripts/bootstrap/dropdown.js +0 -165
- data/app/assets/javascripts/bootstrap/modal.js +0 -358
- data/app/assets/javascripts/bootstrap/tab.js +0 -155
- data/app/assets/javascripts/bootstrap/transition.js +0 -59
- data/app/assets/javascripts/bootstrap-sprockets.js +0 -8
- data/app/assets/javascripts/lightbox.js +0 -350
- data/app/assets/stylesheets/_bootstrap-compass.scss +0 -9
- data/app/assets/stylesheets/_bootstrap-mincer.scss +0 -19
- data/app/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
- data/app/assets/stylesheets/_bootstrap.scss +0 -42
- data/app/assets/stylesheets/bootstrap/_alerts.scss +0 -73
- data/app/assets/stylesheets/bootstrap/_button-groups.scss +0 -242
- data/app/assets/stylesheets/bootstrap/_buttons.scss +0 -168
- data/app/assets/stylesheets/bootstrap/_close.scss +0 -37
- data/app/assets/stylesheets/bootstrap/_code.scss +0 -69
- data/app/assets/stylesheets/bootstrap/_component-animations.scss +0 -38
- data/app/assets/stylesheets/bootstrap/_dropdowns.scss +0 -213
- data/app/assets/stylesheets/bootstrap/_forms.scss +0 -586
- data/app/assets/stylesheets/bootstrap/_grid.scss +0 -94
- data/app/assets/stylesheets/bootstrap/_labels.scss +0 -66
- data/app/assets/stylesheets/bootstrap/_media.scss +0 -66
- data/app/assets/stylesheets/bootstrap/_mixins.scss +0 -37
- data/app/assets/stylesheets/bootstrap/_modals.scss +0 -150
- data/app/assets/stylesheets/bootstrap/_navbar.scss +0 -479
- data/app/assets/stylesheets/bootstrap/_navs.scss +0 -242
- data/app/assets/stylesheets/bootstrap/_normalize.scss +0 -427
- data/app/assets/stylesheets/bootstrap/_pagination.scss +0 -86
- data/app/assets/stylesheets/bootstrap/_panels.scss +0 -222
- data/app/assets/stylesheets/bootstrap/_print.scss +0 -99
- data/app/assets/stylesheets/bootstrap/_scaffolding.scss +0 -160
- data/app/assets/stylesheets/bootstrap/_tables.scss +0 -234
- data/app/assets/stylesheets/bootstrap/_theme.scss +0 -224
- data/app/assets/stylesheets/bootstrap/_type.scss +0 -296
- data/app/assets/stylesheets/bootstrap/_utilities.scss +0 -55
- data/app/assets/stylesheets/bootstrap/_variables.scss +0 -638
- data/app/assets/stylesheets/bootstrap/_wells.scss +0 -29
- data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -15
- data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -12
- data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +0 -18
- data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +0 -56
- data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
- data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +0 -22
- data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +0 -82
- data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +0 -56
- data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -81
- data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +0 -122
- data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
- data/app/assets/stylesheets/bootstrap/mixins/_image.scss +0 -28
- data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
- data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -7
- data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +0 -24
- data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -20
- data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
- data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +0 -6
- data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -17
- data/app/assets/stylesheets/bootstrap/mixins/_size.scss +0 -10
- data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
- data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -28
- data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -12
- data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -8
- data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- data/app/assets/stylesheets/lightbox.css +0 -63
- data/app/controllers/theme_controller.rb +0 -63
- data/app/views/notes/show_in_reply.html.erb +0 -18
- data/app/views/theme/static_view_test.html.erb +0 -1
- data/lib/publify_core/text_filter/twitterfilter.rb +0 -55
- data/lib/tasks/manifest.rake +0 -30
- /data/app/views/layouts/{default.html.erb → application.html.erb} +0 -0
- /data/themes/plain/javascripts/{theme.js → plain/theme.js} +0 -0
- /data/themes/plain/stylesheets/{theme.css → plain/theme.css} +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/* ========================================================================
|
|
2
|
-
* Bootstrap: transition.js v3.4.1
|
|
3
|
-
* https://getbootstrap.com/docs/3.4/javascript/#transitions
|
|
4
|
-
* ========================================================================
|
|
5
|
-
* Copyright 2011-2019 Twitter, Inc.
|
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
7
|
-
* ======================================================================== */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
+function ($) {
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
// CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
|
|
14
|
-
// ============================================================
|
|
15
|
-
|
|
16
|
-
function transitionEnd() {
|
|
17
|
-
var el = document.createElement('bootstrap')
|
|
18
|
-
|
|
19
|
-
var transEndEventNames = {
|
|
20
|
-
WebkitTransition : 'webkitTransitionEnd',
|
|
21
|
-
MozTransition : 'transitionend',
|
|
22
|
-
OTransition : 'oTransitionEnd otransitionend',
|
|
23
|
-
transition : 'transitionend'
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
for (var name in transEndEventNames) {
|
|
27
|
-
if (el.style[name] !== undefined) {
|
|
28
|
-
return { end: transEndEventNames[name] }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return false // explicit for ie8 ( ._.)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// https://blog.alexmaccaw.com/css-transitions
|
|
36
|
-
$.fn.emulateTransitionEnd = function (duration) {
|
|
37
|
-
var called = false
|
|
38
|
-
var $el = this
|
|
39
|
-
$(this).one('bsTransitionEnd', function () { called = true })
|
|
40
|
-
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
|
41
|
-
setTimeout(callback, duration)
|
|
42
|
-
return this
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
$(function () {
|
|
46
|
-
$.support.transition = transitionEnd()
|
|
47
|
-
|
|
48
|
-
if (!$.support.transition) return
|
|
49
|
-
|
|
50
|
-
$.event.special.bsTransitionEnd = {
|
|
51
|
-
bindType: $.support.transition.end,
|
|
52
|
-
delegateType: $.support.transition.end,
|
|
53
|
-
handle: function (e) {
|
|
54
|
-
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
}(jQuery);
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Lightbox for Bootstrap 3 by @ashleydw
|
|
3
|
-
https://github.com/ashleydw/lightbox
|
|
4
|
-
|
|
5
|
-
License: https://github.com/ashleydw/lightbox/blob/master/LICENSE
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
(function() {
|
|
10
|
-
"use strict";
|
|
11
|
-
var $, EkkoLightbox;
|
|
12
|
-
|
|
13
|
-
$ = jQuery;
|
|
14
|
-
|
|
15
|
-
EkkoLightbox = function(element, options) {
|
|
16
|
-
var content, footer, header,
|
|
17
|
-
_this = this;
|
|
18
|
-
this.options = $.extend({
|
|
19
|
-
title: null,
|
|
20
|
-
footer: null,
|
|
21
|
-
remote: null
|
|
22
|
-
}, $.fn.ekkoLightbox.defaults, options || {});
|
|
23
|
-
this.$element = $(element);
|
|
24
|
-
content = '';
|
|
25
|
-
this.modal_id = this.options.modal_id ? this.options.modal_id : 'ekkoLightbox-' + Math.floor((Math.random() * 1000) + 1);
|
|
26
|
-
header = '<div class="modal-header"' + (this.options.title || this.options.always_show_close ? '' : ' style="display:none"') + '><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">' + (this.options.title || " ") + '</h4></div>';
|
|
27
|
-
footer = '<div class="modal-footer"' + (this.options.footer ? '' : ' style="display:none"') + '>' + this.options.footer + '</div>';
|
|
28
|
-
$(document.body).append('<div id="' + this.modal_id + '" class="ekko-lightbox modal fade" tabindex="-1"><div class="modal-dialog"><div class="modal-content">' + header + '<div class="modal-body"><div class="ekko-lightbox-container"><div></div></div></div>' + footer + '</div></div></div>');
|
|
29
|
-
this.modal = $('#' + this.modal_id);
|
|
30
|
-
this.modal_dialog = this.modal.find('.modal-dialog').first();
|
|
31
|
-
this.modal_content = this.modal.find('.modal-content').first();
|
|
32
|
-
this.modal_body = this.modal.find('.modal-body').first();
|
|
33
|
-
this.lightbox_container = this.modal_body.find('.ekko-lightbox-container').first();
|
|
34
|
-
this.lightbox_body = this.lightbox_container.find('> div:first-child').first();
|
|
35
|
-
this.showLoading();
|
|
36
|
-
this.modal_arrows = null;
|
|
37
|
-
this.border = {
|
|
38
|
-
top: parseFloat(this.modal_dialog.css('border-top-width')) + parseFloat(this.modal_content.css('border-top-width')) + parseFloat(this.modal_body.css('border-top-width')),
|
|
39
|
-
right: parseFloat(this.modal_dialog.css('border-right-width')) + parseFloat(this.modal_content.css('border-right-width')) + parseFloat(this.modal_body.css('border-right-width')),
|
|
40
|
-
bottom: parseFloat(this.modal_dialog.css('border-bottom-width')) + parseFloat(this.modal_content.css('border-bottom-width')) + parseFloat(this.modal_body.css('border-bottom-width')),
|
|
41
|
-
left: parseFloat(this.modal_dialog.css('border-left-width')) + parseFloat(this.modal_content.css('border-left-width')) + parseFloat(this.modal_body.css('border-left-width'))
|
|
42
|
-
};
|
|
43
|
-
this.padding = {
|
|
44
|
-
top: parseFloat(this.modal_dialog.css('padding-top')) + parseFloat(this.modal_content.css('padding-top')) + parseFloat(this.modal_body.css('padding-top')),
|
|
45
|
-
right: parseFloat(this.modal_dialog.css('padding-right')) + parseFloat(this.modal_content.css('padding-right')) + parseFloat(this.modal_body.css('padding-right')),
|
|
46
|
-
bottom: parseFloat(this.modal_dialog.css('padding-bottom')) + parseFloat(this.modal_content.css('padding-bottom')) + parseFloat(this.modal_body.css('padding-bottom')),
|
|
47
|
-
left: parseFloat(this.modal_dialog.css('padding-left')) + parseFloat(this.modal_content.css('padding-left')) + parseFloat(this.modal_body.css('padding-left'))
|
|
48
|
-
};
|
|
49
|
-
this.modal.on('show.bs.modal', this.options.onShow.bind(this)).on('shown.bs.modal', function() {
|
|
50
|
-
_this.modal_shown();
|
|
51
|
-
return _this.options.onShown.call(_this);
|
|
52
|
-
}).on('hide.bs.modal', this.options.onHide.bind(this)).on('hidden.bs.modal', function() {
|
|
53
|
-
if (_this.gallery) {
|
|
54
|
-
$(document).off('keydown.ekkoLightbox');
|
|
55
|
-
}
|
|
56
|
-
_this.modal.remove();
|
|
57
|
-
return _this.options.onHidden.call(_this);
|
|
58
|
-
}).modal('show', options);
|
|
59
|
-
return this.modal;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
EkkoLightbox.prototype = {
|
|
63
|
-
modal_shown: function() {
|
|
64
|
-
var video_id,
|
|
65
|
-
_this = this;
|
|
66
|
-
if (!this.options.remote) {
|
|
67
|
-
return this.error('No remote target given');
|
|
68
|
-
} else {
|
|
69
|
-
this.gallery = this.$element.data('gallery');
|
|
70
|
-
if (this.gallery) {
|
|
71
|
-
if (this.options.gallery_parent_selector === 'document.body' || this.options.gallery_parent_selector === '') {
|
|
72
|
-
this.gallery_items = $(document.body).find('*[data-toggle="lightbox"][data-gallery="' + this.gallery + '"]');
|
|
73
|
-
} else {
|
|
74
|
-
this.gallery_items = this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-toggle="lightbox"][data-gallery="' + this.gallery + '"]');
|
|
75
|
-
}
|
|
76
|
-
this.gallery_index = this.gallery_items.index(this.$element);
|
|
77
|
-
$(document).on('keydown.ekkoLightbox', this.navigate.bind(this));
|
|
78
|
-
if (this.options.directional_arrows && this.gallery_items.length > 1) {
|
|
79
|
-
this.lightbox_container.prepend('<div class="ekko-lightbox-nav-overlay"><a href="#" class="' + this.strip_stops(this.options.left_arrow_class) + '">❮</a><a href="#" class="' + this.strip_stops(this.options.right_arrow_class) + '">❯</a></div>');
|
|
80
|
-
this.modal_arrows = this.lightbox_container.find('div.ekko-lightbox-nav-overlay').first();
|
|
81
|
-
this.lightbox_container.find('a' + this.strip_spaces(this.options.left_arrow_class)).on('click', function(event) {
|
|
82
|
-
event.preventDefault();
|
|
83
|
-
return _this.navigate_left();
|
|
84
|
-
});
|
|
85
|
-
this.lightbox_container.find('a' + this.strip_spaces(this.options.right_arrow_class)).on('click', function(event) {
|
|
86
|
-
event.preventDefault();
|
|
87
|
-
return _this.navigate_right();
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (this.options.type) {
|
|
92
|
-
if (this.options.type === 'image') {
|
|
93
|
-
return this.preloadImage(this.options.remote, true);
|
|
94
|
-
} else if (this.options.type === 'youtube' && (video_id = this.getYoutubeId(this.options.remote))) {
|
|
95
|
-
return this.showYoutubeVideo(video_id);
|
|
96
|
-
} else if (this.options.type === 'vimeo') {
|
|
97
|
-
return this.showVimeoVideo(this.options.remote);
|
|
98
|
-
} else if (this.options.type === 'instagram') {
|
|
99
|
-
return this.showInstagramVideo(this.options.remote);
|
|
100
|
-
} else {
|
|
101
|
-
return this.error("Could not detect remote target type. Force the type using data-type=\"image|youtube|vimeo\"");
|
|
102
|
-
}
|
|
103
|
-
} else {
|
|
104
|
-
return this.detectRemoteType(this.options.remote);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
strip_stops: function(str) {
|
|
109
|
-
return str.replace(/\./g, '');
|
|
110
|
-
},
|
|
111
|
-
strip_spaces: function(str) {
|
|
112
|
-
return str.replace(/\s/g, '');
|
|
113
|
-
},
|
|
114
|
-
isImage: function(str) {
|
|
115
|
-
return str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
|
|
116
|
-
},
|
|
117
|
-
isSwf: function(str) {
|
|
118
|
-
return str.match(/\.(swf)((\?|#).*)?$/i);
|
|
119
|
-
},
|
|
120
|
-
getYoutubeId: function(str) {
|
|
121
|
-
var match;
|
|
122
|
-
match = str.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
|
|
123
|
-
if (match && match[2].length === 11) {
|
|
124
|
-
return match[2];
|
|
125
|
-
} else {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
getVimeoId: function(str) {
|
|
130
|
-
if (str.indexOf('vimeo') > 0) {
|
|
131
|
-
return str;
|
|
132
|
-
} else {
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
getInstagramId: function(str) {
|
|
137
|
-
if (str.indexOf('instagram') > 0) {
|
|
138
|
-
return str;
|
|
139
|
-
} else {
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
navigate: function(event) {
|
|
144
|
-
event = event || window.event;
|
|
145
|
-
if (event.keyCode === 39 || event.keyCode === 37) {
|
|
146
|
-
if (event.keyCode === 39) {
|
|
147
|
-
return this.navigate_right();
|
|
148
|
-
} else if (event.keyCode === 37) {
|
|
149
|
-
return this.navigate_left();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
navigate_left: function() {
|
|
154
|
-
var src;
|
|
155
|
-
this.showLoading();
|
|
156
|
-
if (this.gallery_items.length === 1) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (this.gallery_index === 0) {
|
|
160
|
-
this.gallery_index = this.gallery_items.length - 1;
|
|
161
|
-
} else {
|
|
162
|
-
this.gallery_index--;
|
|
163
|
-
}
|
|
164
|
-
this.$element = $(this.gallery_items.get(this.gallery_index));
|
|
165
|
-
this.updateTitleAndFooter();
|
|
166
|
-
src = this.$element.attr('data-remote') || this.$element.attr('href');
|
|
167
|
-
return this.detectRemoteType(src, this.$element.attr('data-type'));
|
|
168
|
-
},
|
|
169
|
-
navigate_right: function() {
|
|
170
|
-
var next, src;
|
|
171
|
-
this.showLoading();
|
|
172
|
-
if (this.gallery_items.length === 1) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
if (this.gallery_index === this.gallery_items.length - 1) {
|
|
176
|
-
this.gallery_index = 0;
|
|
177
|
-
} else {
|
|
178
|
-
this.gallery_index++;
|
|
179
|
-
}
|
|
180
|
-
this.$element = $(this.gallery_items.get(this.gallery_index));
|
|
181
|
-
src = this.$element.attr('data-remote') || this.$element.attr('href');
|
|
182
|
-
this.updateTitleAndFooter();
|
|
183
|
-
this.detectRemoteType(src, this.$element.attr('data-type'));
|
|
184
|
-
if (this.gallery_index + 1 < this.gallery_items.length) {
|
|
185
|
-
next = $(this.gallery_items.get(this.gallery_index + 1), false);
|
|
186
|
-
src = next.attr('data-remote') || next.attr('href');
|
|
187
|
-
if (next.attr('data-type') === 'image' || this.isImage(src)) {
|
|
188
|
-
return this.preloadImage(src, false);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
detectRemoteType: function(src, type) {
|
|
193
|
-
var video_id;
|
|
194
|
-
if (type === 'image' || this.isImage(src)) {
|
|
195
|
-
this.options.type = 'image';
|
|
196
|
-
return this.preloadImage(src, true);
|
|
197
|
-
} else if (type === 'youtube' || (video_id = this.getYoutubeId(src))) {
|
|
198
|
-
this.options.type = 'youtube';
|
|
199
|
-
return this.showYoutubeVideo(video_id);
|
|
200
|
-
} else if (type === 'vimeo' || (video_id = this.getVimeoId(src))) {
|
|
201
|
-
this.options.type = 'vimeo';
|
|
202
|
-
return this.showVimeoVideo(video_id);
|
|
203
|
-
} else if (type === 'instagram' || (video_id = this.getInstagramId(src))) {
|
|
204
|
-
this.options.type = 'instagram';
|
|
205
|
-
return this.showInstagramVideo(video_id);
|
|
206
|
-
} else {
|
|
207
|
-
return this.error("Could not detect remote target type. Force the type using data-type=\"image|youtube|vimeo\"");
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
updateTitleAndFooter: function() {
|
|
211
|
-
var caption, footer, header, title;
|
|
212
|
-
header = this.modal_content.find('.modal-header');
|
|
213
|
-
footer = this.modal_content.find('.modal-footer');
|
|
214
|
-
title = this.$element.data('title') || "";
|
|
215
|
-
caption = this.$element.data('footer') || "";
|
|
216
|
-
if (title || this.options.always_show_close) {
|
|
217
|
-
header.css('display', '').find('.modal-title').html(title || " ");
|
|
218
|
-
} else {
|
|
219
|
-
header.css('display', 'none');
|
|
220
|
-
}
|
|
221
|
-
if (caption) {
|
|
222
|
-
footer.css('display', '').html(caption);
|
|
223
|
-
} else {
|
|
224
|
-
footer.css('display', 'none');
|
|
225
|
-
}
|
|
226
|
-
return this;
|
|
227
|
-
},
|
|
228
|
-
showLoading: function() {
|
|
229
|
-
this.lightbox_body.html('<div class="modal-loading">Loading..</div>');
|
|
230
|
-
return this;
|
|
231
|
-
},
|
|
232
|
-
showYoutubeVideo: function(id) {
|
|
233
|
-
var aspectRatio, height, width;
|
|
234
|
-
aspectRatio = 560 / 315;
|
|
235
|
-
width = this.$element.data('width') || 560;
|
|
236
|
-
width = this.checkDimensions(width);
|
|
237
|
-
height = width / aspectRatio;
|
|
238
|
-
this.resize(width);
|
|
239
|
-
this.lightbox_body.html('<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1" frameborder="0" allowfullscreen></iframe>');
|
|
240
|
-
if (this.modal_arrows) {
|
|
241
|
-
return this.modal_arrows.css('display', 'none');
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
showVimeoVideo: function(id) {
|
|
245
|
-
var aspectRatio, height, width;
|
|
246
|
-
aspectRatio = 500 / 281;
|
|
247
|
-
width = this.$element.data('width') || 560;
|
|
248
|
-
width = this.checkDimensions(width);
|
|
249
|
-
height = width / aspectRatio;
|
|
250
|
-
this.resize(width);
|
|
251
|
-
this.lightbox_body.html('<iframe width="' + width + '" height="' + height + '" src="' + id + '?autoplay=1" frameborder="0" allowfullscreen></iframe>');
|
|
252
|
-
if (this.modal_arrows) {
|
|
253
|
-
return this.modal_arrows.css('display', 'none');
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
showInstagramVideo: function(id) {
|
|
257
|
-
var height, width;
|
|
258
|
-
width = this.$element.data('width') || 612;
|
|
259
|
-
width = this.checkDimensions(width);
|
|
260
|
-
height = width;
|
|
261
|
-
this.resize(width);
|
|
262
|
-
this.lightbox_body.html('<iframe width="' + width + '" height="' + height + '" src="' + this.addTrailingSlash(id) + 'embed/" frameborder="0" allowfullscreen></iframe>');
|
|
263
|
-
if (this.modal_arrows) {
|
|
264
|
-
return this.modal_arrows.css('display', 'none');
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
error: function(message) {
|
|
268
|
-
this.lightbox_body.html(message);
|
|
269
|
-
return this;
|
|
270
|
-
},
|
|
271
|
-
preloadImage: function(src, onLoadShowImage) {
|
|
272
|
-
var img,
|
|
273
|
-
_this = this;
|
|
274
|
-
img = new Image();
|
|
275
|
-
if ((onLoadShowImage == null) || onLoadShowImage === true) {
|
|
276
|
-
img.onload = function() {
|
|
277
|
-
var image;
|
|
278
|
-
image = $('<img />');
|
|
279
|
-
image.attr('src', img.src);
|
|
280
|
-
image.addClass('img-responsive');
|
|
281
|
-
_this.lightbox_body.html(image);
|
|
282
|
-
if (_this.modal_arrows) {
|
|
283
|
-
_this.modal_arrows.css('display', 'block');
|
|
284
|
-
}
|
|
285
|
-
return _this.resize(img.width);
|
|
286
|
-
};
|
|
287
|
-
img.onerror = function() {
|
|
288
|
-
return _this.error('Failed to load image: ' + src);
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
img.src = src;
|
|
292
|
-
return img;
|
|
293
|
-
},
|
|
294
|
-
resize: function(width) {
|
|
295
|
-
var width_total;
|
|
296
|
-
width_total = width + this.border.left + this.padding.left + this.padding.right + this.border.right;
|
|
297
|
-
this.modal_dialog.css('width', 'auto').css('max-width', width_total);
|
|
298
|
-
this.lightbox_container.find('a').css('padding-top', function() {
|
|
299
|
-
return $(this).parent().height() / 2;
|
|
300
|
-
});
|
|
301
|
-
return this;
|
|
302
|
-
},
|
|
303
|
-
checkDimensions: function(width) {
|
|
304
|
-
var body_width, width_total;
|
|
305
|
-
width_total = width + this.border.left + this.padding.left + this.padding.right + this.border.right;
|
|
306
|
-
body_width = document.body.clientWidth;
|
|
307
|
-
if (width_total > body_width) {
|
|
308
|
-
width = this.modal_body.width();
|
|
309
|
-
}
|
|
310
|
-
return width;
|
|
311
|
-
},
|
|
312
|
-
close: function() {
|
|
313
|
-
return this.modal.modal('hide');
|
|
314
|
-
},
|
|
315
|
-
addTrailingSlash: function(url) {
|
|
316
|
-
if (url.substr(-1) !== '/') {
|
|
317
|
-
url += '/';
|
|
318
|
-
}
|
|
319
|
-
return url;
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
$.fn.ekkoLightbox = function(options) {
|
|
324
|
-
return this.each(function() {
|
|
325
|
-
var $this;
|
|
326
|
-
$this = $(this);
|
|
327
|
-
options = $.extend({
|
|
328
|
-
remote: $this.attr('data-remote') || $this.attr('href'),
|
|
329
|
-
gallery_parent_selector: $this.attr('data-parent'),
|
|
330
|
-
type: $this.attr('data-type')
|
|
331
|
-
}, options, $this.data());
|
|
332
|
-
new EkkoLightbox(this, options);
|
|
333
|
-
return this;
|
|
334
|
-
});
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
$.fn.ekkoLightbox.defaults = {
|
|
338
|
-
gallery_parent_selector: '*:not(.row)',
|
|
339
|
-
left_arrow_class: '.chevron-left',
|
|
340
|
-
right_arrow_class: '.chevron-right',
|
|
341
|
-
directional_arrows: true,
|
|
342
|
-
type: null,
|
|
343
|
-
always_show_close: true,
|
|
344
|
-
onShow: function() {},
|
|
345
|
-
onShown: function() {},
|
|
346
|
-
onHide: function() {},
|
|
347
|
-
onHidden: function() {}
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
}).call(this);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Mincer asset helper functions
|
|
2
|
-
//
|
|
3
|
-
// This must be imported into a .css.ejs.scss file.
|
|
4
|
-
// Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@function twbs-font-path($path) {
|
|
8
|
-
// do something like following
|
|
9
|
-
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
|
|
10
|
-
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
|
|
11
|
-
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
|
|
12
|
-
@return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@function twbs-image-path($file) {
|
|
16
|
-
@return "<%- asset_path("#{$file}") %>";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
$bootstrap-sass-asset-helper: true;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Bootstrap v3.4.1 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2019 Twitter, Inc.
|
|
4
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Core variables and mixins
|
|
8
|
-
@import "bootstrap/variables";
|
|
9
|
-
@import "bootstrap/mixins";
|
|
10
|
-
|
|
11
|
-
// Reset and dependencies
|
|
12
|
-
@import "bootstrap/normalize";
|
|
13
|
-
@import "bootstrap/print";
|
|
14
|
-
|
|
15
|
-
// Core CSS
|
|
16
|
-
@import "bootstrap/scaffolding";
|
|
17
|
-
@import "bootstrap/type";
|
|
18
|
-
@import "bootstrap/code";
|
|
19
|
-
@import "bootstrap/grid";
|
|
20
|
-
@import "bootstrap/tables";
|
|
21
|
-
@import "bootstrap/forms";
|
|
22
|
-
@import "bootstrap/buttons";
|
|
23
|
-
|
|
24
|
-
// Components
|
|
25
|
-
@import "bootstrap/component-animations";
|
|
26
|
-
@import "bootstrap/dropdowns";
|
|
27
|
-
@import "bootstrap/button-groups";
|
|
28
|
-
@import "bootstrap/navs";
|
|
29
|
-
@import "bootstrap/navbar";
|
|
30
|
-
@import "bootstrap/pagination";
|
|
31
|
-
@import "bootstrap/labels";
|
|
32
|
-
@import "bootstrap/alerts";
|
|
33
|
-
@import "bootstrap/media";
|
|
34
|
-
@import "bootstrap/panels";
|
|
35
|
-
@import "bootstrap/wells";
|
|
36
|
-
@import "bootstrap/close";
|
|
37
|
-
|
|
38
|
-
// Components w/ JavaScript
|
|
39
|
-
@import "bootstrap/modals";
|
|
40
|
-
|
|
41
|
-
// Utility classes
|
|
42
|
-
@import "bootstrap/utilities";
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Alerts
|
|
3
|
-
// --------------------------------------------------
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// Base styles
|
|
7
|
-
// -------------------------
|
|
8
|
-
|
|
9
|
-
.alert {
|
|
10
|
-
padding: $alert-padding;
|
|
11
|
-
margin-bottom: $line-height-computed;
|
|
12
|
-
border: 1px solid transparent;
|
|
13
|
-
border-radius: $alert-border-radius;
|
|
14
|
-
|
|
15
|
-
// Headings for larger alerts
|
|
16
|
-
h4 {
|
|
17
|
-
margin-top: 0;
|
|
18
|
-
color: inherit; // Specified for the h4 to prevent conflicts of changing $headings-color
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Provide class for links that match alerts
|
|
22
|
-
.alert-link {
|
|
23
|
-
font-weight: $alert-link-font-weight;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Improve alignment and spacing of inner content
|
|
27
|
-
> p,
|
|
28
|
-
> ul {
|
|
29
|
-
margin-bottom: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
> p + p {
|
|
33
|
-
margin-top: 5px;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Dismissible alerts
|
|
38
|
-
//
|
|
39
|
-
// Expand the right padding and account for the close button's positioning.
|
|
40
|
-
|
|
41
|
-
// The misspelled .alert-dismissable was deprecated in 3.2.0.
|
|
42
|
-
.alert-dismissable,
|
|
43
|
-
.alert-dismissible {
|
|
44
|
-
padding-right: ($alert-padding + 20);
|
|
45
|
-
|
|
46
|
-
// Adjust close link position
|
|
47
|
-
.close {
|
|
48
|
-
position: relative;
|
|
49
|
-
top: -2px;
|
|
50
|
-
right: -21px;
|
|
51
|
-
color: inherit;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Alternate styles
|
|
56
|
-
//
|
|
57
|
-
// Generate contextual modifier classes for colorizing the alert.
|
|
58
|
-
|
|
59
|
-
.alert-success {
|
|
60
|
-
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.alert-info {
|
|
64
|
-
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.alert-warning {
|
|
68
|
-
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.alert-danger {
|
|
72
|
-
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
|
|
73
|
-
}
|