breeze_cms 1.0.2 → 1.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/images/breeze/card_preview/big_card.png +0 -0
- data/app/assets/images/breeze/card_preview/card_image_wide.png +0 -0
- data/app/assets/images/breeze/card_preview/faq_item.jpg +0 -0
- data/app/assets/images/breeze/section_preview/section_faq.jpg +0 -0
- data/app/assets/images/breeze/section_preview/section_half_slider.jpg +0 -0
- data/app/assets/stylesheets/breeze/breeze.css +301 -188
- data/app/assets/stylesheets/breeze/breeze.email.css +158 -39
- data/app/controllers/breeze/images_controller.rb +15 -2
- data/app/controllers/breeze/pages_controller.rb +9 -3
- data/app/controllers/breeze/sections_controller.rb +1 -1
- data/app/controllers/breeze/translations_controller.rb +9 -2
- data/app/helpers/breeze/images_helper.rb +11 -5
- data/app/helpers/breeze/options_helper.rb +1 -1
- data/app/helpers/breeze/view_helper.rb +32 -1
- data/app/models/breeze/active_yaml.rb +1 -0
- data/app/models/breeze/page.rb +6 -0
- data/app/models/breeze/section.rb +10 -0
- data/app/models/breeze/shared_base.rb +1 -1
- data/app/models/breeze/translation.rb +15 -1
- data/app/models/breeze/view_base.rb +17 -3
- data/app/views/breeze/images/_editor.haml +22 -22
- data/app/views/breeze/images/index.haml +6 -4
- data/app/views/breeze/images/show.haml +9 -4
- data/app/views/breeze/pages/index.haml +5 -1
- data/app/views/breeze/pages/show.haml +52 -62
- data/app/views/breeze/translations/_row.haml +8 -0
- data/app/views/breeze/translations/show.haml +4 -4
- data/app/views/breeze/view/_form_section.haml +12 -10
- data/app/views/breeze/view/_section_faq.haml +32 -0
- data/app/views/breeze/view/_section_full_image.haml +1 -1
- data/app/views/breeze/view/_section_full_up.haml +4 -3
- data/app/views/breeze/view/_section_half_image.haml +1 -1
- data/app/views/breeze/view/_section_half_slider.haml +69 -0
- data/app/views/breeze/view/_section_large_image.haml +1 -1
- data/app/views/breeze/view/_section_slider.haml +38 -16
- data/app/views/breeze/view/_section_small_image.haml +1 -1
- data/app/views/breeze/view/cards/_big_card.haml +10 -0
- data/app/views/breeze/view/cards/_card_image_wide.haml +10 -0
- data/app/views/breeze/view/cards/_faq_item.haml +9 -0
- data/app/views/breeze/view/cards/_form_field.haml +4 -4
- data/app/views/layouts/breeze/_header.haml +1 -1
- data/config/breeze/card_styles.yml +84 -31
- data/config/breeze/option_definitions.yml +9 -2
- data/config/breeze/page_styles.yml +1 -0
- data/config/breeze/section_styles.yml +54 -0
- data/config/initializers/deepl.rb +5 -0
- data/config/routes.rb +5 -2
- data/lib/breeze/engine.rb +1 -1
- data/lib/breeze/version.rb +1 -1
- data/lib/breeze.rb +3 -1
- metadata +39 -11
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
%section.overflow-hidden.grid.grid-cols-1.m-5.md:m-12.lg:m-20.md:grid-cols-2{id: section.type_id}
|
|
2
|
+
%div{ order_option(section)}
|
|
3
|
+
.swiper{ class: "swiper-#{section.id}"}
|
|
4
|
+
.swiper-wrapper
|
|
5
|
+
- template = "breeze/view/cards/" + section.card_template
|
|
6
|
+
- section.cards.each do |card|
|
|
7
|
+
.swiper-slide{ column_option(section)}
|
|
8
|
+
= render( template , card: card)
|
|
9
|
+
|
|
10
|
+
.swiper-pagination
|
|
11
|
+
.swiper-button-prev
|
|
12
|
+
.swiper-button-next
|
|
13
|
+
|
|
14
|
+
.content-center.px-8.md:px-12.lg:px-16.lg:py-8{ background_option(section)}
|
|
15
|
+
.max-w-xl{options(section , :text_align , :text_color)}
|
|
16
|
+
%h2.section_header.text-2xl.font-bold.md:text-4xl
|
|
17
|
+
= section.header_text(current_lang)
|
|
18
|
+
.section_text.mt-8{ prose_classes }
|
|
19
|
+
= markdown(section,current_lang)
|
|
20
|
+
=view_button(section , "my-4")
|
|
21
|
+
|
|
22
|
+
%script{:src => "https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"}
|
|
23
|
+
|
|
24
|
+
:javascript
|
|
25
|
+
var breaks = #{slider_columns_option(section).to_json};
|
|
26
|
+
document.addEventListener("DOMContentLoaded", function(event) {
|
|
27
|
+
|
|
28
|
+
function initSwiper(){
|
|
29
|
+
const swiper = new Swiper(".swiper-#{section.id}", {
|
|
30
|
+
loop: true,
|
|
31
|
+
speed: 1500,
|
|
32
|
+
breakpoints: breaks ,
|
|
33
|
+
autoplay: {
|
|
34
|
+
delay: #{1200 + rand(600)} ,
|
|
35
|
+
},
|
|
36
|
+
pagination: {
|
|
37
|
+
el: '.swiper-pagination',
|
|
38
|
+
},
|
|
39
|
+
navigation: {
|
|
40
|
+
nextEl: '.swiper-button-next',
|
|
41
|
+
prevEl: '.swiper-button-prev',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Intersection Observer to detect when the element is in view
|
|
47
|
+
const observer = new IntersectionObserver((entries) => {
|
|
48
|
+
entries.forEach(entry => {
|
|
49
|
+
if (entry.isIntersecting) {
|
|
50
|
+
initSwiper(); // Initialize Swiper when the element is in view
|
|
51
|
+
observer.unobserve(entry.target); // Stop observing after initialization
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Start observing the Swiper container
|
|
57
|
+
const swiperContainer = document.querySelector(".swiper-#{section.id}");
|
|
58
|
+
observer.observe(swiperContainer);
|
|
59
|
+
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
var head = document.getElementsByTagName("head")[0];
|
|
63
|
+
cssLink = document.createElement("link");
|
|
64
|
+
cssLink.href = "https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";
|
|
65
|
+
cssLink.rel="stylesheet";
|
|
66
|
+
cssLink.id="dynamic-css";
|
|
67
|
+
cssLink.media="screen";
|
|
68
|
+
cssLink.type="text/css";
|
|
69
|
+
head.appendChild(cssLink);
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
.px-4.py-4.md:py-10.lg:py-16.mx-5.md:mx-12.lg:mx-20{options(section , :text_align , :text_color)}
|
|
5
5
|
%h1.section_header.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
|
6
6
|
= section.header_text(current_lang)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
-unless( section.text_text(current_lang).blank?)
|
|
8
|
+
.section_text.mt-4.text-lg.pt-10{ prose_classes }
|
|
9
|
+
= markdown(section,current_lang)
|
|
10
|
+
=view_button(section , "my-4")
|
|
11
|
+
.swiper{ class: "swiper-#{section.id}"}
|
|
11
12
|
.swiper-wrapper
|
|
12
13
|
- template = "breeze/view/cards/" + section.card_template
|
|
13
14
|
- section.cards.each do |card|
|
|
@@ -23,19 +24,40 @@
|
|
|
23
24
|
:javascript
|
|
24
25
|
var breaks = #{slider_columns_option(section).to_json};
|
|
25
26
|
document.addEventListener("DOMContentLoaded", function(event) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
|
|
28
|
+
function initSwiper(){
|
|
29
|
+
const swiper = new Swiper(".swiper-#{section.id}", {
|
|
30
|
+
loop: true,
|
|
31
|
+
speed: 1500,
|
|
32
|
+
breakpoints: breaks ,
|
|
33
|
+
autoplay: {
|
|
34
|
+
delay: #{slider_speed(section)} ,
|
|
35
|
+
},
|
|
36
|
+
pagination: {
|
|
37
|
+
el: '.swiper-pagination',
|
|
38
|
+
},
|
|
39
|
+
navigation: {
|
|
40
|
+
nextEl: '.swiper-button-next',
|
|
41
|
+
prevEl: '.swiper-button-prev',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// Intersection Observer to detect when the element is in view
|
|
48
|
+
const observer = new IntersectionObserver((entries) => {
|
|
49
|
+
entries.forEach(entry => {
|
|
50
|
+
if (entry.isIntersecting) {
|
|
51
|
+
initSwiper(); // Initialize Swiper when the element is in view
|
|
52
|
+
observer.unobserve(entry.target); // Stop observing after initialization
|
|
53
|
+
}
|
|
54
|
+
});
|
|
38
55
|
});
|
|
56
|
+
|
|
57
|
+
// Start observing the Swiper container
|
|
58
|
+
const swiperContainer = document.querySelector(".swiper-#{section.id}");
|
|
59
|
+
observer.observe(swiperContainer);
|
|
60
|
+
|
|
39
61
|
});
|
|
40
62
|
|
|
41
63
|
var head = document.getElementsByTagName("head")[0];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.flex.justify-center.flex-col.lg:flex-row{options(card , :margin , :background ), id: card.type_id}
|
|
2
|
+
.flex.justify-center.h-60.w-full.overflow-hidden{order_option(card, "lg:w-1/3")}
|
|
3
|
+
= image_for(card ,"object-cover")
|
|
4
|
+
.columns-1.md:columns-2.max-w-full.items-center.w-full.max-w.px-6.mx-auto.mt-6.lg:mt-0{text_color_option(card, "lg:w-2/3")}
|
|
5
|
+
-unless( card.header_text(current_lang).blank?)
|
|
6
|
+
%h2.section_header.text-4xl.font-bold.text-left.mb-4.lg:mb-8{text_align_option(card)}= card.header_text(current_lang)
|
|
7
|
+
-unless( card.text_text(current_lang).blank?)
|
|
8
|
+
.section_text.mt-3{ prose_classes }
|
|
9
|
+
= markdown(card,current_lang)
|
|
10
|
+
=view_button(card , "my-4")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
%section.overflow-hidden.bg-cover.bg-no-repeat{bg(card , "h-full") , id: card.type_id}
|
|
2
|
+
.px-4.py-24.sm:px-6.lg:px-8
|
|
3
|
+
.flex{ item_align_option( card )}
|
|
4
|
+
.p-8.md:p-12.lg:px-16.lg:py-24{options(card , :shade )}
|
|
5
|
+
.mx-auto.max-w-xl{ options(card , :text_color, :text_align)}
|
|
6
|
+
%h2.section_header.text-2xl.font-bold.md:text-5xl
|
|
7
|
+
= card.header_text(current_lang)
|
|
8
|
+
.section_text.sm:mt-4.text-2xl{ prose_classes }
|
|
9
|
+
= markdown(card,current_lang)
|
|
10
|
+
=view_button(card , "my-4")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
.transition-all.duration-200.bg-white.border.border-gray-200.shadow-lg.cursor-pointer.hover:bg-gray-50{options(card, :text_color)}
|
|
2
|
+
%button.flex.items-center.justify-between.w-full.px-4.py-5.sm:p-6{"data-state" => "closed",
|
|
3
|
+
:type => "button" , id: "question#{card.section.id}_#{card.id}" }
|
|
4
|
+
%span.flex.text-lg.font-semibold.text-black= card.header_text(current_lang)
|
|
5
|
+
%svg.w-6.h-6.text-gray-400{fill: :none, stroke: :currentColor, id: "arrow#{card.section.id}_#{card.id}",
|
|
6
|
+
:viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
|
|
7
|
+
%path{:d => "M19 9l-7 7-7-7", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => "2"}
|
|
8
|
+
.px-4.pb-5.sm:px-6.sm:pb-6{style: "display:none" , id: "answer#{card.section.id}_#{card.id}"}
|
|
9
|
+
%p= markdown(card,current_lang)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
-if card.option("form_type") == "message"
|
|
2
2
|
.relative.z-0.col-span-2.mt-3
|
|
3
|
-
%textarea.peer.block.w-full.appearance-none.border-0.border-b.border-gray-500.bg-transparent.px-0.text-
|
|
4
|
-
%label.absolute.top-3.-z-10.-translate-y-6.scale-75.transform.text-
|
|
3
|
+
%textarea.peer.block.w-full.appearance-none.border-0.border-b.border-gray-500.bg-transparent.px-0.text-gray-900.focus:border-blue-600.focus:outline-none.focus:ring-0{:class => "py-2.5", :name => card.header_text(current_lang) , :placeholder => " ", :rows => "5"}=params[card.header_text(current_lang)]
|
|
4
|
+
%label.absolute.top-3.-z-10.-translate-y-6.scale-75.transform.text-gray-500.duration-300.peer-placeholder-shown:translate-y-0.peer-placeholder-shown:scale-100.peer-focus:left-0.peer-focus:-translate-y-6.peer-focus:scale-75.peer-focus:text-blue-600.peer-focus:dark:text-blue-500{:class => "origin-[0]"}= card.header_text(current_lang)
|
|
5
5
|
-else
|
|
6
6
|
.relative.z-0.mt-3
|
|
7
|
-
%input.peer.block.w-full.appearance-none.border-0.border-b.border-gray-500.bg-transparent.px-0.text-
|
|
8
|
-
%label.absolute.top-3.-z-10.-translate-y-6.scale-75.transform.text-
|
|
7
|
+
%input.peer.block.w-full.appearance-none.border-0.border-b.border-gray-500.bg-transparent.px-0.text-gray-900.focus:border-blue-600.focus:outline-none.focus:ring-0{:class => "py-2.5", :name => card.header_text(current_lang), :placeholder => " " , "value" => params[card.header_text(current_lang)], :type => "text"}
|
|
8
|
+
%label.absolute.top-3.-z-10.-translate-y-6.scale-75.transform.text-gray-500.duration-300.peer-placeholder-shown:translate-y-0.peer-placeholder-shown:scale-100.peer-focus:left-0.peer-focus:-translate-y-6.peer-focus:scale-75.peer-focus:text-blue-600.peer-focus:dark:text-blue-500{:class => "origin-[0]"}= card_field_name(card)
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
+
- :template: card_normal_round
|
|
3
|
+
:header: Standard card with rounded look
|
|
4
|
+
:text: Otherwise quite similar to standard. But there is gap under the image.
|
|
5
|
+
Images can be wide or square, for 2 column 800 wide,
|
|
6
|
+
3 column 600 , 4 column 400
|
|
7
|
+
|
|
8
|
+
:fields:
|
|
9
|
+
- header
|
|
10
|
+
- text
|
|
11
|
+
:options:
|
|
12
|
+
- background
|
|
13
|
+
- text_color
|
|
14
|
+
- text_align
|
|
15
|
+
- button_link
|
|
16
|
+
- button_text
|
|
17
|
+
- :template: card_normal_square
|
|
18
|
+
:header: Standard card with square image
|
|
19
|
+
:text: Image, header, text, normal stuff. No margin between image and text.
|
|
20
|
+
Text alignment option. Also option to turn upside down with order.
|
|
21
|
+
Images can be wide or square, for 2 column 800 wide,
|
|
22
|
+
3 column 600 , 4 column 400
|
|
23
|
+
:fields:
|
|
24
|
+
- header
|
|
25
|
+
- text
|
|
26
|
+
:options:
|
|
27
|
+
- background
|
|
28
|
+
- text_color
|
|
29
|
+
- text_align
|
|
30
|
+
- order
|
|
31
|
+
- button_link
|
|
32
|
+
- button_text
|
|
2
33
|
- :template: card_full_image
|
|
3
34
|
:header: Full background
|
|
4
35
|
:text: Text in box on top of the imag. Adjustable background
|
|
@@ -12,6 +43,27 @@
|
|
|
12
43
|
- background
|
|
13
44
|
- text_color
|
|
14
45
|
- text_align
|
|
46
|
+
- :template: card_image_wide
|
|
47
|
+
:header: Full image header with adjustable text
|
|
48
|
+
:text: Really a section for use in slider, large picture background with
|
|
49
|
+
Header and text on top.
|
|
50
|
+
Adjustable text text alignment (left, center, right).
|
|
51
|
+
Text may be slightly shaded for readability,
|
|
52
|
+
text color can be changed too.
|
|
53
|
+
Image should be 1600 wide and can be between 400 and 900 for
|
|
54
|
+
different looks
|
|
55
|
+
:fields:
|
|
56
|
+
- header
|
|
57
|
+
- text
|
|
58
|
+
:options:
|
|
59
|
+
- fixed
|
|
60
|
+
- text_color
|
|
61
|
+
- text_align
|
|
62
|
+
- item_align
|
|
63
|
+
- image_align
|
|
64
|
+
- shade_color
|
|
65
|
+
- button_link
|
|
66
|
+
- button_text
|
|
15
67
|
- :template: card_large_image
|
|
16
68
|
:header: Image as is
|
|
17
69
|
:text: Image as is, ie no sizing
|
|
@@ -36,22 +88,6 @@
|
|
|
36
88
|
- text_color
|
|
37
89
|
- order
|
|
38
90
|
- text_align
|
|
39
|
-
- :template: card_normal_square
|
|
40
|
-
:header: Standard card with square image
|
|
41
|
-
:text: Image, header, text, normal stuff. No margin between image and text.
|
|
42
|
-
Text alignment option. Also option to turn upside down with order.
|
|
43
|
-
Images can be wide or square, for 2 column 800 wide,
|
|
44
|
-
3 column 600 , 4 column 400
|
|
45
|
-
:fields:
|
|
46
|
-
- header
|
|
47
|
-
- text
|
|
48
|
-
:options:
|
|
49
|
-
- background
|
|
50
|
-
- text_color
|
|
51
|
-
- text_align
|
|
52
|
-
- order
|
|
53
|
-
- button_link
|
|
54
|
-
- button_text
|
|
55
91
|
- :template: card_wide_square
|
|
56
92
|
:header: Sideway card with square image
|
|
57
93
|
:text: Much like standard square card, just turned sideways.
|
|
@@ -98,21 +134,6 @@
|
|
|
98
134
|
- text_align
|
|
99
135
|
- button_link
|
|
100
136
|
- button_text
|
|
101
|
-
- :template: card_normal_round
|
|
102
|
-
:header: Standard card with rounded look
|
|
103
|
-
:text: Otherwise quite similar to standard. But there is gap under the image.
|
|
104
|
-
Images can be wide or square, for 2 column 800 wide,
|
|
105
|
-
3 column 600 , 4 column 400
|
|
106
|
-
|
|
107
|
-
:fields:
|
|
108
|
-
- header
|
|
109
|
-
- text
|
|
110
|
-
:options:
|
|
111
|
-
- background
|
|
112
|
-
- text_color
|
|
113
|
-
- text_align
|
|
114
|
-
- button_link
|
|
115
|
-
- button_text
|
|
116
137
|
- :template: form_field
|
|
117
138
|
:header: A single field in a form
|
|
118
139
|
:text: The header is the Name of the field, the description
|
|
@@ -123,3 +144,35 @@
|
|
|
123
144
|
:options:
|
|
124
145
|
- compulsory
|
|
125
146
|
- form_type
|
|
147
|
+
- :template: faq_item
|
|
148
|
+
:header: A question answer in an faq section
|
|
149
|
+
:text: The header is the qustion, the description
|
|
150
|
+
is the answer. (No image)
|
|
151
|
+
:fields:
|
|
152
|
+
- header
|
|
153
|
+
- text
|
|
154
|
+
:options:
|
|
155
|
+
- background
|
|
156
|
+
- text_color
|
|
157
|
+
- :template: big_card
|
|
158
|
+
:header: Section card with one third image header and larger text area.
|
|
159
|
+
:text: Card to add text heacy content to slider. Not really in column
|
|
160
|
+
Smaller picture with Header and text offset that use more space.
|
|
161
|
+
Adjustable text alignment (left, center, right).
|
|
162
|
+
Text section may have background color.
|
|
163
|
+
Text color can be changed too
|
|
164
|
+
:fields:
|
|
165
|
+
- header
|
|
166
|
+
- text
|
|
167
|
+
:options:
|
|
168
|
+
:fields:
|
|
169
|
+
- header
|
|
170
|
+
- text
|
|
171
|
+
:options:
|
|
172
|
+
- margin
|
|
173
|
+
- order
|
|
174
|
+
- text_color
|
|
175
|
+
- text_align
|
|
176
|
+
- background
|
|
177
|
+
- button_link
|
|
178
|
+
- button_text
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
:id: 7
|
|
42
42
|
- :name: margin
|
|
43
43
|
:description: Most sections have standard margin of 20. This option makes it possible
|
|
44
|
-
to remove that
|
|
45
|
-
:values: none small medium large
|
|
44
|
+
to remove that. Also auto is possible with varying results (depends on content)
|
|
45
|
+
:values: none small medium large auto
|
|
46
46
|
:default: large
|
|
47
47
|
:id: 8
|
|
48
48
|
- :name: button_text
|
|
@@ -132,3 +132,10 @@
|
|
|
132
132
|
:values:
|
|
133
133
|
:default:
|
|
134
134
|
:id: 25
|
|
135
|
+
- :name: main_image
|
|
136
|
+
:description: Image that should be shown in posts (fb)
|
|
137
|
+
Should be the number of a breeze picture,
|
|
138
|
+
ie what is in the url eg 381 for /breeze/images/381
|
|
139
|
+
:values:
|
|
140
|
+
:default:
|
|
141
|
+
:id: 26
|
|
@@ -30,6 +30,26 @@
|
|
|
30
30
|
- item_align
|
|
31
31
|
- button_link
|
|
32
32
|
- button_text
|
|
33
|
+
- :template: section_half_slider
|
|
34
|
+
:header: Half text, half slider with optional header with text
|
|
35
|
+
:text: Header. text button on the right (constant) slider left.
|
|
36
|
+
Slider slides any (number) of cards.
|
|
37
|
+
Columns means how many slides are visible on desktop.
|
|
38
|
+
Optional header text on top of the slider (like the section with header/text)
|
|
39
|
+
:cards: true
|
|
40
|
+
:fields:
|
|
41
|
+
- header
|
|
42
|
+
- text
|
|
43
|
+
:options:
|
|
44
|
+
- slider_columns
|
|
45
|
+
- order
|
|
46
|
+
- background
|
|
47
|
+
- text_color
|
|
48
|
+
- margin
|
|
49
|
+
- text_align
|
|
50
|
+
- item_align
|
|
51
|
+
- button_link
|
|
52
|
+
- button_text
|
|
33
53
|
- :template: section_feature
|
|
34
54
|
:header: Feature section with 2 column,
|
|
35
55
|
:text: A split header with two column layout on the right.
|
|
@@ -179,6 +199,9 @@
|
|
|
179
199
|
- handler
|
|
180
200
|
- background
|
|
181
201
|
- text_color
|
|
202
|
+
- margin
|
|
203
|
+
- text_align
|
|
204
|
+
- item_align
|
|
182
205
|
- :template: blog_header
|
|
183
206
|
:header: Start of blog, with image left or right
|
|
184
207
|
:text: Image on one side, header and text on the other.
|
|
@@ -193,3 +216,34 @@
|
|
|
193
216
|
- text_columns
|
|
194
217
|
- background
|
|
195
218
|
- text_color
|
|
219
|
+
- :template: section_faq
|
|
220
|
+
:header: Faq section with Cards as questions
|
|
221
|
+
:text: A header with text and collapsable faq layout.
|
|
222
|
+
Only works proper with faq_item card style
|
|
223
|
+
:cards: true
|
|
224
|
+
:fields:
|
|
225
|
+
- header
|
|
226
|
+
- text
|
|
227
|
+
:options:
|
|
228
|
+
- background
|
|
229
|
+
- text_color
|
|
230
|
+
- text_align
|
|
231
|
+
- margin
|
|
232
|
+
- :template: section_slider
|
|
233
|
+
:header: Slider with optional header with text
|
|
234
|
+
:text: Slider slides any (number) of cards. Columns means how many
|
|
235
|
+
slides are visible on desktop.
|
|
236
|
+
Optional header text on top of the slider (like the section with header/text)
|
|
237
|
+
:cards: true
|
|
238
|
+
:fields:
|
|
239
|
+
- header
|
|
240
|
+
- text
|
|
241
|
+
:options:
|
|
242
|
+
- slider_columns
|
|
243
|
+
- background
|
|
244
|
+
- text_color
|
|
245
|
+
- margin
|
|
246
|
+
- text_align
|
|
247
|
+
- item_align
|
|
248
|
+
- button_link
|
|
249
|
+
- button_text
|
data/config/routes.rb
CHANGED
|
@@ -9,6 +9,7 @@ Breeze::Engine.routes.draw do
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
resources :pages , except: [:edit , :new] , shallow: true do
|
|
12
|
+
post :translate
|
|
12
13
|
resources :sections , except: [:new] do
|
|
13
14
|
post :new #new is post because it already create the section
|
|
14
15
|
get :set_image
|
|
@@ -36,6 +37,8 @@ Breeze::Engine.routes.draw do
|
|
|
36
37
|
post :scale
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
resources :translations
|
|
40
|
-
|
|
40
|
+
resources :translations do
|
|
41
|
+
post :auto
|
|
42
|
+
end
|
|
43
|
+
|
|
41
44
|
end
|
data/lib/breeze/engine.rb
CHANGED
|
@@ -83,7 +83,7 @@ module ActionDispatch::Routing
|
|
|
83
83
|
|
|
84
84
|
post "/form" , to: "breeze/form#post" , as: :post_form
|
|
85
85
|
get "/news/:id" , to: "breeze/view#page" , id: :id , as: :view_blog
|
|
86
|
-
get ":id" , to: "breeze/view#page" , id: :id , as: :view_page
|
|
86
|
+
get ":id" , to: "breeze/view#page" , id: :id , as: :view_page, constraints: { format: 'html' }
|
|
87
87
|
|
|
88
88
|
engine_path = options[:path] || "/breeze"
|
|
89
89
|
if ! Rails.env.production? or options[:production].present?
|
data/lib/breeze/version.rb
CHANGED
data/lib/breeze.rb
CHANGED
|
@@ -44,7 +44,9 @@ module Breeze
|
|
|
44
44
|
@@margin = { "none" => "m-0",
|
|
45
45
|
"small" => " m-2 md:m-4 lg:6 xl:m-8",
|
|
46
46
|
"medium" => "m-5 md:m-8 lg:10 xl:m-14",
|
|
47
|
-
"large" => " m-8 md:m-12 lg:16 xl:m-20",
|
|
47
|
+
"large" => " m-8 md:m-12 lg:16 xl:m-20",
|
|
48
|
+
"auto" => "mx-auto" ,
|
|
49
|
+
}
|
|
48
50
|
|
|
49
51
|
# background colors
|
|
50
52
|
mattr_accessor :background
|