refinerycms-core 4.0.3 → 4.1.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/app/assets/config/refinery_core_manifest.js +9 -1
- data/app/assets/images/refinery/logo-large.png +0 -0
- data/app/assets/images/refinery/logo-medium.png +0 -0
- data/app/assets/images/refinery/logo-site-bar.png +0 -0
- data/app/assets/images/refinery/logo-small-medium.png +0 -0
- data/app/assets/images/refinery/logo-small.png +0 -0
- data/app/assets/images/refinery/logo-tiny.png +0 -0
- data/app/assets/images/refinery/logo.png +0 -0
- data/app/assets/images/refinery/refinery-cms-logo.svg +1 -558
- data/app/assets/javascripts/refinery/admin.js.erb +37 -21
- data/app/assets/javascripts/refinery/ajaxy_pagination.js +16 -0
- data/app/assets/javascripts/refinery/image_crop.js +101 -0
- data/app/assets/javascripts/refinery/interface.js.erb +42 -0
- data/app/assets/javascripts/refinery/refinery.js.erb +3 -3
- data/app/assets/javascripts/refinery/submit_continue.js.erb +23 -0
- data/app/assets/stylesheets/refinery/components/_file_type_icons.scss +36 -0
- data/app/assets/stylesheets/refinery/components/_icons.scss +89 -47
- data/app/assets/stylesheets/refinery/global/_colours.scss +12 -5
- data/app/assets/stylesheets/refinery/mixins/_images.scss +99 -0
- data/app/assets/stylesheets/refinery/mixins/_locales.scss +22 -0
- data/app/assets/stylesheets/refinery/mixins/_rounded.scss +9 -23
- data/app/assets/stylesheets/refinery/plugins/_ui.scss +7 -4
- data/app/assets/stylesheets/refinery/refinery.scss +4 -1
- data/app/assets/stylesheets/refinery/sections/_layout.scss +490 -265
- data/app/controllers/refinery/admin/dialogs_controller.rb +6 -6
- data/app/helpers/refinery/action_helper.rb +75 -0
- data/app/helpers/refinery/icon_helper.rb +51 -0
- data/app/helpers/refinery/image_helper.rb +1 -1
- data/app/helpers/refinery/pagination_helper.rb +1 -0
- data/app/helpers/refinery/site_bar_helper.rb +10 -7
- data/app/helpers/refinery/tag_helper.rb +5 -36
- data/app/helpers/refinery/translation_helper.rb +12 -1
- data/app/views/refinery/_head.html.erb +1 -0
- data/app/views/refinery/_matomo_analytics.html.erb +18 -0
- data/app/views/refinery/_site_bar.html.erb +9 -9
- data/app/views/refinery/admin/_error_messages.html.erb +4 -4
- data/app/views/refinery/admin/_locale_picker.html.erb +8 -14
- data/config/initializers/assets.rb +5 -1
- data/config/initializers/zeitwerk.rb +12 -0
- data/config/locales/en.yml +3 -1
- data/config/locales/sk.yml +7 -0
- data/lib/generators/refinery/cms/cms_generator.rb +24 -20
- data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +5 -0
- data/lib/generators/refinery/dummy/dummy_generator.rb +32 -10
- data/lib/generators/refinery/dummy/templates/rails/application.rb.erb +27 -7
- data/lib/generators/refinery/dummy/templates/rails/boot.rb.erb +1 -2
- data/lib/generators/refinery/dummy/templates/rails/database.yml +55 -14
- data/lib/generators/refinery/dummy/templates/rails/manifest.js +3 -0
- data/lib/generators/refinery/dummy/templates/rails/storage.yml +7 -0
- data/lib/generators/refinery/engine/engine_generator.rb +1 -0
- data/lib/generators/refinery/engine/templates/Gemfile +1 -2
- data/lib/generators/refinery/engine/templates/Rakefile +2 -2
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb +1 -0
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/db/migrate/1_create_namespace_plural_name.rb.erb +15 -4
- data/lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/lib/refinery/plural_name.rb.erb +1 -1
- data/lib/refinery/admin/base_controller.rb +2 -2
- data/lib/refinery/application_controller.rb +1 -2
- data/lib/refinery/cli.rb +1 -1
- data/lib/refinery/core/configuration.rb +4 -1
- data/lib/refinery/core/engine.rb +20 -0
- data/lib/refinery/core.rb +0 -1
- data/lib/refinery/crud.rb +33 -32
- data/lib/refinery/extension_generation.rb +55 -8
- data/lib/refinery/generators/generated_attribute.rb +13 -0
- data/lib/refinery/plugins.rb +1 -1
- data/lib/refinery/version.rb +4 -4
- data/lib/refinery.rb +9 -2
- data/lib/refinerycms/core.rb +1 -0
- data/lib/tasks/refinery.rake +3 -3
- data/refinerycms-core.gemspec +21 -27
- data/spec/controllers/refinery/sitemap_controller_spec.rb +1 -1
- data/spec/helpers/refinery/tag_helper_spec.rb +1 -1
- data/spec/helpers/refinery/translation_helper_spec.rb +46 -10
- data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +6 -6
- data/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb +23 -2
- data/spec/lib/refinery/cli_spec.rb +2 -2
- data/spec/lib/refinery/{users_manager_spec.rb → core/users_manager_spec.rb} +1 -1
- data/spec/lib/refinery/crud_spec.rb +2 -1
- data/spec/presenters/refinery/translated_field_presenter_spec.rb +5 -7
- data/spec/support/refinery.rb +2 -2
- data/spec/{features → system}/refinery/admin/custom_assets_spec.rb +1 -1
- data/spec/system/refinery/admin/dialogs_spec.rb +29 -0
- data/spec/{features → system}/refinery/admin/xhr_paging_spec.rb +10 -7
- data/spec/{features → system}/refinery/application_layout_spec.rb +3 -4
- data/spec/{features → system}/refinery/core_spec.rb +1 -1
- data/spec/{features → system}/refinery/site_bar_spec.rb +5 -3
- data/vendor/assets/javascripts/canvas-to-blob.js +126 -0
- data/vendor/assets/javascripts/cropper.js +3715 -0
- data/vendor/assets/stylesheets/cropper.css +305 -0
- metadata +108 -171
- checksums.yaml.gz.sig +0 -0
- data/app/assets/javascripts/refinery/ajaxy_pagination.js.coffee +0 -10
- data/app/assets/javascripts/refinery/interface.js.coffee.erb +0 -33
- data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +0 -12
- data/spec/features/refinery/admin/dialogs_spec.rb +0 -29
- data/spec/support/database_cleaner.rb +0 -21
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -5
- /data/lib/generators/refinery/cms/templates/config/{database.yml.mysql → database.mysql.yml} +0 -0
- /data/lib/generators/refinery/cms/templates/config/{database.yml.postgresql → database.postgresql.yml} +0 -0
- /data/lib/generators/refinery/cms/templates/config/{database.yml.sqlite3 → database.sqlite3.yml} +0 -0
- /data/lib/refinery/{users_manager.rb → core/users_manager.rb} +0 -0
|
@@ -443,7 +443,7 @@ var link_dialog = {
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
$('.form-actions-dialog #cancel_button').
|
|
446
|
+
$('.form-actions-dialog #cancel_button').click;
|
|
447
447
|
});
|
|
448
448
|
},
|
|
449
449
|
|
|
@@ -636,7 +636,7 @@ var page_options = {
|
|
|
636
636
|
if( typeof(visual_editor_init) == "function" ) {
|
|
637
637
|
visual_editor_init();
|
|
638
638
|
}
|
|
639
|
-
|
|
639
|
+
|
|
640
640
|
|
|
641
641
|
// Wipe the title and increment the index counter by one.
|
|
642
642
|
$('#new_page_part_index').val(parseInt($('#new_page_part_index').val(), 10) + 1);
|
|
@@ -746,7 +746,7 @@ function ImageDialog(options) {
|
|
|
746
746
|
};
|
|
747
747
|
|
|
748
748
|
this.init_select = function() {
|
|
749
|
-
$('#existing_image_area_content ul li img'
|
|
749
|
+
$(document).on('click', '#existing_image_area_content ul li img, #existing_image_area_crops ul li img', function() {
|
|
750
750
|
self.toggle_image($(this));
|
|
751
751
|
});
|
|
752
752
|
|
|
@@ -758,37 +758,52 @@ function ImageDialog(options) {
|
|
|
758
758
|
|
|
759
759
|
this.toggle_image = function(img) {
|
|
760
760
|
if (img.length > 0) {
|
|
761
|
-
if (!self.settings.multiple)
|
|
761
|
+
if (!self.settings.multiple) {
|
|
762
|
+
$('#existing_image_area_content ul li.selected, #existing_image_area_crops ul li.selected').removeClass('selected');
|
|
763
|
+
}
|
|
762
764
|
|
|
763
765
|
img.parent().toggleClass('selected');
|
|
764
|
-
var imageId = img.attr('data-id');
|
|
765
|
-
var geometry = $('#existing_image_size_area li.selected a').attr('data-geometry');
|
|
766
|
-
var size = $('#existing_image_size_area li.selected a').attr('data-size');
|
|
767
|
-
var resize = $("#wants_to_resize_image").is(':checked');
|
|
768
766
|
|
|
769
|
-
|
|
767
|
+
if(img.parent().find('.crops').length) {
|
|
768
|
+
$('#existing_image_area_crops').html(img.parent().find('.crops').html());
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
self.prepare_wysiwyg();
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
this.prepare_wysiwyg = function(){
|
|
776
|
+
var geometry = $('#existing_image_size_area select#resize option:selected').attr('data-geometry');
|
|
777
|
+
var size = $('#existing_image_size_area select#resize').val();
|
|
778
|
+
var resize = $("#wants_to_resize_image").is(':checked');
|
|
779
|
+
|
|
780
|
+
var img = $(document).find('#existing_image_area_content ul li.selected img:first-child');
|
|
781
|
+
|
|
782
|
+
if(img.length == 0) img = $(document).find('#existing_image_area_crops ul li.selected img');
|
|
783
|
+
|
|
784
|
+
image_url = resize && size != 0 ? img.attr('data-' + size) : img.attr('data-original');
|
|
770
785
|
|
|
771
|
-
|
|
772
|
-
|
|
786
|
+
if (parent) {
|
|
787
|
+
if ((visual_editor_src = parent.document.getElementById('visual_editor_src')) != null) {
|
|
773
788
|
visual_editor_src.value = image_url;
|
|
774
|
-
|
|
775
|
-
|
|
789
|
+
}
|
|
790
|
+
if ((visual_editor_title = parent.document.getElementById('visual_editor_title')) != null) {
|
|
776
791
|
visual_editor_title.value = img.attr('title');
|
|
777
|
-
|
|
778
|
-
|
|
792
|
+
}
|
|
793
|
+
if ((visual_editor_alt = parent.document.getElementById('visual_editor_alt')) != null) {
|
|
779
794
|
visual_editor_alt.value = img.attr('alt');
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
795
|
+
}
|
|
796
|
+
if ((visual_editor_size = parent.document.getElementById('visual_editor_size')) != null
|
|
797
|
+
&& typeof(geometry) != 'undefined') {
|
|
783
798
|
visual_editor_size.value = geometry.replace(/[<>=]/g, '');
|
|
784
|
-
}
|
|
785
799
|
}
|
|
786
800
|
}
|
|
787
|
-
}
|
|
801
|
+
}
|
|
788
802
|
|
|
789
803
|
this.submit_image_choice = function(e) {
|
|
790
804
|
e.preventDefault();
|
|
791
|
-
selected_images = $('#existing_image_area_content ul li.selected img');
|
|
805
|
+
selected_images = $(document).find('#existing_image_area_content ul li.selected img:first-child');
|
|
806
|
+
if(selected_images.length == 0) selected_images = $(document).find('#existing_image_area_crops ul li.selected img');
|
|
792
807
|
selected_images = self.settings.multiple ? selected_images.get() : selected_images.get(0);
|
|
793
808
|
|
|
794
809
|
if(selected_images && $.isFunction(self.callback))
|
|
@@ -830,6 +845,7 @@ function ImageDialog(options) {
|
|
|
830
845
|
image_area = $('#existing_image_area').not('#visual_editor_iframe_body #existing_image_area');
|
|
831
846
|
image_area.find('.form-actions input#submit_button').click($.proxy(function(e) {
|
|
832
847
|
e.preventDefault();
|
|
848
|
+
self.prepare_wysiwyg();
|
|
833
849
|
$(this.document.getElementById('visual_editor_dialog_submit')).click();
|
|
834
850
|
}, parent));
|
|
835
851
|
image_area.find('.form-actions a.close_dialog').click(close_dialog);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
window.init_ajaxy_pagination = function() {
|
|
2
|
+
if (typeof window.history.pushState === "function") {
|
|
3
|
+
$(".pagination_container .pagination a").on("click", function(e) {
|
|
4
|
+
let navigate_to = this.href.replace(/(\&(amp\;)?)?from_page\=\d+/, "");
|
|
5
|
+
navigate_to += "&from_page=" + $(".current").text();
|
|
6
|
+
navigate_to = navigate_to.replace("?&", "?").replace(/\s+/, "");
|
|
7
|
+
|
|
8
|
+
const current_state_location = location.pathname + location.href.split(location.pathname)[1];
|
|
9
|
+
|
|
10
|
+
window.history.pushState({ path: current_state_location }, "", navigate_to);
|
|
11
|
+
$(document).paginateTo(navigate_to);
|
|
12
|
+
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
window.onload = function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const image = document.getElementById('crop');
|
|
5
|
+
const ratios = document.getElementById('ratios');
|
|
6
|
+
const defaultAspectRatio = ratios.querySelector('button').getAttribute('data-value');
|
|
7
|
+
const submitCropSubmit = document.getElementById('save_crop');
|
|
8
|
+
let selectedCropRatio, cropWidth, cropHeight;
|
|
9
|
+
|
|
10
|
+
let options = {
|
|
11
|
+
aspectRatio: defaultAspectRatio,
|
|
12
|
+
crop: function (e) {
|
|
13
|
+
let data = e.detail;
|
|
14
|
+
cropWidth = data.width;
|
|
15
|
+
cropHeight = data.height;
|
|
16
|
+
},
|
|
17
|
+
zoomOnWheel: false
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
let cropper = new Cropper(image, options);
|
|
21
|
+
|
|
22
|
+
// Toggle aspect ratio after initialization
|
|
23
|
+
ratios.querySelectorAll('button').forEach(function(ratioButton) {
|
|
24
|
+
ratioButton.addEventListener('click', function() {
|
|
25
|
+
options.aspectRatio = ratioButton.getAttribute('data-value');
|
|
26
|
+
selectedCropRatio = ratioButton.getAttribute('data-ratio');
|
|
27
|
+
|
|
28
|
+
cropper.destroy();
|
|
29
|
+
cropper = new Cropper(image, options);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
submitCropSubmit.addEventListener('click', function(e) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
|
|
36
|
+
const filename = image.getAttribute('data-filename');
|
|
37
|
+
const mimeType = image.getAttribute('data-mime-type');
|
|
38
|
+
|
|
39
|
+
const imageId = image.getAttribute('data-image-id');
|
|
40
|
+
const form = document.getElementById('crop_image_'+imageId);
|
|
41
|
+
const actionUrl = form.getAttribute('action');
|
|
42
|
+
|
|
43
|
+
cropper.getCroppedCanvas().toBlob(function(blob) {
|
|
44
|
+
let formData = new FormData(form);
|
|
45
|
+
|
|
46
|
+
formData.append('image', blob, filename);
|
|
47
|
+
formData.append('ratio', selectedCropRatio);
|
|
48
|
+
formData.append('height', cropHeight);
|
|
49
|
+
formData.append('width', cropWidth);
|
|
50
|
+
|
|
51
|
+
ajaxPostNewCrop(formData, actionUrl);
|
|
52
|
+
}, mimeType);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
function ajaxPostNewCrop(formData, actionUrl) {
|
|
56
|
+
let xhr = new XMLHttpRequest();
|
|
57
|
+
|
|
58
|
+
xhr.open('PATCH', actionUrl, true);
|
|
59
|
+
xhr.send(formData);
|
|
60
|
+
xhr.onreadystatechange = function() {
|
|
61
|
+
if (xhr.readyState === 4) {
|
|
62
|
+
if (xhr.status === 200) {
|
|
63
|
+
const response = JSON.parse(xhr.responseText);
|
|
64
|
+
appendNewCropInList(response.crop, 'crop-list');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function appendNewCropInList(newCrop, listId) {
|
|
71
|
+
initCropList(listId);
|
|
72
|
+
|
|
73
|
+
let child = document.createElement('div');
|
|
74
|
+
child.innerHTML = newCrop;
|
|
75
|
+
child = child.firstChild;
|
|
76
|
+
|
|
77
|
+
return document.getElementById(listId).appendChild(child);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function initCropList(listId){
|
|
81
|
+
let cropsId = document.getElementById('crops');
|
|
82
|
+
let cropListId = document.getElementById(listId);
|
|
83
|
+
|
|
84
|
+
if(cropListId == null) {
|
|
85
|
+
cropListId = document.createElement('ul');
|
|
86
|
+
cropListId.setAttribute("id", listId);
|
|
87
|
+
cropListId.setAttribute("class", "clearfix");
|
|
88
|
+
cropsId.appendChild(cropListId);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
hideNoCropsYetText();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function hideNoCropsYetText(){
|
|
95
|
+
const noCropsYetText = document.getElementById('no-crops-yet');
|
|
96
|
+
|
|
97
|
+
if(noCropsYetText !== null && noCropsYetText.style.display != 'none') {
|
|
98
|
+
noCropsYetText.style.display = 'none';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
window.init_interface = function() {
|
|
2
|
+
if (parent && parent.document.location.href !== document.location.href) {
|
|
3
|
+
$("body#dialog_container.dialog").addClass("iframed");
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$("input:submit:not(.button)").addClass("button");
|
|
7
|
+
|
|
8
|
+
if (typeof visual_editor_init_interface_hook !== 'undefined') {
|
|
9
|
+
visual_editor_init_interface_hook();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
$("#current_locale li a").click(function(e) {
|
|
13
|
+
$("#current_locale li a span.action").each(function() {
|
|
14
|
+
$(this).css("display", $(this).css("display") === "none" ? "" : "none");
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
$("#other_locales").animate({
|
|
18
|
+
opacity: "toggle",
|
|
19
|
+
height: "toggle"
|
|
20
|
+
}, 250);
|
|
21
|
+
|
|
22
|
+
$("html,body").animate({ scrollTop: $("#other_locales").parent().offset().top }, 250);
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
$(".form-actions .form-actions-left input:submit#submit_button").click(function(e) {
|
|
27
|
+
$(this).nextAll('#spinner').removeClass('hidden_icon').addClass('unhidden_icon');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
$(".form-actions.form-actions-dialog .form-actions-left a.close_dialog").click(function(e) {
|
|
31
|
+
let titlebar_close_button = $('.ui-dialog-titlebar-close');
|
|
32
|
+
if (parent) {
|
|
33
|
+
titlebar_close_button = parent.$('.ui-dialog-titlebar-close');
|
|
34
|
+
}
|
|
35
|
+
titlebar_close_button.click();
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
$("a.suppress").on("click", function(e) {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
});
|
|
42
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
2
|
*= require jquery
|
|
3
3
|
*= require jquery_ujs
|
|
4
|
-
*= require jquery-ui/dialog
|
|
5
|
-
*= require jquery-ui/sortable
|
|
6
|
-
*= require jquery-ui/tabs
|
|
4
|
+
*= require jquery-ui/widgets/dialog
|
|
5
|
+
*= require jquery-ui/widgets/sortable
|
|
6
|
+
*= require jquery-ui/widgets/tabs
|
|
7
7
|
*= require modernizr-min
|
|
8
8
|
*= require jquery/jquery.html5-placeholder-shim
|
|
9
9
|
*= require jquery/jquery.timers
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<%# encoding: utf-8 %>
|
|
2
|
+
window.init_submit_continue = function() {
|
|
3
|
+
$("#submit_continue_button").click(submit_and_continue);
|
|
4
|
+
|
|
5
|
+
$("form").change(function(e) {
|
|
6
|
+
$(this).attr("data-changes-made", true);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const continue_editing_button = $("#continue_editing");
|
|
10
|
+
if (continue_editing_button.length > 0 && continue_editing_button.attr("rel") !== "no-prompt") {
|
|
11
|
+
$("#editor_switch a").click(function(e) {
|
|
12
|
+
if ($("form[data-changes-made]").length > 0) {
|
|
13
|
+
if (!confirm("<%= ::I18n.t("refinery.js.admin.confirm_changes") %>")) {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$("input[id=page_custom_slug]").change(function() {
|
|
21
|
+
$("#submit_continue_button").remove();
|
|
22
|
+
});
|
|
23
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
%icon-font { font-family: 'FontAwesome', Helvetica, Arial, sans-serif; }
|
|
2
|
+
$adobe_red: B30C00FF;
|
|
3
|
+
$ms_word_blue: #1558BB;
|
|
4
|
+
$msxl_green: #0F7C42;
|
|
5
|
+
$mspp_brown: #C94B26;
|
|
6
|
+
/* icons */
|
|
7
|
+
|
|
8
|
+
.pdf_icon {@include icon(file-pdf-o, $adobe_red);}
|
|
9
|
+
|
|
10
|
+
.word_icon {@include icon(file-word-o, $ms_word_blue);}
|
|
11
|
+
|
|
12
|
+
.excel_icon {@include icon(file-excel-o, $msxl_green);}
|
|
13
|
+
|
|
14
|
+
.powerpoint_icon {@include icon(file-powerpoint-o, $mspp_brown);}
|
|
15
|
+
|
|
16
|
+
.photo_icon {@include icon(file-photo-o);}
|
|
17
|
+
|
|
18
|
+
.picture_icon {@include icon(file-picture-o);}
|
|
19
|
+
|
|
20
|
+
.plain_icon {@include icon('file-text')} // text/plain
|
|
21
|
+
|
|
22
|
+
.image_icon {@include icon(file-image-o);}
|
|
23
|
+
|
|
24
|
+
.zip_icon {@include icon(file-zip-o);}
|
|
25
|
+
|
|
26
|
+
.archive_icon {@include icon(file-archive-o);}
|
|
27
|
+
|
|
28
|
+
.sound_icon {@include icon(file-sound-o);}
|
|
29
|
+
|
|
30
|
+
.audio_icon {@include icon(file-audio-o);}
|
|
31
|
+
|
|
32
|
+
.movie_icon {@include icon(file-movie-o);}
|
|
33
|
+
|
|
34
|
+
.video_icon {@include icon(file-video-o);}
|
|
35
|
+
|
|
36
|
+
.code_icon {@include icon(file-code-o);}
|
|
@@ -2,62 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
/* icons */
|
|
4
4
|
|
|
5
|
-
.add_icon
|
|
6
|
-
|
|
7
|
-
.
|
|
5
|
+
.add_icon {@include icon('plus-circle');}
|
|
6
|
+
|
|
7
|
+
.back_icon {@include icon('arrow-left');}
|
|
8
|
+
|
|
9
|
+
.close_icon {@include icon('times-circle')}
|
|
8
10
|
|
|
9
11
|
.delete_icon,
|
|
10
|
-
.delete_section_icon
|
|
11
|
-
|
|
12
|
-
.download_icon
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
.
|
|
17
|
-
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
|
|
12
|
+
.delete_section_icon {@include icon('minus-circle', $icon_delete_colour);}
|
|
13
|
+
|
|
14
|
+
.download_icon {@include icon('download');}
|
|
15
|
+
|
|
16
|
+
.edit_email_icon {@include icon('envelope-o');}
|
|
17
|
+
|
|
18
|
+
.edit_icon {@include icon('edit', $icon_edit_colour);}
|
|
19
|
+
|
|
20
|
+
.edit_locale_icon {@include icon('edit', $icon_locale_colour, $size: 1.2rem)}
|
|
21
|
+
|
|
22
|
+
.locale_icon {@include icon('comment', $icon_locale_colour) }
|
|
23
|
+
|
|
24
|
+
.email_icon {@include icon('envelope-o');}
|
|
25
|
+
|
|
26
|
+
.error_icon {@include icon('question-circle', $icon_error_colour);}
|
|
27
|
+
|
|
28
|
+
.failure_icon {@include icon('times');}
|
|
29
|
+
|
|
30
|
+
.folder_icon {@include icon('folder', $icon_folder_colour)}
|
|
31
|
+
|
|
32
|
+
.folderopen_icon {@include icon('folder-open', $icon_folder_colour)}
|
|
33
|
+
|
|
34
|
+
.go_icon {@include icon('caret-square-o-right');}
|
|
35
|
+
|
|
36
|
+
.info_icon {@include icon('info-circle');}
|
|
37
|
+
|
|
38
|
+
.loading_icon {@include icon('spinner'); @extend .fa-spin}
|
|
39
|
+
|
|
40
|
+
.page_icon {@include icon('file-o', $icon_page_colour)}
|
|
41
|
+
|
|
42
|
+
.preview_icon {@include icon('eye', $icon_preview_colour)}
|
|
43
|
+
|
|
44
|
+
.remove_icon {@include icon('unlink', $icon_delete_colour);}
|
|
45
|
+
|
|
46
|
+
.reorder_done_icon {@include icon('thumbs-o-up')}
|
|
47
|
+
|
|
48
|
+
.reorder_h_icon {@include icon('exchange');}
|
|
49
|
+
|
|
50
|
+
.reorder_icon {@include icon('unsorted');}
|
|
51
|
+
|
|
28
52
|
.reorder_icon.loading {@include icon('spinner')}
|
|
29
|
-
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
.
|
|
35
|
-
|
|
53
|
+
|
|
54
|
+
.search_icon {@include icon('search')}
|
|
55
|
+
|
|
56
|
+
.settings_icon {@include icon('gear')}
|
|
57
|
+
|
|
58
|
+
.sortdown_icon {@include icon('sort-down')}
|
|
59
|
+
|
|
60
|
+
.sortup_icon {@include icon('sort-up')}
|
|
61
|
+
|
|
62
|
+
.spam_empty_icon {@include icon('trash-o');}
|
|
63
|
+
|
|
64
|
+
.spam_icon {@include icon('trash');}
|
|
65
|
+
|
|
66
|
+
.success_icon {@include icon('check');}
|
|
67
|
+
|
|
36
68
|
.switch_view_grid_icon {@include icon('th')}
|
|
69
|
+
|
|
37
70
|
.switch_view_list_icon {@include icon('list')}
|
|
38
|
-
.upload_icon {@include icon('upload');}
|
|
39
|
-
.user_comment_icon {@include icon('comment-o');}
|
|
40
|
-
.warning_icon {@include icon('warning', $icon_warning_colour)}
|
|
41
71
|
|
|
42
|
-
.
|
|
72
|
+
.upload_icon {@include icon('upload');}
|
|
73
|
+
|
|
74
|
+
.user_comment_icon {@include icon('comment-o');}
|
|
75
|
+
|
|
76
|
+
.warning_icon {@include icon('warning', $icon_warning_colour)}
|
|
77
|
+
|
|
78
|
+
.hidden_icon {display: none}
|
|
79
|
+
|
|
43
80
|
.unhidden_icon {display: inline-block}
|
|
44
81
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
82
|
+
.locale_icon {
|
|
83
|
+
position: relative;
|
|
84
|
+
// icon_base (the icon) occupies the ::before position
|
|
85
|
+
@include icon_base($locale_icon_colour, $size: 1.5rem);
|
|
86
|
+
|
|
87
|
+
&::after {
|
|
88
|
+
position: absolute;
|
|
89
|
+
left: 0.3rem;
|
|
90
|
+
font-size: 0.8rem;
|
|
91
|
+
color: $locale_text_colour;
|
|
92
|
+
font-weight: bold;
|
|
93
|
+
content: attr(id);
|
|
94
|
+
text-transform: uppercase;
|
|
95
|
+
}
|
|
58
96
|
}
|
|
59
97
|
|
|
60
98
|
// don't want underlines on icons
|
|
61
|
-
#content
|
|
62
|
-
|
|
99
|
+
#content {
|
|
100
|
+
a[class$='icon'] {
|
|
101
|
+
border-bottom: none;
|
|
63
102
|
|
|
103
|
+
&:hover {border-bottom: none}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -7,15 +7,22 @@ $icon_locale_colour: #b7e3fc; // pale blue
|
|
|
7
7
|
$icon_page_colour: #86cffa; //
|
|
8
8
|
$icon_warning_colour: #FF6600; // orange
|
|
9
9
|
|
|
10
|
-
$info_icon_blue:
|
|
10
|
+
$info_icon_blue: #022864;
|
|
11
11
|
|
|
12
12
|
$icon_preview_colour: $icon_default_colour;
|
|
13
13
|
$icon_edit_colour: $icon_default_colour;
|
|
14
14
|
$icon_add_colour: $icon_default_colour;
|
|
15
15
|
|
|
16
|
+
$locale_icon_colour: $icon_locale_colour; // pale blue
|
|
17
|
+
$locale_text_colour: #444444AA;
|
|
18
|
+
$locale_selected_background: #65c3f7;
|
|
19
|
+
$locale_hover_background: #cae7fb;
|
|
20
|
+
$current_active_locale: #22A7F2;
|
|
21
|
+
$locale_active_background: #22A7F2;
|
|
22
|
+
|
|
16
23
|
$action_background_colour: lighten($icon_locale_colour,10%);
|
|
17
|
-
$action_border_colour:
|
|
24
|
+
$action_border_colour: #b7e3fc;
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
$index_entry_hover_background: #f1f1f1;
|
|
27
|
+
$index_entry_actions_background: #f1f1f1;
|
|
28
|
+
$index_entry_actions_border: #788;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@mixin indexImage {
|
|
2
|
+
padding: 0;
|
|
3
|
+
margin: 0;
|
|
4
|
+
line-height: 1.2;
|
|
5
|
+
a.edit_link {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
font-weight: bold;
|
|
8
|
+
height: fit-content;
|
|
9
|
+
|
|
10
|
+
&:has(img) { border-bottom: 0}
|
|
11
|
+
}
|
|
12
|
+
.alt {font-style: italic}
|
|
13
|
+
.filename {font-style: italic}
|
|
14
|
+
.title {text-transform: capitalize}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin gridImage {
|
|
18
|
+
@include indexImage;
|
|
19
|
+
|
|
20
|
+
a:has(img) ~ * {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
margin-right: 2px;
|
|
23
|
+
}
|
|
24
|
+
.actions {
|
|
25
|
+
@include imageActions {
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
};
|
|
28
|
+
margin: 0 0.25rem;
|
|
29
|
+
border: 0.5px solid $index_entry_actions_border;
|
|
30
|
+
background-color: $index_entry_actions_background;
|
|
31
|
+
border-radius: 2px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin listImage {
|
|
36
|
+
@include indexImage;
|
|
37
|
+
//margin: 0 12px 12px 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
justify-content: flex-start;
|
|
43
|
+
align-items: baseline;
|
|
44
|
+
gap: 1rem;
|
|
45
|
+
.actions {
|
|
46
|
+
@include imageActions {
|
|
47
|
+
margin-left: auto;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
background-color: $index_entry_hover_background;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@mixin imageIndexLayout {
|
|
58
|
+
list-style-type: none;
|
|
59
|
+
width: 100%;
|
|
60
|
+
padding: 0;
|
|
61
|
+
line-height: 1.2;
|
|
62
|
+
@content;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// apply to #image_grid
|
|
66
|
+
@mixin imageGridLayout {
|
|
67
|
+
@include imageIndexLayout {
|
|
68
|
+
padding-inline-start: 0;
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: repeat(4, 150px);
|
|
71
|
+
grid-template-rows: auto;
|
|
72
|
+
gap: 15px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// apply to #image_list
|
|
77
|
+
@mixin imageListLayout {
|
|
78
|
+
@include imageIndexLayout {
|
|
79
|
+
margin: 10px 0 15px 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin imageActions {
|
|
84
|
+
// unset some
|
|
85
|
+
position: relative;
|
|
86
|
+
top: unset;
|
|
87
|
+
right: unset;
|
|
88
|
+
width: auto;
|
|
89
|
+
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
gap: 0.5rem;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
a {
|
|
95
|
+
float: none;
|
|
96
|
+
margin: 0;
|
|
97
|
+
}
|
|
98
|
+
@content;
|
|
99
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@mixin locale_button {
|
|
2
|
+
padding: 7px 3px 3px 3px;
|
|
3
|
+
background-color: #cdcdcd;
|
|
4
|
+
border-bottom: 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
gap: 0.25rem;
|
|
8
|
+
align-items: center;
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
&.selected { background-color: $locale_selected_background; }
|
|
11
|
+
&:active { background-color: $locale_active_background;}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin locale_group {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
@content;
|
|
22
|
+
}
|