promethee 1.3.2 → 1.3.3

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.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/app/assets/stylesheets/promethee-edit/_move.sass +6 -4
  4. data/app/views/promethee/_edit.html.erb +14 -6
  5. data/app/views/promethee/components/aside/_edit.define.html.erb +14 -151
  6. data/app/views/promethee/components/aside/_icon.svg +3 -0
  7. data/app/views/promethee/components/column/_edit.define.html.erb +17 -31
  8. data/app/views/promethee/components/column/_icon.svg +3 -0
  9. data/app/views/promethee/components/cover/_edit.define.html.erb +16 -151
  10. data/app/views/promethee/components/cover/_icon.svg +3 -0
  11. data/app/views/promethee/components/image/_edit.define.html.erb +17 -149
  12. data/app/views/promethee/components/image/_icon.svg +3 -0
  13. data/app/views/promethee/components/row/_edit.define.html.erb +14 -150
  14. data/app/views/promethee/components/row/_icon.svg +3 -0
  15. data/app/views/promethee/components/slider/_edit.define.html.erb +14 -150
  16. data/app/views/promethee/components/slider/_edit.inspect.html.erb +43 -1
  17. data/app/views/promethee/components/slider/_edit.move.html.erb +6 -2
  18. data/app/views/promethee/components/slider/_icon.svg +3 -0
  19. data/app/views/promethee/components/text/_edit.define.html.erb +15 -150
  20. data/app/views/promethee/components/text/_icon.svg +3 -0
  21. data/app/views/promethee/components/video/_edit.define.html.erb +14 -29
  22. data/app/views/promethee/components/video/_icon.svg +3 -0
  23. data/app/views/promethee/edit/_move.html.erb +48 -21
  24. data/app/views/promethee/presets/_icon.image-with-text.svg +3 -0
  25. data/app/views/promethee/presets/_image-with-text.html.erb +33 -0
  26. data/app/views/promethee/utils/_summernote-config.html.erb +11 -5
  27. data/lib/promethee/rails/helper.rb +4 -0
  28. data/lib/promethee/rails/version.rb +1 -1
  29. data/vendor/assets/javascripts/ui-sortable.js +683 -0
  30. metadata +14 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9d64c7758ac9560202c0c5e3a2df6a42290bb4a
4
- data.tar.gz: 9e9b2f4dd45a864b334fae766af431d5187fe845
3
+ metadata.gz: 902ef153c7edb11dc449989cff22fe1ff9b2d4f7
4
+ data.tar.gz: 9c6f76ba43f6761d37d24bbbf613e9ae67c4df61
5
5
  SHA512:
6
- metadata.gz: 185bc919628cd9e1a86ba9c4085c01f2e0ecfa32be03203699006d92254197c61be9f1e6260f35bfeb26f27168da11c758d3e6825453ffb28a78dfb7cd3f7d16
7
- data.tar.gz: 53a3a042392290e5e179b73047749e53295cd60d8e63862ab0011a0ebc4b2e30c2e384a93b58f8e8918c1331fda7a6339fdbfcfa4baa8fa43a3e07cabdc9c11c
6
+ metadata.gz: 4ceabedc7cef16000d12a659335773f52012c867e4ac677d0b32027d93052d8ee10fa348932c9c8f15d80ae7103e6f6f1d4fcda948cd5ba5a1b4cb0578a0af2e
7
+ data.tar.gz: 404071b9638443c6c7fb9cc1e711ee90c9d7fa203687b0a569d4e88f772d5cc0068d4e8ebf2594055ca9b7357d45ea21f80e782ebade6bd4ddfd8917ca3fa5f6
data/README.md CHANGED
@@ -131,6 +131,7 @@ With javascript set:
131
131
  //= require angular-animate
132
132
  //= require angular-ui-bootstrap
133
133
  //= require angular-summernote
