-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1186 from codevise/configurable-loading-spinner
Configurable loading spinner (14.5 Backport)
- Loading branch information
Showing
20 changed files
with
380 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pageflow.editor.widgetTypes.register('media_loading_spinner', { | ||
configurationEditorView: pageflow.ConfigurationEditorView.extend({ | ||
configure: function() { | ||
this.tab('loading_spinner', function() { | ||
this.view(pageflow.InfoBoxView, { | ||
text: I18n.t('pageflow.editor.media_loading_spinner.widget_type_info_box_text') | ||
}); | ||
this.input('custom_background_image_id', pageflow.FileInputView, { | ||
collection: 'image_files', | ||
fileSelectionHandler: 'widgetConfiguration' | ||
}); | ||
this.input('invert', pageflow.CheckBoxInputView); | ||
this.input('remove_logo', pageflow.CheckBoxInputView); | ||
this.input('blur_strength', pageflow.SliderInputView); | ||
}); | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
$media-loading-spinner-duration: 7s; | ||
|
||
.media_loading_spinner { | ||
&:before { | ||
content: ""; | ||
display: block; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
right: 0; | ||
z-index: 1; | ||
background-color: rgba(0, 0, 0, 0.15); | ||
} | ||
|
||
&-image { | ||
background-size: cover; | ||
height: 100%; | ||
} | ||
|
||
&-logo { | ||
@extend %pageflow_widget_margin_right !optional; | ||
position: relative; | ||
|
||
&:after { | ||
@extend %background_logo; | ||
content: ""; | ||
display: block; | ||
z-index: 1; | ||
opacity: 0; | ||
} | ||
} | ||
|
||
&-logo-invert { | ||
&:after{ | ||
background-image: image-url("pageflow/themes/#{$theme-name}/logo_header_invert.#{$logo-image-file-extension}"); | ||
} | ||
} | ||
|
||
&-fade { | ||
@include animation(fade_out 1s ease 1); | ||
@include animation-delay($media-loading-spinner-duration + 0.5s); | ||
@include animation-fill-mode(forwards); | ||
|
||
.media_loading_spinner-logo:after { | ||
@include animation(fade_in 1s ease-out 1); | ||
@include animation-fill-mode(forwards); | ||
} | ||
} | ||
|
||
&-invert { | ||
color: #000 !important; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
de: | ||
pageflow: | ||
editor: | ||
widgets: | ||
attributes: | ||
media_loading_spinner: | ||
custom_background_image_id: | ||
inline_help: Standardmäßig wird das Hintergrundbild der ersten Seite verwendet. | ||
label: Hintegrundbild | ||
remove_logo: | ||
label: Logo entfernen | ||
blur_strength: | ||
inline_help: Steuern Sie die Unschärfe des Hintergrundbilds. | ||
label: Unschärfe | ||
title_loading_spinner: | ||
blur_strength: | ||
inline_help: Steuern Sie die Unschärfe des Hintergrundbilds. | ||
label: Unschärfe | ||
media_loading_spinner: | ||
widget_type_info_box_text: Dies ist eine Vorschau der Lade-Ansicht von 'Bild'. Die Animation wird ausgeführt, während die Seite geladen wird. | ||
activerecord: | ||
attributes: | ||
pageflow/widget: | ||
invert: Farben invertieren | ||
remove_logo: Logo entfernen | ||
blue_strength: Unschärfe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
en: | ||
pageflow: | ||
editor: | ||
widgets: | ||
attributes: | ||
media_loading_spinner: | ||
custom_background_image_id: | ||
inline_help: By default, the background image of the first page is used. | ||
label: Background Image | ||
remove_logo: | ||
label: Remove logo | ||
blur_strength: | ||
inline_help: Control the bluriness of background image. | ||
label: Blur Strength | ||
title_loading_spinner: | ||
blur_strength: | ||
inline_help: Control the bluriness of background image. | ||
label: Blur Strength | ||
media_loading_spinner: | ||
widget_type_info_box_text: This is a preview of the 'Image' loading view. The animation runs while the page is loading. | ||
media_loading_spinner: | ||
widget_type_name: Media | ||
activerecord: | ||
attributes: | ||
pageflow/widget: | ||
invert: Invert Color | ||
remove_logo: Remove Logo | ||
blur_strength: Bluriness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.