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
|
@@ -106,12 +106,46 @@
|
|
|
106
106
|
--tw-contain-style: ;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
.container{
|
|
110
|
+
width: 100%;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media (min-width: 640px){
|
|
114
|
+
.container{
|
|
115
|
+
max-width: 640px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@media (min-width: 768px){
|
|
120
|
+
.container{
|
|
121
|
+
max-width: 768px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@media (min-width: 1024px){
|
|
126
|
+
.container{
|
|
127
|
+
max-width: 1024px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (min-width: 1280px){
|
|
132
|
+
.container{
|
|
133
|
+
max-width: 1280px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (min-width: 1536px){
|
|
138
|
+
.container{
|
|
139
|
+
max-width: 1536px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
109
143
|
.button{
|
|
110
144
|
display: inline-block;
|
|
111
145
|
border-radius: 0.5rem;
|
|
112
146
|
border-width: 1px;
|
|
113
147
|
--tw-border-opacity: 1;
|
|
114
|
-
border-color: rgb(107 114 128 / var(--tw-border-opacity));
|
|
148
|
+
border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));
|
|
115
149
|
padding-left: 0.75rem;
|
|
116
150
|
padding-right: 0.75rem;
|
|
117
151
|
padding-top: 0.5rem;
|
|
@@ -123,12 +157,12 @@
|
|
|
123
157
|
|
|
124
158
|
.button:hover{
|
|
125
159
|
--tw-border-opacity: 1;
|
|
126
|
-
border-color: rgb(0 0 0 / var(--tw-border-opacity));
|
|
160
|
+
border-color: rgb(0 0 0 / var(--tw-border-opacity, 1));
|
|
127
161
|
}
|
|
128
162
|
|
|
129
163
|
.change{
|
|
130
164
|
--tw-bg-opacity: 1;
|
|
131
|
-
background-color: rgb(165 243 252 / var(--tw-bg-opacity));
|
|
165
|
+
background-color: rgb(165 243 252 / var(--tw-bg-opacity, 1));
|
|
132
166
|
}
|
|
133
167
|
|
|
134
168
|
.absolute{
|
|
@@ -359,6 +393,10 @@
|
|
|
359
393
|
height: 14rem;
|
|
360
394
|
}
|
|
361
395
|
|
|
396
|
+
.h-6{
|
|
397
|
+
height: 1.5rem;
|
|
398
|
+
}
|
|
399
|
+
|
|
362
400
|
.h-60{
|
|
363
401
|
height: 15rem;
|
|
364
402
|
}
|
|
@@ -391,6 +429,10 @@
|
|
|
391
429
|
width: 10rem;
|
|
392
430
|
}
|
|
393
431
|
|
|
432
|
+
.w-6{
|
|
433
|
+
width: 1.5rem;
|
|
434
|
+
}
|
|
435
|
+
|
|
394
436
|
.w-8{
|
|
395
437
|
width: 2rem;
|
|
396
438
|
}
|
|
@@ -403,8 +445,8 @@
|
|
|
403
445
|
max-width: 56rem;
|
|
404
446
|
}
|
|
405
447
|
|
|
406
|
-
.max-w-\[
|
|
407
|
-
max-width:
|
|
448
|
+
.max-w-\[90\%\]{
|
|
449
|
+
max-width: 90%;
|
|
408
450
|
}
|
|
409
451
|
|
|
410
452
|
.max-w-full{
|
|
@@ -476,6 +518,10 @@
|
|
|
476
518
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
477
519
|
}
|
|
478
520
|
|
|
521
|
+
.cursor-pointer{
|
|
522
|
+
cursor: pointer;
|
|
523
|
+
}
|
|
524
|
+
|
|
479
525
|
.appearance-none{
|
|
480
526
|
-webkit-appearance: none;
|
|
481
527
|
-moz-appearance: none;
|
|
@@ -535,6 +581,12 @@
|
|
|
535
581
|
gap: 2rem;
|
|
536
582
|
}
|
|
537
583
|
|
|
584
|
+
.space-y-4 > :not([hidden]) ~ :not([hidden]){
|
|
585
|
+
--tw-space-y-reverse: 0;
|
|
586
|
+
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
|
587
|
+
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
|
|
588
|
+
}
|
|
589
|
+
|
|
538
590
|
.overflow-hidden{
|
|
539
591
|
overflow: hidden;
|
|
540
592
|
}
|
|
@@ -581,27 +633,32 @@
|
|
|
581
633
|
|
|
582
634
|
.border-gray-100{
|
|
583
635
|
--tw-border-opacity: 1;
|
|
584
|
-
border-color: rgb(243 244 246 / var(--tw-border-opacity));
|
|
636
|
+
border-color: rgb(243 244 246 / var(--tw-border-opacity, 1));
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.border-gray-200{
|
|
640
|
+
--tw-border-opacity: 1;
|
|
641
|
+
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
|
|
585
642
|
}
|
|
586
643
|
|
|
587
644
|
.border-gray-400{
|
|
588
645
|
--tw-border-opacity: 1;
|
|
589
|
-
border-color: rgb(156 163 175 / var(--tw-border-opacity));
|
|
646
|
+
border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));
|
|
590
647
|
}
|
|
591
648
|
|
|
592
649
|
.border-gray-500{
|
|
593
650
|
--tw-border-opacity: 1;
|
|
594
|
-
border-color: rgb(107 114 128 / var(--tw-border-opacity));
|
|
651
|
+
border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));
|
|
595
652
|
}
|
|
596
653
|
|
|
597
654
|
.border-gray-600{
|
|
598
655
|
--tw-border-opacity: 1;
|
|
599
|
-
border-color: rgb(75 85 99 / var(--tw-border-opacity));
|
|
656
|
+
border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
|
|
600
657
|
}
|
|
601
658
|
|
|
602
659
|
.bg-amber-600{
|
|
603
660
|
--tw-bg-opacity: 1;
|
|
604
|
-
background-color: rgb(217 119 6 / var(--tw-bg-opacity));
|
|
661
|
+
background-color: rgb(217 119 6 / var(--tw-bg-opacity, 1));
|
|
605
662
|
}
|
|
606
663
|
|
|
607
664
|
.bg-black\/25{
|
|
@@ -610,7 +667,7 @@
|
|
|
610
667
|
|
|
611
668
|
.bg-cyan-100{
|
|
612
669
|
--tw-bg-opacity: 1;
|
|
613
|
-
background-color: rgb(207 250 254 / var(--tw-bg-opacity));
|
|
670
|
+
background-color: rgb(207 250 254 / var(--tw-bg-opacity, 1));
|
|
614
671
|
}
|
|
615
672
|
|
|
616
673
|
.bg-cyan-100\/25{
|
|
@@ -619,7 +676,7 @@
|
|
|
619
676
|
|
|
620
677
|
.bg-cyan-700{
|
|
621
678
|
--tw-bg-opacity: 1;
|
|
622
|
-
background-color: rgb(14 116 144 / var(--tw-bg-opacity));
|
|
679
|
+
background-color: rgb(14 116 144 / var(--tw-bg-opacity, 1));
|
|
623
680
|
}
|
|
624
681
|
|
|
625
682
|
.bg-cyan-700\/25{
|
|
@@ -628,17 +685,17 @@
|
|
|
628
685
|
|
|
629
686
|
.bg-cyan-900{
|
|
630
687
|
--tw-bg-opacity: 1;
|
|
631
|
-
background-color: rgb(22 78 99 / var(--tw-bg-opacity));
|
|
688
|
+
background-color: rgb(22 78 99 / var(--tw-bg-opacity, 1));
|
|
632
689
|
}
|
|
633
690
|
|
|
634
691
|
.bg-gray-100{
|
|
635
692
|
--tw-bg-opacity: 1;
|
|
636
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
|
693
|
+
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
637
694
|
}
|
|
638
695
|
|
|
639
696
|
.bg-green-700{
|
|
640
697
|
--tw-bg-opacity: 1;
|
|
641
|
-
background-color: rgb(21 128 61 / var(--tw-bg-opacity));
|
|
698
|
+
background-color: rgb(21 128 61 / var(--tw-bg-opacity, 1));
|
|
642
699
|
}
|
|
643
700
|
|
|
644
701
|
.bg-orange-300\/25{
|
|
@@ -647,7 +704,7 @@
|
|
|
647
704
|
|
|
648
705
|
.bg-orange-50{
|
|
649
706
|
--tw-bg-opacity: 1;
|
|
650
|
-
background-color: rgb(255 247 237 / var(--tw-bg-opacity));
|
|
707
|
+
background-color: rgb(255 247 237 / var(--tw-bg-opacity, 1));
|
|
651
708
|
}
|
|
652
709
|
|
|
653
710
|
.bg-orange-800\/25{
|
|
@@ -656,12 +713,12 @@
|
|
|
656
713
|
|
|
657
714
|
.bg-slate-900{
|
|
658
715
|
--tw-bg-opacity: 1;
|
|
659
|
-
background-color: rgb(15 23 42 / var(--tw-bg-opacity));
|
|
716
|
+
background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1));
|
|
660
717
|
}
|
|
661
718
|
|
|
662
719
|
.bg-teal-700{
|
|
663
720
|
--tw-bg-opacity: 1;
|
|
664
|
-
background-color: rgb(15 118 110 / var(--tw-bg-opacity));
|
|
721
|
+
background-color: rgb(15 118 110 / var(--tw-bg-opacity, 1));
|
|
665
722
|
}
|
|
666
723
|
|
|
667
724
|
.bg-transparent{
|
|
@@ -670,7 +727,7 @@
|
|
|
670
727
|
|
|
671
728
|
.bg-white{
|
|
672
729
|
--tw-bg-opacity: 1;
|
|
673
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
730
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
674
731
|
}
|
|
675
732
|
|
|
676
733
|
.bg-white\/25{
|
|
@@ -730,6 +787,11 @@
|
|
|
730
787
|
padding-right: 1.5rem;
|
|
731
788
|
}
|
|
732
789
|
|
|
790
|
+
.px-8{
|
|
791
|
+
padding-left: 2rem;
|
|
792
|
+
padding-right: 2rem;
|
|
793
|
+
}
|
|
794
|
+
|
|
733
795
|
.py-2{
|
|
734
796
|
padding-top: 0.5rem;
|
|
735
797
|
padding-bottom: 0.5rem;
|
|
@@ -755,6 +817,15 @@
|
|
|
755
817
|
padding-bottom: 1rem;
|
|
756
818
|
}
|
|
757
819
|
|
|
820
|
+
.py-5{
|
|
821
|
+
padding-top: 1.25rem;
|
|
822
|
+
padding-bottom: 1.25rem;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.pb-5{
|
|
826
|
+
padding-bottom: 1.25rem;
|
|
827
|
+
}
|
|
828
|
+
|
|
758
829
|
.pr-16{
|
|
759
830
|
padding-right: 4rem;
|
|
760
831
|
}
|
|
@@ -848,67 +919,78 @@
|
|
|
848
919
|
|
|
849
920
|
.text-black{
|
|
850
921
|
--tw-text-opacity: 1;
|
|
851
|
-
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
922
|
+
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
852
923
|
}
|
|
853
924
|
|
|
854
925
|
.text-cyan-100{
|
|
855
926
|
--tw-text-opacity: 1;
|
|
856
|
-
color: rgb(207 250 254 / var(--tw-text-opacity));
|
|
927
|
+
color: rgb(207 250 254 / var(--tw-text-opacity, 1));
|
|
857
928
|
}
|
|
858
929
|
|
|
859
930
|
.text-cyan-700{
|
|
860
931
|
--tw-text-opacity: 1;
|
|
861
|
-
color: rgb(14 116 144 / var(--tw-text-opacity));
|
|
932
|
+
color: rgb(14 116 144 / var(--tw-text-opacity, 1));
|
|
862
933
|
}
|
|
863
934
|
|
|
864
935
|
.text-gray-100{
|
|
865
936
|
--tw-text-opacity: 1;
|
|
866
|
-
color: rgb(243 244 246 / var(--tw-text-opacity));
|
|
937
|
+
color: rgb(243 244 246 / var(--tw-text-opacity, 1));
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.text-gray-400{
|
|
941
|
+
--tw-text-opacity: 1;
|
|
942
|
+
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
867
943
|
}
|
|
868
944
|
|
|
869
945
|
.text-gray-500{
|
|
870
946
|
--tw-text-opacity: 1;
|
|
871
|
-
color: rgb(107 114 128 / var(--tw-text-opacity));
|
|
947
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
872
948
|
}
|
|
873
949
|
|
|
874
950
|
.text-gray-800{
|
|
875
951
|
--tw-text-opacity: 1;
|
|
876
|
-
color: rgb(31 41 55 / var(--tw-text-opacity));
|
|
952
|
+
color: rgb(31 41 55 / var(--tw-text-opacity, 1));
|
|
877
953
|
}
|
|
878
954
|
|
|
879
955
|
.text-gray-900{
|
|
880
956
|
--tw-text-opacity: 1;
|
|
881
|
-
color: rgb(17 24 39 / var(--tw-text-opacity));
|
|
957
|
+
color: rgb(17 24 39 / var(--tw-text-opacity, 1));
|
|
882
958
|
}
|
|
883
959
|
|
|
884
960
|
.text-green-700{
|
|
885
961
|
--tw-text-opacity: 1;
|
|
886
|
-
color: rgb(21 128 61 / var(--tw-text-opacity));
|
|
962
|
+
color: rgb(21 128 61 / var(--tw-text-opacity, 1));
|
|
887
963
|
}
|
|
888
964
|
|
|
889
965
|
.text-indigo-800{
|
|
890
966
|
--tw-text-opacity: 1;
|
|
891
|
-
color: rgb(55 48 163 / var(--tw-text-opacity));
|
|
967
|
+
color: rgb(55 48 163 / var(--tw-text-opacity, 1));
|
|
892
968
|
}
|
|
893
969
|
|
|
894
970
|
.text-orange-800{
|
|
895
971
|
--tw-text-opacity: 1;
|
|
896
|
-
color: rgb(154 52 18 / var(--tw-text-opacity));
|
|
972
|
+
color: rgb(154 52 18 / var(--tw-text-opacity, 1));
|
|
897
973
|
}
|
|
898
974
|
|
|
899
975
|
.text-slate-800{
|
|
900
976
|
--tw-text-opacity: 1;
|
|
901
|
-
color: rgb(30 41 59 / var(--tw-text-opacity));
|
|
977
|
+
color: rgb(30 41 59 / var(--tw-text-opacity, 1));
|
|
902
978
|
}
|
|
903
979
|
|
|
904
980
|
.text-teal-700{
|
|
905
981
|
--tw-text-opacity: 1;
|
|
906
|
-
color: rgb(15 118 110 / var(--tw-text-opacity));
|
|
982
|
+
color: rgb(15 118 110 / var(--tw-text-opacity, 1));
|
|
907
983
|
}
|
|
908
984
|
|
|
909
985
|
.text-white{
|
|
910
986
|
--tw-text-opacity: 1;
|
|
911
|
-
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
987
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
.shadow-lg{
|
|
991
|
+
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
992
|
+
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
993
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
912
994
|
}
|
|
913
995
|
|
|
914
996
|
.shadow-sm{
|
|
@@ -925,12 +1007,22 @@
|
|
|
925
1007
|
transition-duration: 150ms;
|
|
926
1008
|
}
|
|
927
1009
|
|
|
1010
|
+
.transition-all{
|
|
1011
|
+
transition-property: all;
|
|
1012
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1013
|
+
transition-duration: 150ms;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
928
1016
|
.transition-colors{
|
|
929
1017
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
930
1018
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
931
1019
|
transition-duration: 150ms;
|
|
932
1020
|
}
|
|
933
1021
|
|
|
1022
|
+
.duration-200{
|
|
1023
|
+
transition-duration: 200ms;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
934
1026
|
.duration-300{
|
|
935
1027
|
transition-duration: 300ms;
|
|
936
1028
|
}
|
|
@@ -968,12 +1060,17 @@
|
|
|
968
1060
|
|
|
969
1061
|
.hover\:bg-blue-800:hover{
|
|
970
1062
|
--tw-bg-opacity: 1;
|
|
971
|
-
background-color: rgb(30 64 175 / var(--tw-bg-opacity));
|
|
1063
|
+
background-color: rgb(30 64 175 / var(--tw-bg-opacity, 1));
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.hover\:bg-gray-50:hover{
|
|
1067
|
+
--tw-bg-opacity: 1;
|
|
1068
|
+
background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
|
|
972
1069
|
}
|
|
973
1070
|
|
|
974
1071
|
.hover\:text-gray-500:hover{
|
|
975
1072
|
--tw-text-opacity: 1;
|
|
976
|
-
color: rgb(107 114 128 / var(--tw-text-opacity));
|
|
1073
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
977
1074
|
}
|
|
978
1075
|
|
|
979
1076
|
.hover\:text-gray-500\/75:hover{
|
|
@@ -988,7 +1085,7 @@
|
|
|
988
1085
|
|
|
989
1086
|
.focus\:border-blue-600:focus{
|
|
990
1087
|
--tw-border-opacity: 1;
|
|
991
|
-
border-color: rgb(37 99 235 / var(--tw-border-opacity));
|
|
1088
|
+
border-color: rgb(37 99 235 / var(--tw-border-opacity, 1));
|
|
992
1089
|
}
|
|
993
1090
|
|
|
994
1091
|
.focus\:outline-none:focus{
|
|
@@ -1019,12 +1116,12 @@
|
|
|
1019
1116
|
|
|
1020
1117
|
.group:hover .group-hover\:bg-black{
|
|
1021
1118
|
--tw-bg-opacity: 1;
|
|
1022
|
-
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
|
1119
|
+
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
1023
1120
|
}
|
|
1024
1121
|
|
|
1025
1122
|
.group:hover .group-hover\:text-white{
|
|
1026
1123
|
--tw-text-opacity: 1;
|
|
1027
|
-
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1124
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1028
1125
|
}
|
|
1029
1126
|
|
|
1030
1127
|
.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:translate-y-0{
|
|
@@ -1066,7 +1163,7 @@
|
|
|
1066
1163
|
|
|
1067
1164
|
.peer:focus ~ .peer-focus\:text-blue-600{
|
|
1068
1165
|
--tw-text-opacity: 1;
|
|
1069
|
-
color: rgb(37 99 235 / var(--tw-text-opacity));
|
|
1166
|
+
color: rgb(37 99 235 / var(--tw-text-opacity, 1));
|
|
1070
1167
|
}
|
|
1071
1168
|
|
|
1072
1169
|
@media (min-width: 640px){
|
|
@@ -1092,11 +1189,19 @@
|
|
|
1092
1189
|
width: 50%;
|
|
1093
1190
|
}
|
|
1094
1191
|
|
|
1192
|
+
.sm\:p-6{
|
|
1193
|
+
padding: 1.5rem;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1095
1196
|
.sm\:px-6{
|
|
1096
1197
|
padding-left: 1.5rem;
|
|
1097
1198
|
padding-right: 1.5rem;
|
|
1098
1199
|
}
|
|
1099
1200
|
|
|
1201
|
+
.sm\:pb-6{
|
|
1202
|
+
padding-bottom: 1.5rem;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1100
1205
|
.sm\:text-center{
|
|
1101
1206
|
text-align: center;
|
|
1102
1207
|
}
|
|
@@ -1134,6 +1239,10 @@
|
|
|
1134
1239
|
margin-bottom: 2.5rem;
|
|
1135
1240
|
}
|
|
1136
1241
|
|
|
1242
|
+
.md\:mt-16{
|
|
1243
|
+
margin-top: 4rem;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1137
1246
|
.md\:grid{
|
|
1138
1247
|
display: grid;
|
|
1139
1248
|
}
|
|
@@ -1175,6 +1284,11 @@
|
|
|
1175
1284
|
padding: 3rem;
|
|
1176
1285
|
}
|
|
1177
1286
|
|
|
1287
|
+
.md\:px-12{
|
|
1288
|
+
padding-left: 3rem;
|
|
1289
|
+
padding-right: 3rem;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1178
1292
|
.md\:py-10{
|
|
1179
1293
|
padding-top: 2.5rem;
|
|
1180
1294
|
padding-bottom: 2.5rem;
|
|
@@ -1298,6 +1412,11 @@
|
|
|
1298
1412
|
padding-top: 6rem;
|
|
1299
1413
|
padding-bottom: 6rem;
|
|
1300
1414
|
}
|
|
1415
|
+
|
|
1416
|
+
.lg\:py-8{
|
|
1417
|
+
padding-top: 2rem;
|
|
1418
|
+
padding-bottom: 2rem;
|
|
1419
|
+
}
|
|
1301
1420
|
}
|
|
1302
1421
|
|
|
1303
1422
|
@media (min-width: 1280px){
|
|
@@ -1322,6 +1441,6 @@
|
|
|
1322
1441
|
@media (prefers-color-scheme: dark){
|
|
1323
1442
|
.peer:focus ~ .peer-focus\:dark\:text-blue-500{
|
|
1324
1443
|
--tw-text-opacity: 1;
|
|
1325
|
-
color: rgb(59 130 246 / var(--tw-text-opacity));
|
|
1444
|
+
color: rgb(59 130 246 / var(--tw-text-opacity, 1));
|
|
1326
1445
|
}
|
|
1327
1446
|
}
|
|
@@ -48,6 +48,8 @@ module Breeze
|
|
|
48
48
|
@cards = Card.find_all(:image_id, params[:id].to_i)
|
|
49
49
|
@used = ((@cards.length > 0) || (@sections.length > 0))
|
|
50
50
|
@image_data = @image.data
|
|
51
|
+
@global_scale = get_scale(@image)
|
|
52
|
+
puts @global_scale
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
def copy
|
|
@@ -75,17 +77,28 @@ module Breeze
|
|
|
75
77
|
|
|
76
78
|
private
|
|
77
79
|
|
|
80
|
+
def get_scale(image)
|
|
81
|
+
x_scale = (image.width / 1700.0).ceil
|
|
82
|
+
y_scale = (image.height / 1000.0).ceil
|
|
83
|
+
[x_scale , y_scale].max
|
|
84
|
+
end
|
|
85
|
+
|
|
78
86
|
def get_images
|
|
79
87
|
images = Image.all
|
|
80
|
-
return images
|
|
88
|
+
return images if params[:unused].nil?
|
|
81
89
|
hash = images.collect{|i| [i.id , i ] }.to_h
|
|
82
90
|
Section.all.each{ |s| hash.delete(s.image&.id)}
|
|
83
91
|
Card.all.each{ |s| hash.delete(s.image&.id)}
|
|
84
|
-
hash.values
|
|
92
|
+
return hash.values if params[:unused] == "true"
|
|
93
|
+
all = images.collect{|i| [i.id , i ] }.to_h
|
|
94
|
+
hash.each_key{|i| all.delete(i)}
|
|
95
|
+
all.values
|
|
85
96
|
end
|
|
97
|
+
|
|
86
98
|
def set_image
|
|
87
99
|
@image = Image.find(params[:id] || params[:image_id])
|
|
88
100
|
end
|
|
101
|
+
|
|
89
102
|
def determine_redirect(image)
|
|
90
103
|
if(params[:section_id])
|
|
91
104
|
view_context.section_set_image_url(params[:section_id],image_id: image.id )
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Breeze
|
|
2
2
|
class PagesController < BreezeController
|
|
3
3
|
|
|
4
|
-
before_action :set_page, only: %i[ update destroy show ]
|
|
4
|
+
before_action :set_page, only: %i[ update destroy show translate ]
|
|
5
5
|
|
|
6
6
|
def index
|
|
7
7
|
if(! params[:type].blank?)
|
|
@@ -16,11 +16,17 @@ module Breeze
|
|
|
16
16
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# automagically translate all sections and cards
|
|
20
|
+
def translate
|
|
21
|
+
@page.translate(current_member_email)
|
|
22
|
+
redirect_to pages_url , notice: "#{@page.name} translated"
|
|
23
|
+
end
|
|
24
|
+
|
|
19
25
|
def update
|
|
20
26
|
if( !params[:name].blank? && (params[:name] != @page.name))
|
|
21
27
|
@page.set_name params[:name]
|
|
22
28
|
end
|
|
23
|
-
@page.
|
|
29
|
+
@page.update_present_options( params[:options])
|
|
24
30
|
@page.edit_save(current_member_email)
|
|
25
31
|
message = "Saved"
|
|
26
32
|
redirect_to page_url(@page) , notice: message
|
|
@@ -52,7 +58,7 @@ module Breeze
|
|
|
52
58
|
|
|
53
59
|
private
|
|
54
60
|
def set_page
|
|
55
|
-
@page = Page.find(params[:id])
|
|
61
|
+
@page = Page.find(params[:id] || params[:page_id])
|
|
56
62
|
end
|
|
57
63
|
|
|
58
64
|
end
|
|
@@ -62,7 +62,7 @@ module Breeze
|
|
|
62
62
|
def set_card_template
|
|
63
63
|
card_template = params[:card_template]
|
|
64
64
|
raise "no card template given" if card_template.blank?
|
|
65
|
-
@section.card_template
|
|
65
|
+
@section.set_card_template( card_template )
|
|
66
66
|
@section.edit_save(current_member_email)
|
|
67
67
|
redirect_to section_url(@section.id)
|
|
68
68
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module Breeze
|
|
2
2
|
class TranslationsController < BreezeController
|
|
3
|
-
before_action :set_translation, only: %i[ edit update destroy ]
|
|
3
|
+
before_action :set_translation, only: %i[ edit update destroy auto ]
|
|
4
4
|
|
|
5
5
|
# show all translation for a page
|
|
6
6
|
def show
|
|
@@ -16,6 +16,12 @@ module Breeze
|
|
|
16
16
|
def edit
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
def auto
|
|
20
|
+
@translation.auto_translate(current_member_email)
|
|
21
|
+
redirect_to(translation_path(@translation.object.page.id),
|
|
22
|
+
:notice => 'Automatically translated.')
|
|
23
|
+
end
|
|
24
|
+
|
|
19
25
|
# POST /translations
|
|
20
26
|
def create
|
|
21
27
|
@translation = Translation.new(translation_params)
|
|
@@ -30,7 +36,7 @@ module Breeze
|
|
|
30
36
|
# PATCH/PUT /translations/1
|
|
31
37
|
def update
|
|
32
38
|
respond_to do |format|
|
|
33
|
-
@translation.update(translation_params , current_member_email )
|
|
39
|
+
@translation.update(translation_params , current_member_email , true)
|
|
34
40
|
format.html {
|
|
35
41
|
redirect_to(translation_path(@translation.object.page.id),
|
|
36
42
|
:notice => 'Translation was successfully updated.')
|
|
@@ -55,5 +61,6 @@ module Breeze
|
|
|
55
61
|
def translation_params
|
|
56
62
|
params.fetch(:translation, {})
|
|
57
63
|
end
|
|
64
|
+
|
|
58
65
|
end
|
|
59
66
|
end
|
|
@@ -5,13 +5,19 @@ module Breeze
|
|
|
5
5
|
def text_for_index
|
|
6
6
|
if(section_id)
|
|
7
7
|
section = Section.find(section_id)
|
|
8
|
-
"Select image for Section #{section.index} : #{section.header}"
|
|
9
|
-
|
|
8
|
+
return "Select image for Section #{section.index} : #{section.header}"
|
|
9
|
+
end
|
|
10
|
+
if(card_id)
|
|
10
11
|
card = Card.find(card_id)
|
|
11
|
-
"Select image for Card #{card.index} : #{card.header}"
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
return "Select image for Card #{card.index} : #{card.header}"
|
|
13
|
+
end
|
|
14
|
+
if(params[:unused].nil?)
|
|
15
|
+
return "All Images"
|
|
16
|
+
end
|
|
17
|
+
if(params[:unused] == "true")
|
|
18
|
+
return "Unused Images"
|
|
14
19
|
end
|
|
20
|
+
return "Used Images"
|
|
15
21
|
end
|
|
16
22
|
|
|
17
23
|
def text_for_new
|
|
@@ -2,6 +2,31 @@ module Breeze
|
|
|
2
2
|
module ViewHelper
|
|
3
3
|
include BreezeHelper
|
|
4
4
|
|
|
5
|
+
def title
|
|
6
|
+
@page.options ? @page.options["title"] : ""
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def description
|
|
10
|
+
@page.options ? @page.options["description"] : ""
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def breeze_meta_tags
|
|
14
|
+
metas = "<title> #{title}</title>\n" +
|
|
15
|
+
"<meta name='description' content='#{description}' />" +
|
|
16
|
+
breeze_fb_tags
|
|
17
|
+
metas.html_safe
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# private, just breaking it up. Returns not safe string
|
|
21
|
+
def breeze_fb_tags
|
|
22
|
+
return "" unless @page.options
|
|
23
|
+
image = Image.find( @page.options["main_image"] )
|
|
24
|
+
return "" unless image
|
|
25
|
+
image_path = asset_path("breeze/" + image.id.to_s + "." + image.type)
|
|
26
|
+
"\n<meta property='og:image' content='http://#{Rails.application.credentials.domain_name}/#{image_path}' />" +
|
|
27
|
+
"\n<meta property='og:image:secure_url' content='#{Rails.application.credentials.domain_name}/#{image_path}' />"
|
|
28
|
+
end
|
|
29
|
+
|
|
5
30
|
def current_lang
|
|
6
31
|
params[:lang]
|
|
7
32
|
end
|
|
@@ -17,7 +42,7 @@ module Breeze
|
|
|
17
42
|
img = asset_url( section.image.asset_name )
|
|
18
43
|
style = "background-image: url('#{img}');"
|
|
19
44
|
if(section.option("fixed") == "on")
|
|
20
|
-
clazz += " bg-
|
|
45
|
+
clazz += " bg-scroll"
|
|
21
46
|
end
|
|
22
47
|
if(align = section.option("image_align"))
|
|
23
48
|
# for tailwind: bg-left-top bg-left bg-left-bottom
|
|
@@ -64,6 +89,12 @@ module Breeze
|
|
|
64
89
|
blog.sections.last
|
|
65
90
|
end
|
|
66
91
|
|
|
92
|
+
def slider_speed(section)
|
|
93
|
+
chars = section.cards.collect{|c| c.text.length}.max
|
|
94
|
+
return 500 unless chars
|
|
95
|
+
1000.0 * chars / 80.0
|
|
96
|
+
end
|
|
97
|
+
|
|
67
98
|
def last_blog
|
|
68
99
|
ViewHelper.last_blog
|
|
69
100
|
end
|