134
+ //= require ui-sortable
134
135
  ```
135
136
 
136
137
  With stylesheets set:
@@ -35,7 +35,7 @@
35
35
  z-index: 0
36
36
  opacity: 0.03
37
37
  .col
38
- height: 100%
38
+ height: 100%
39
39
  .color
40
40
  height: 100%
41
41
  background: black
@@ -67,7 +67,7 @@
67
67
  width: 100%
68
68
  height: 20px
69
69
  border: 1px dashed #253742
70
- transition: width .2s, height .2s, opacity .2s
70
+ transition: width .2s, height .2s, opacity .2s
71
71
  &.ui-droppable-active
72
72
  visibility: visible
73
73
  &.ui-droppable-hover
@@ -110,7 +110,8 @@
110
110
  // Except for columns, which can be dropped only on rows
111
111
  &--dragging.promethee-edit__move--dragging--column
112
112
  .promethee-edit__move__droppable
113
- display: none
113
+ &:not(&.promethee-edit__move__droppable--row--first):not(&.promethee-edit__move__droppable--row--inside-column)
114
+ transform: translateX(-100vh)
114
115
  // It's a little specific, columns can be dropped on rows "first droppable", or on columns "inside droppables"
115
116
  &.promethee-edit__move__droppable--row--first,
116
117
  &.promethee-edit__move__droppable--row--inside-column
@@ -145,16 +146,17 @@
145
146
  max-width: 300px
146
147
  z-index: 100000
147
148
  background-color: #253742
149
+ padding-top: 10px
148
150
  margin-bottom: 30px
149
151
  height: 100px
150
152
  min-width: 100px
151
- padding-top: 10px
152
153
  text-align: center
153
154
  color: white
154
155
  &__icon
155
156
  display: block
156
157
  svg
157
158
  width: 60px
159
+ height: auto
158
160
  &__name
159
161
  margin-top: -10px
160
162
  font-size: 11px
@@ -5,16 +5,21 @@ logo = File.read "#{__dir__}/../../assets/images/icon-promethee.svg"
5
5
 
6
6
  <script type="text/javascript">
7
7
  var promethee = angular
8
- .module('Promethee', ['summernote', 'ngAnimate'])
9
- .value('definitions', []);
8
+ .module('Promethee', ['summernote', 'ngAnimate', 'ui.sortable'])
9
+ .value('definitions', [])
10
+ .value('presets', []);
10
11
  </script>
11
12
 
12
13
  <% promethee_util_partials.each do |partial| %>
13
14
  <%= render partial %>
14
15
  <% end %>
15
16
 
17
+ <% promethee_preset_partials.each do |partial| %>
18
+ <%= render partial %>
19
+ <% end %>
20
+
16
21
  <script type="text/javascript">
17
- promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', function($scope, summernoteConfig) {
22
+ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', 'presets', 'identifier', function($scope, summernoteConfig, presets, identifier) {
18
23
 
19
24
  // Data (TODO use Adder and probably page definition to init)
20
25
  if ($scope.data === null || $scope.data === '') {
@@ -26,9 +31,12 @@ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', funct
26
31
  };
27
32
  }
28
33
 
34
+ $scope.identifier = identifier;
35
+
29
36
  $scope.promethee = {
30
37
  data: $scope.data,
31
38
  definitions: [],
39
+ presets: presets,
32
40
  inspected: null,
33
41
  mode: 'move',
34
42
  preview: 'desktop',
@@ -106,13 +114,13 @@ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', funct
106
114
  <li ng-click="enablePreview()" ng-class="{active: promethee.mode == 'preview'}">
107
115
  <a data-toggle="dropdown"><%= fa_icon :eye %></a>
108
116
  <ul class="dropdown-menu" ng-show="promethee.mode == 'preview'">
109
- <li ng-click="promethee.preview = 'desktop'"
117
+ <li ng-click="promethee.preview = 'desktop'"
110
118
  ng-class="{active: promethee.preview == 'desktop'}">
111
119
  <a><i class="fa fa-desktop"></i></a></li>
112
- <li ng-click="promethee.preview = 'tablet'"
120
+ <li ng-click="promethee.preview = 'tablet'"
113
121
  ng-class="{active: promethee.preview == 'tablet'}">
114
122
  <a><i class="fa fa-tablet"></i></a></li>
115
- <li ng-click="promethee.preview = 'mobile'"
123
+ <li ng-click="promethee.preview = 'mobile'"
116
124
  ng-class="{active: promethee.preview == 'mobile'}">
117
125
  <a><i class="fa fa-mobile"></i></a></li>
118
126
  </ul>
@@ -1,152 +1,15 @@
1
- <%
2
- icon = '
3
- <?xml version="1.0" encoding="utf-8"?>
4
- <!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
5
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
6
- viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
7
- <g id="Calque_10" display="none">
8
- <rect x="-1.5" y="-1.5" display="inline" fill="#76868E" width="103" height="103"/>
9
- </g>
10
- <g id="Calque_2" display="none">
11
- <rect x="18.9" y="28" display="inline" fill="none" stroke="#253742" stroke-miterlimit="10" width="62.1" height="44"/>
12
- <g display="inline">
13
- <path fill="#253742" d="M84.5,25v50h-69V25H84.5 M86.5,23h-73v54h73V23L86.5,23z"/>
14
- </g>
15
- <g display="inline">
16
- <polygon fill="#253742" points="47.2,44.6 47.2,55.4 56.3,50 "/>
17
- <g>
18
- <path fill="#253742" d="M50,41.6c4.6,0,8.4,3.8,8.4,8.4s-3.8,8.4-8.4,8.4s-8.4-3.8-8.4-8.4S45.4,41.6,50,41.6 M50,40.6
19
- c-5.2,0-9.4,4.2-9.4,9.4s4.2,9.4,9.4,9.4c5.2,0,9.4-4.2,9.4-9.4S55.2,40.6,50,40.6L50,40.6z"/>
20
- </g>
21
- </g>
22
- </g>
23
- <g id="Calque_3">
24
- <g>
25
- <g>
26
- <path fill="#FFFFFF" d="M71.4,25v50H28.6V25H71.4 M73.4,23H26.6v54h46.9V23L73.4,23z"/>
27
- </g>
28
- <g>
29
- <g>
30
- <circle fill="#FFFFFF" cx="37.8" cy="36.5" r="2"/>
31
- <line fill="none" stroke="#FFFFFF" stroke-miterlimit="10" x1="43.3" y1="36.5" x2="64.3" y2="36.5"/>
32
- </g>
33
- <g>
34
- <circle fill="#FFFFFF" cx="37.8" cy="45.5" r="2"/>
35
- <line fill="none" stroke="#FFFFFF" stroke-miterlimit="10" x1="43.3" y1="45.5" x2="64.3" y2="45.5"/>
36
- </g>
37
- <g>
38
- <circle fill="#FFFFFF" cx="37.8" cy="54.5" r="2"/>
39
- <line fill="none" stroke="#FFFFFF" stroke-miterlimit="10" x1="43.3" y1="54.5" x2="64.3" y2="54.5"/>
40
- </g>
41
- <g>
42
- <circle fill="#FFFFFF" cx="37.8" cy="63.5" r="2"/>
43
- <line fill="none" stroke="#FFFFFF" stroke-miterlimit="10" x1="43.3" y1="63.5" x2="64.3" y2="63.5"/>
44
- </g>
45
- </g>
46
- </g>
47
- </g>
48
- <g id="Calque_4" display="none">
49
- <g display="inline">
50
- <path fill="#253742" d="M63.9,20.3l10.5,11.8v47.7H25.7V20.3H63.9 M64.8,18.3H23.7v63.4h52.7V31.3L64.8,18.3L64.8,18.3z"/>
51
- </g>
52
- <g display="inline">
53
- <path fill="#253742" d="M67.9,24.3l2.4,2.4v49H29.7V24.3H67.9 M68.3,23.3H28.7v53.4h42.7V26.3L68.3,23.3L68.3,23.3z"/>
54
- </g>
55
- <polyline display="inline" fill="none" stroke="#253742" stroke-width="2" stroke-miterlimit="10" points="76.3,81.7 23.7,81.7
56
- 23.7,18.3 "/>
57
- <g display="inline">
58
- <polygon fill="#FFFFFF" points="64.3,30.3 64.3,20.7 73.9,30.3 "/>
59
- <path fill="#253742" d="M65.3,23.1l6.2,6.2h-6.2V23.1 M63.3,18.3v13h13L63.3,18.3L63.3,18.3z"/>
60
- </g>
61
- <g display="inline">
62
- <g>
63
- <path fill="#253742" d="M39.3,30.3L39.3,30.3c0.6,0,1.1,0.1,1.6,0.3c1,0.4,1.7,1.2,2.1,2.2c0.4,1,0.4,2.1-0.1,3.1
64
- c-0.6,1.4-2.1,2.4-3.7,2.4c-0.6,0-1.1-0.1-1.6-0.3c-2-0.9-2.9-3.3-2-5.3C36.3,31.2,37.8,30.3,39.3,30.3 M39.3,29.3
65
- c-1.9,0-3.7,1.1-4.6,3c-1.1,2.5,0,5.5,2.5,6.6c0.7,0.3,1.4,0.4,2,0.4c1.9,0,3.7-1.1,4.6-3c1.1-2.5,0-5.5-2.5-6.6
66
- C40.7,29.4,40,29.3,39.3,29.3L39.3,29.3z"/>
67
- </g>
68
- </g>
69
- <g display="inline">
70
- <path fill="#253742" d="M40.7,46.6L48,60.3l0.5,1l0.9-0.6L59.7,54l10.6,9.7v12.5L30,75.7l-0.1-16.5L40.7,46.6 M40.8,44.8l-12,14
71
- L29,76.7l42.4,0.6v-14L59.8,52.8l-11,7L40.8,44.8L40.8,44.8z"/>
72
- </g>
73
- </g>
74
- <g id="Calque_5" display="none">
75
- </g>
76
- <g id="Calque_6" display="none">
77
- <g display="inline">
78
- <path fill="#FFFFFF" d="M38.8,40.8c0-1.6-0.1-3.3-0.3-5.2c2.3,0.1,6.1,0.1,11.5,0.1c5.4,0,9.2,0,11.4-0.1
79
- c-0.2,1.9-0.3,3.7-0.3,5.2c0,1.4,0,2.5,0.1,3.3h-0.9c-0.2-2.1-0.5-3.7-0.8-4.7c-0.3-1-0.9-1.8-1.7-2.2c-0.8-0.5-2.1-0.7-3.7-0.7
80
- h-2.2v23.2c0,1.1,0.1,2,0.3,2.5c0.2,0.5,0.6,0.9,1.2,1.1c0.6,0.2,1.4,0.3,2.6,0.4v0.8c-1.4-0.1-3.4-0.1-6-0.1c-2.7,0-4.7,0-6,0.1
81
- v-0.8c1.2,0,2.1-0.2,2.6-0.4c0.6-0.2,0.9-0.6,1.2-1.1c0.2-0.5,0.3-1.3,0.3-2.5V36.5h-2.2c-1.7,0-2.9,0.2-3.7,0.7
82
- c-0.8,0.5-1.4,1.2-1.7,2.2c-0.3,1-0.6,2.6-0.8,4.7h-0.9C38.8,43.3,38.8,42.2,38.8,40.8z"/>
83
- </g>
84
- <polygon display="inline" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" points="63.5,23 26.6,23 26.6,77
85
- 73.4,77 73.4,32.4 "/>
86
- <polyline display="inline" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" points="62.5,23 62.5,32.4
87
- 72.4,32.4 "/>
88
- </g>
89
- <g id="Calque_7" display="none">
90
- <g display="inline">
91
- <path fill="#FFFFFF" d="M84,34v32H16V34H84 M86,32H14v36h72V32L86,32z"/>
92
- </g>
93
- <g display="inline">
94
- <g>
95
- <path fill="#FFFFFF" d="M27.8,38.7L27.8,38.7c0.6,0,1.1,0.1,1.6,0.3c1,0.4,1.7,1.2,2.1,2.2c0.4,1,0.4,2.1-0.1,3.1
96
- c-0.6,1.4-2.1,2.4-3.7,2.4c-0.6,0-1.1-0.1-1.6-0.3c-2-0.9-2.9-3.3-2-5.3C24.8,39.6,26.2,38.7,27.8,38.7 M27.8,37.7
97
- c-1.9,0-3.8,1.1-4.6,3c-1.1,2.5,0,5.5,2.5,6.6c0.7,0.3,1.4,0.4,2,0.4c1.9,0,3.8-1.1,4.6-3c1.1-2.5,0-5.5-2.5-6.6
98
- C29.2,37.9,28.5,37.7,27.8,37.7L27.8,37.7z"/>
99
- </g>
100
- </g>
101
- <polyline display="inline" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="81.2,57 62.1,51.3 49,54.8 39.5,47.3
102
- 19.2,55 "/>
103
- <path display="inline" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M75.8,65.3"/>
104
- <path display="inline" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M25.4,65"/>
105
- <g display="inline">
106
- <path fill="#FFFFFF" d="M80.7,36.5v27H19.3v-27H80.7 M81.7,35.5H18.3v29h63.3V35.5L81.7,35.5z"/>
107
- </g>
108
- </g>
109
- <g id="Calque_8" display="none">
110
- <g display="inline">
111
- <path fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M76.5,65.4"/>
112
- <rect x="29.3" y="35.3" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="41.6" height="29.5"/>
113
- <g>
114
- <path fill="#FFFFFF" d="M72.5,33.9v32.2H27.6V33.9H72.5 M74.5,31.9H25.6v36.2h48.9V31.9L74.5,31.9z"/>
115
- </g>
116
- <polyline fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" points="76.5,36.6 90.5,36.6 90.5,63.4
117
- 76.5,63.4 "/>
118
- <polyline fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" points="23.5,63.4 9.5,63.4 9.5,36.6 23.5,36.6
119
- "/>
120
- </g>
121
- </g>
122
- <g id="Calque_9" display="none">
123
- <g display="inline">
124
- <g>
125
- <g>
126
- <path fill="#FFFFFF" d="M84.5,16.5v67h-69v-67H84.5 M86.5,14.5h-73v71h73V14.5L86.5,14.5z"/>
127
- </g>
128
- <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="86.5" y1="31.5" x2="13.5" y2="31.5"/>
129
- <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="23.5" y1="23.5" x2="30.5" y2="23.5"/>
130
- <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="36.5" y1="23.5" x2="77.5" y2="23.5"/>
131
- </g>
132
- <g>
133
- <rect x="18.8" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
134
- <rect x="34.9" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
135
- <rect x="51.1" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
136
- <rect x="67.2" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
137
- </g>
138
- </g>
139
- </g>
140
- </svg>
141
-
142
- '
1
+ <%
2
+ init = <<~JAVASCRIPT
3
+ promethee.definitions.push({
4
+ name: 'Aside',
5
+ icon: #{render('promethee/components/aside/icon').to_json.html_safe},
6
+ data: {
7
+ type: 'aside',
8
+ attributes: {},
9
+ children: []
10
+ }
11
+ })
12
+ JAVASCRIPT
143
13
  %>
144
- <div ng-init="promethee.definitions.push({
145
- name: 'Aside',
146
- icon: '<%= icon %>',
147
- data: {
148
- type: 'aside',
149
- attributes: {},
150
- children: []
151
- }
152
- })"></div>
14
+
15
+ <%= content_tag :div, nil, 'ng-init': init %>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
2
+ <path fill="#FFF" d="M73.8,23 L73.9,23 L73.9,77 L27,77 L27,23 L73.8,23 Z M71.8,25 L29,25 L29,75 L71.8,75 L71.8,25 Z M38.2,38.5 C37.0954305,38.5 36.2,37.6045695 36.2,36.5 C36.2,35.3954305 37.0954305,34.5 38.2,34.5 C39.3045695,34.5 40.2,35.3954305 40.2,36.5 C40.2,37.6045695 39.3045695,38.5 38.2,38.5 Z M43.7,37 L43.7,36 L64.7,36 L64.7,37 L43.7,37 Z M38.2,47.5 C37.0954305,47.5 36.2,46.6045695 36.2,45.5 C36.2,44.3954305 37.0954305,43.5 38.2,43.5 C39.3045695,43.5 40.2,44.3954305 40.2,45.5 C40.2,46.6045695 39.3045695,47.5 38.2,47.5 Z M43.7,46 L43.7,45 L64.7,45 L64.7,46 L43.7,46 Z M38.2,56.5 C37.0954305,56.5 36.2,55.6045695 36.2,54.5 C36.2,53.3954305 37.0954305,52.5 38.2,52.5 C39.3045695,52.5 40.2,53.3954305 40.2,54.5 C40.2,55.6045695 39.3045695,56.5 38.2,56.5 Z M43.7,55 L43.7,54 L64.7,54 L64.7,55 L43.7,55 Z M38.2,65.5 C37.0954305,65.5 36.2,64.6045695 36.2,63.5 C36.2,62.3954305 37.0954305,61.5 38.2,61.5 C39.3045695,61.5 40.2,62.3954305 40.2,63.5 C40.2,64.6045695 39.3045695,65.5 38.2,65.5 Z M43.7,64 L43.7,63 L64.7,63 L64.7,64 L43.7,64 Z"/>
3
+ </svg>
@@ -1,32 +1,18 @@
1
- <%
2
- icon = '
3
- <?xml version="1.0" encoding="utf-8"?>
4
- <!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
5
- <svg version="1.1" id="Calque_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
6
- viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
7
- <rect x="18.9" y="28" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="62.1" height="44"/>
8
- <g>
9
- <path fill="#FFFFFF" d="M84.5,25v50h-69V25H84.5 M86.5,23h-73v54h73V23L86.5,23z"/>
10
- </g>
11
- <g>
12
- <polygon fill="#FFFFFF" points="47.2,44.6 47.2,55.4 56.3,50 "/>
13
- <g>
14
- <path fill="#FFFFFF" d="M50,41.6c4.6,0,8.4,3.8,8.4,8.4s-3.8,8.4-8.4,8.4s-8.4-3.8-8.4-8.4S45.4,41.6,50,41.6 M50,40.6
15
- c-5.2,0-9.4,4.2-9.4,9.4s4.2,9.4,9.4,9.4c5.2,0,9.4-4.2,9.4-9.4S55.2,40.6,50,40.6L50,40.6z"/>
16
- </g>
17
- </g>
18
- </svg>
19
- '
1
+ <%
2
+ init = <<~JAVASCRIPT
3
+ promethee.definitions.push({
4
+ name: 'Column',
5
+ icon: #{render('promethee/components/column/icon').to_json.html_safe},
6
+ data: {
7
+ type: 'column',
8
+ attributes: {
9
+ size: 4,
10
+ offset: 0
11
+ },
12
+ children: []
13
+ }
14
+ })
15
+ JAVASCRIPT
20
16
  %>
21
- <div ng-init="promethee.definitions.push({
22
- name: 'Column',
23
- icon: '<%= icon %>',
24
- data: {
25
- type: 'column',
26
- attributes: {
27
- size: 4,
28
- offset: 0
29
- },
30
- children: []
31
- }
32
- })"></div>
17
+
18
+ <%= content_tag :div, nil, 'ng-init': init %>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
2
+ <path fill="#FFF" d="M82,27.5 L82,72.5 L18.9,72.5 L18.9,27.5 L82,27.5 Z M19.9,28.5 L19.9,71.5 L81,71.5 L81,28.5 L19.9,28.5 Z M87,23 L87,77 L14,77 L14,23 L87,23 Z M85,25 L16,25 L16,75 L85,75 L85,25 Z M50.5,40.6 C45.3,40.6 41.1,44.8 41.1,50 C41.1,55.2 45.3,59.4 50.5,59.4 C55.7,59.4 59.9,55.2 59.9,50 C59.9,44.8 55.7,40.6 50.5,40.6 L50.5,40.6 Z M50.5,41.6 C55.1,41.6 58.9,45.4 58.9,50 C58.9,54.6 55.1,58.4 50.5,58.4 C45.9,58.4 42.1,54.6 42.1,50 C42.1,45.4 45.9,41.6 50.5,41.6 L50.5,41.6 Z M47.7,44.6 L47.7,55.4 L56.8,50 L47.7,44.6 Z"/>
3
+ </svg>
@@ -1,152 +1,17 @@
1
- <%
2
- icon = '
3
- <?xml version="1.0" encoding="utf-8"?>
4
- <!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
5
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
6
- viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
7
- <g id="Calque_10" display="none">
8
- <rect x="-1.5" y="-1.5" display="inline" fill="#76868E" width="103" height="103"/>
9
- </g>
10
- <g id="Calque_2" display="none">
11
- <rect x="18.9" y="28" display="inline" fill="none" stroke="#253742" stroke-miterlimit="10" width="62.1" height="44"/>
12
- <g display="inline">
13
- <path fill="#253742" d="M84.5,25v50h-69V25H84.5 M86.5,23h-73v54h73V23L86.5,23z"/>
14
- </g>
15
- <g display="inline">
16
- <polygon fill="#253742" points="47.2,44.6 47.2,55.4 56.3,50 "/>
17
- <g>
18
- <path fill="#253742" d="M50,41.6c4.6,0,8.4,3.8,8.4,8.4s-3.8,8.4-8.4,8.4s-8.4-3.8-8.4-8.4S45.4,41.6,50,41.6 M50,40.6
19
- c-5.2,0-9.4,4.2-9.4,9.4s4.2,9.4,9.4,9.4c5.2,0,9.4-4.2,9.4-9.4S55.2,40.6,50,40.6L50,40.6z"/>
20
- </g>
21
- </g>
22
- </g>
23
- <g id="Calque_3" display="none">
24
- <g display="inline">
25
- <g>
26
- <path fill="#253742" d="M71.4,25v50H28.6V25H71.4 M73.4,23H26.6v54h46.9V23L73.4,23z"/>
27
- </g>
28
- <g>
29
- <g>
30
- <circle fill="#253742" cx="37.8" cy="36.5" r="2"/>
31
- <line fill="none" stroke="#253742" stroke-miterlimit="10" x1="43.3" y1="36.5" x2="64.3" y2="36.5"/>
32
- </g>
33
- <g>
34
- <circle fill="#253742" cx="37.8" cy="45.5" r="2"/>
35
- <line fill="none" stroke="#253742" stroke-miterlimit="10" x1="43.3" y1="45.5" x2="64.3" y2="45.5"/>
36
- </g>
37
- <g>
38
- <circle fill="#253742" cx="37.8" cy="54.5" r="2"/>
39
- <line fill="none" stroke="#253742" stroke-miterlimit="10" x1="43.3" y1="54.5" x2="64.3" y2="54.5"/>
40
- </g>
41
- <g>
42
- <circle fill="#253742" cx="37.8" cy="63.5" r="2"/>
43
- <line fill="none" stroke="#253742" stroke-miterlimit="10" x1="43.3" y1="63.5" x2="64.3" y2="63.5"/>
44
- </g>
45
- </g>
46
- </g>
47
- </g>
48
- <g id="Calque_4" display="none">
49
- <g display="inline">
50
- <path fill="#253742" d="M63.9,20.3l10.5,11.8v47.7H25.7V20.3H63.9 M64.8,18.3H23.7v63.4h52.7V31.3L64.8,18.3L64.8,18.3z"/>
51
- </g>
52
- <g display="inline">
53
- <path fill="#253742" d="M67.9,24.3l2.4,2.4v49H29.7V24.3H67.9 M68.3,23.3H28.7v53.4h42.7V26.3L68.3,23.3L68.3,23.3z"/>
54
- </g>
55
- <polyline display="inline" fill="none" stroke="#253742" stroke-width="2" stroke-miterlimit="10" points="76.3,81.7 23.7,81.7
56
- 23.7,18.3 "/>
57
- <g display="inline">
58
- <polygon fill="#FFFFFF" points="64.3,30.3 64.3,20.7 73.9,30.3 "/>
59
- <path fill="#253742" d="M65.3,23.1l6.2,6.2h-6.2V23.1 M63.3,18.3v13h13L63.3,18.3L63.3,18.3z"/>
60
- </g>
61
- <g display="inline">
62
- <g>
63
- <path fill="#253742" d="M39.3,30.3L39.3,30.3c0.6,0,1.1,0.1,1.6,0.3c1,0.4,1.7,1.2,2.1,2.2c0.4,1,0.4,2.1-0.1,3.1
64
- c-0.6,1.4-2.1,2.4-3.7,2.4c-0.6,0-1.1-0.1-1.6-0.3c-2-0.9-2.9-3.3-2-5.3C36.3,31.2,37.8,30.3,39.3,30.3 M39.3,29.3
65
- c-1.9,0-3.7,1.1-4.6,3c-1.1,2.5,0,5.5,2.5,6.6c0.7,0.3,1.4,0.4,2,0.4c1.9,0,3.7-1.1,4.6-3c1.1-2.5,0-5.5-2.5-6.6
66
- C40.7,29.4,40,29.3,39.3,29.3L39.3,29.3z"/>
67
- </g>
68
- </g>
69
- <g display="inline">
70
- <path fill="#253742" d="M40.7,46.6L48,60.3l0.5,1l0.9-0.6L59.7,54l10.6,9.7v12.5L30,75.7l-0.1-16.5L40.7,46.6 M40.8,44.8l-12,14
71
- L29,76.7l42.4,0.6v-14L59.8,52.8l-11,7L40.8,44.8L40.8,44.8z"/>
72
- </g>
73
- </g>
74
- <g id="Calque_5" display="none">
75
- </g>
76
- <g id="Calque_6" display="none">
77
- <g display="inline">
78
- <path fill="#253742" d="M38.8,40.8c0-1.6-0.1-3.3-0.3-5.2c2.3,0.1,6.1,0.1,11.5,0.1c5.4,0,9.2,0,11.4-0.1
79
- c-0.2,1.9-0.3,3.7-0.3,5.2c0,1.4,0,2.5,0.1,3.3h-0.9c-0.2-2.1-0.5-3.7-0.8-4.7c-0.3-1-0.9-1.8-1.7-2.2c-0.8-0.5-2.1-0.7-3.7-0.7
80
- h-2.2v23.2c0,1.1,0.1,2,0.3,2.5c0.2,0.5,0.6,0.9,1.2,1.1c0.6,0.2,1.4,0.3,2.6,0.4v0.8c-1.4-0.1-3.4-0.1-6-0.1c-2.7,0-4.7,0-6,0.1
81
- v-0.8c1.2,0,2.1-0.2,2.6-0.4c0.6-0.2,0.9-0.6,1.2-1.1c0.2-0.5,0.3-1.3,0.3-2.5V36.5h-2.2c-1.7,0-2.9,0.2-3.7,0.7
82
- c-0.8,0.5-1.4,1.2-1.7,2.2c-0.3,1-0.6,2.6-0.8,4.7h-0.9C38.8,43.3,38.8,42.2,38.8,40.8z"/>
83
- </g>
84
- <polygon display="inline" fill="none" stroke="#253742" stroke-width="2" stroke-miterlimit="10" points="63.5,23 26.6,23 26.6,77
85
- 73.4,77 73.4,32.4 "/>
86
- <polyline display="inline" fill="none" stroke="#253742" stroke-width="2" stroke-miterlimit="10" points="62.5,23 62.5,32.4
87
- 72.4,32.4 "/>
88
- </g>
89
- <g id="Calque_7">
90
- <g>
91
- <path fill="#FFFFFF" d="M84,34v32H16V34H84 M86,32H14v36h72V32L86,32z"/>
92
- </g>
93
- <g>
94
- <g>
95
- <path fill="#FFFFFF" d="M27.8,38.7L27.8,38.7c0.6,0,1.1,0.1,1.6,0.3c1,0.4,1.7,1.2,2.1,2.2c0.4,1,0.4,2.1-0.1,3.1
96
- c-0.6,1.4-2.1,2.4-3.7,2.4c-0.6,0-1.1-0.1-1.6-0.3c-2-0.9-2.9-3.3-2-5.3C24.8,39.6,26.2,38.7,27.8,38.7 M27.8,37.7
97
- c-1.9,0-3.8,1.1-4.6,3c-1.1,2.5,0,5.5,2.5,6.6c0.7,0.3,1.4,0.4,2,0.4c1.9,0,3.8-1.1,4.6-3c1.1-2.5,0-5.5-2.5-6.6
98
- C29.2,37.9,28.5,37.7,27.8,37.7L27.8,37.7z"/>
99
- </g>
100
- </g>
101
- <polyline fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="81.2,57 62.1,51.3 49,54.8 39.5,47.3 19.2,55 "/>
102
- <path fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M75.8,65.3"/>
103
- <path fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M25.4,65"/>
104
- <g>
105
- <path fill="#FFFFFF" d="M80.7,36.5v27H19.3v-27H80.7 M81.7,35.5H18.3v29h63.3V35.5L81.7,35.5z"/>
106
- </g>
107
- </g>
108
- <g id="Calque_8" display="none">
109
- <g display="inline">
110
- <path fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M76.5,65.4"/>
111
- <rect x="29.3" y="35.3" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="41.6" height="29.5"/>
112
- <g>
113
- <path fill="#FFFFFF" d="M72.5,33.9v32.2H27.6V33.9H72.5 M74.5,31.9H25.6v36.2h48.9V31.9L74.5,31.9z"/>
114
- </g>
115
- <polyline fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" points="76.5,36.6 90.5,36.6 90.5,63.4
116
- 76.5,63.4 "/>
117
- <polyline fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" points="23.5,63.4 9.5,63.4 9.5,36.6 23.5,36.6
118
- "/>
119
- </g>
120
- </g>
121
- <g id="Calque_9" display="none">
122
- <g display="inline">
123
- <g>
124
- <g>
125
- <path fill="#FFFFFF" d="M84.5,16.5v67h-69v-67H84.5 M86.5,14.5h-73v71h73V14.5L86.5,14.5z"/>
126
- </g>
127
- <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="86.5" y1="31.5" x2="13.5" y2="31.5"/>
128
- <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="23.5" y1="23.5" x2="30.5" y2="23.5"/>
129
- <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" x1="36.5" y1="23.5" x2="77.5" y2="23.5"/>
130
- </g>
131
- <g>
132
- <rect x="18.8" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
133
- <rect x="34.9" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
134
- <rect x="51.1" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
135
- <rect x="67.2" y="40" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" width="14" height="38"/>
136
- </g>
137
- </g>
138
- </g>
139
- </svg>
140
- '
1
+ <%
2
+ init = <<~JAVASCRIPT
3
+ promethee.definitions.push({
4
+ name: 'Cover',
5
+ icon: #{render('promethee/components/cover/icon').to_json.html_safe},
6
+ data: {
7
+ type: 'cover',
8
+ attributes: {
9
+ src: 'https://picsum.photos/1920/1080/?random',
10
+ body: ''
11
+ }
12
+ }
13
+ })
14
+ JAVASCRIPT
141
15
  %>
142
- <div ng-init="promethee.definitions.push({
143
- name: 'Cover',
144
- icon: '<%= icon %>',
145
- data: {
146
- type: 'cover',
147
- attributes: {
148
- src: 'https://picsum.photos/1920/1080/?random',
149
- body: ''
150
- }
151
- }
152
- })"></div>
16
+
17
+ <%= content_tag :div, nil, 'ng-init': init %>