spina 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spina might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +16 -4
- data/app/assets/fonts/spina/ics_spina.eot +0 -0
- data/app/assets/fonts/spina/ics_spina.svg +356 -0
- data/app/assets/fonts/spina/ics_spina.ttf +0 -0
- data/app/assets/fonts/spina/ics_spina.woff +0 -0
- data/app/assets/icons/spina/barchart.svg +10 -0
- data/app/assets/icons/spina/bars.svg +1 -0
- data/app/assets/icons/spina/bold.svg +1 -0
- data/app/assets/icons/spina/brush.svg +10 -0
- data/app/assets/icons/spina/camera.svg +10 -0
- data/app/assets/icons/spina/caret-down.svg +1 -0
- data/app/assets/icons/spina/caret-left.svg +1 -0
- data/app/assets/icons/spina/caret-right.svg +1 -0
- data/app/assets/icons/spina/caret-up.svg +1 -0
- data/app/assets/icons/spina/cart.svg +10 -0
- data/app/assets/icons/spina/chart-outline.svg +10 -0
- data/app/assets/icons/spina/check.svg +10 -0
- data/app/assets/icons/spina/chevron-down.svg +1 -0
- data/app/assets/icons/spina/chevron-left.svg +1 -0
- data/app/assets/icons/spina/chevron-right.svg +1 -0
- data/app/assets/icons/spina/chevron-up.svg +1 -0
- data/app/assets/icons/spina/code.svg +1 -0
- data/app/assets/icons/spina/cog-outline.svg +10 -0
- data/app/assets/icons/spina/cog.svg +10 -0
- data/app/assets/icons/spina/comment.svg +1 -0
- data/app/assets/icons/spina/cross.svg +10 -0
- data/app/assets/icons/spina/customer-outline.svg +10 -0
- data/app/assets/icons/spina/document.svg +10 -0
- data/app/assets/icons/spina/dots.svg +10 -0
- data/app/assets/icons/spina/exclamation.svg +13 -0
- data/app/assets/icons/spina/eye.svg +1 -0
- data/app/assets/icons/spina/filter.svg +10 -0
- data/app/assets/icons/spina/home.svg +1 -0
- data/app/assets/icons/spina/image.svg +10 -0
- data/app/assets/icons/spina/inbox-outline.svg +10 -0
- data/app/assets/icons/spina/info.svg +13 -0
- data/app/assets/icons/spina/italic.svg +1 -0
- data/app/assets/icons/spina/large-check.svg +10 -0
- data/app/assets/icons/spina/link.svg +1 -0
- data/app/assets/icons/spina/list-ul.svg +1 -0
- data/app/assets/icons/spina/mail-outline.svg +10 -0
- data/app/assets/icons/spina/mail.svg +10 -0
- data/app/assets/icons/spina/media-library.svg +10 -0
- data/app/assets/icons/spina/megaphone.svg +10 -0
- data/app/assets/icons/spina/min.svg +14 -0
- data/app/assets/icons/spina/pages.svg +10 -0
- data/app/assets/icons/spina/pencil-outline.svg +10 -0
- data/app/assets/icons/spina/pencil.svg +16 -0
- data/app/assets/icons/spina/picture-o.svg +1 -0
- data/app/assets/icons/spina/plus.svg +10 -0
- data/app/assets/icons/spina/power-off.svg +10 -0
- data/app/assets/icons/spina/preview/icons_spina-preview.html +1043 -0
- data/app/assets/icons/spina/preview/ics_spina-preview.html +1043 -0
- data/app/assets/icons/spina/preview.svg +10 -0
- data/app/assets/icons/spina/product-outline.svg +10 -0
- data/app/assets/icons/spina/random.svg +10 -0
- data/app/assets/icons/spina/refresh.svg +13 -0
- data/app/assets/icons/spina/search.svg +10 -0
- data/app/assets/icons/spina/shop.svg +12 -0
- data/app/assets/icons/spina/social-outline.svg +10 -0
- data/app/assets/icons/spina/trash.svg +10 -0
- data/app/assets/icons/spina/upload-outline.svg +14 -0
- data/app/assets/icons/spina/users-outline.svg +10 -0
- data/app/assets/images/spina/arrow-left.png +0 -0
- data/app/assets/images/spina/arrow-right.png +0 -0
- data/app/assets/images/spina/danger-zone-ribbon.png +0 -0
- data/app/assets/images/spina/datepicker.png +0 -0
- data/app/assets/images/spina/divider.png +0 -0
- data/app/assets/images/spina/marker.png +0 -0
- data/app/assets/images/spina/mask.png +0 -0
- data/app/assets/images/spina/spina.png +0 -0
- data/app/assets/images/spina/spina_small.png +0 -0
- data/app/assets/images/spina/wheel.png +0 -0
- data/app/assets/javascripts/spina/admin/{account.js.coffee → account.coffee} +0 -0
- data/app/assets/javascripts/spina/admin/application.coffee.erb +152 -0
- data/app/assets/javascripts/spina/admin/{confirm_delete.js.coffee.erb → confirm_delete.coffee.erb} +0 -0
- data/app/assets/javascripts/spina/admin/dropdown.coffee +75 -0
- data/app/assets/javascripts/spina/admin/forms.coffee +7 -0
- data/app/assets/javascripts/spina/admin/galleryselect.coffee +20 -0
- data/app/assets/javascripts/spina/admin/{spina.infinite_scroll.coffee → infinite_scroll.coffee} +1 -0
- data/app/assets/javascripts/spina/admin/modal.coffee +54 -0
- data/app/assets/javascripts/spina/admin/navigation.coffee +38 -0
- data/app/assets/javascripts/spina/admin/notifications.coffee +7 -0
- data/app/assets/javascripts/spina/admin/{pages.js.coffee.erb → pages.coffee.erb} +11 -2
- data/app/assets/javascripts/spina/admin/switch.coffee +43 -0
- data/app/assets/javascripts/spina/admin/tabs.coffee +13 -0
- data/app/assets/javascripts/spina/admin/{spina.trix.js.coffee.erb → trix.coffee.erb} +26 -25
- data/app/assets/javascripts/spina/admin/uploads.coffee +35 -0
- data/app/assets/stylesheets/spina/_admin_editing.sass +25 -0
- data/app/assets/stylesheets/spina/_buttons.sass +367 -0
- data/app/assets/stylesheets/spina/_cards.sass +54 -0
- data/app/assets/stylesheets/spina/_configuration.sass +15 -0
- data/app/assets/stylesheets/spina/_custom_animations.sass +61 -0
- data/app/assets/stylesheets/spina/_farbtastic.sass +37 -0
- data/app/assets/stylesheets/spina/_fonts.sass +18 -0
- data/app/assets/stylesheets/spina/_forms.sass +806 -0
- data/app/assets/stylesheets/spina/_gallery.sass +249 -0
- data/app/assets/stylesheets/spina/_ics_spina.scss +60 -0
- data/app/assets/stylesheets/spina/_labels.sass +30 -0
- data/app/assets/stylesheets/spina/_login.sass +46 -0
- data/app/assets/stylesheets/spina/_modal.sass +162 -0
- data/app/assets/stylesheets/spina/_notifications.sass +62 -0
- data/app/assets/stylesheets/spina/_sortable_lists.sass +177 -0
- data/app/assets/stylesheets/spina/_tables.sass +301 -0
- data/app/assets/stylesheets/spina/_trix.sass +99 -0
- data/app/assets/stylesheets/spina/_wizard.sass +122 -0
- data/app/assets/stylesheets/spina/_wysihtml5.sass +79 -0
- data/app/assets/stylesheets/spina/application.sass +0 -1
- data/app/assets/stylesheets/spina/wysihtml5_textarea.sass +14 -0
- data/app/assets/stylesheets/spina.sass +564 -0
- data/app/controllers/concerns/spina/frontend.rb +59 -0
- data/app/controllers/spina/admin/navigations_controller.rb +60 -0
- data/app/controllers/spina/admin/pages_controller.rb +7 -6
- data/app/controllers/spina/admin/photos_controller.rb +18 -7
- data/app/controllers/spina/application_controller.rb +2 -2
- data/app/controllers/spina/pages_controller.rb +4 -49
- data/app/helpers/spina/admin/pages_helper.rb +12 -7
- data/app/helpers/spina/application_helper.rb +0 -29
- data/app/models/concerns/spina/part.rb +1 -1
- data/app/models/spina/navigation.rb +11 -0
- data/app/models/spina/navigation_item.rb +17 -0
- data/app/models/spina/page.rb +11 -0
- data/app/models/spina/page_part.rb +1 -1
- data/app/models/spina/photo_collection.rb +6 -1
- data/app/models/spina/structure.rb +4 -0
- data/app/models/spina/structure_item.rb +5 -1
- data/app/models/spina/structure_part.rb +16 -3
- data/app/views/layouts/spina/admin/admin.html.haml +8 -1
- data/app/views/layouts/spina/admin/pages.html.haml +30 -0
- data/app/views/spina/admin/accounts/_form.html.haml +1 -1
- data/app/views/spina/admin/accounts/analytics.html.haml +1 -1
- data/app/views/spina/admin/accounts/social.html.haml +1 -1
- data/app/views/spina/admin/accounts/style.html.haml +1 -1
- data/app/views/spina/admin/navigations/_navigation_item_nested_list.html.haml +7 -0
- data/app/views/spina/admin/navigations/_page.html.haml +8 -0
- data/app/views/spina/admin/navigations/edit.html.haml +22 -0
- data/app/views/spina/admin/navigations/show.html.haml +7 -0
- data/app/views/spina/admin/page_partables/attachment_collections/_form.html.haml +1 -1
- data/app/views/spina/admin/page_partables/attachments/_form.html.haml +1 -1
- data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +1 -1
- data/app/views/spina/admin/page_partables/photos/_form.html.haml +1 -1
- data/app/views/spina/admin/page_partables/structures/_form.html.haml +1 -1
- data/app/views/spina/admin/pages/_form.html.haml +12 -5
- data/app/views/spina/admin/pages/_page.html.haml +12 -18
- data/app/views/spina/admin/pages/_page_nested_list.html.haml +7 -0
- data/app/views/spina/admin/pages/create.js.coffee +0 -0
- data/app/views/spina/admin/pages/index.html.haml +24 -42
- data/app/views/spina/admin/pages/update.js.coffee +1 -3
- data/app/views/spina/admin/photos/_photo.html.haml +2 -0
- data/app/views/spina/admin/photos/_photo_collection_select.html.haml +1 -1
- data/app/views/spina/admin/photos/_photo_select.html.haml +2 -2
- data/app/views/spina/admin/photos/_wysihtml5_select.html.haml +1 -1
- data/app/views/spina/admin/photos/create_multiple.js.erb +4 -0
- data/app/views/spina/admin/photos/index.html.haml +1 -1
- data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +1 -1
- data/app/views/spina/admin/sessions/new.html.haml +8 -5
- data/app/views/spina/admin/shared/_notifications.html.haml +3 -1
- data/app/views/spina/admin/shared/_primary_navigation.html.haml +4 -3
- data/app/views/spina/admin/shared/_rich_text_field.html.haml +16 -16
- data/app/views/spina/admin/structure_items/_fields.html.haml +7 -8
- data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +14 -0
- data/app/views/spina/admin/structure_partables/photos/_form.html.haml +1 -1
- data/app/views/spina/shared/_google_site_verification.html.haml +1 -0
- data/config/fontcustom.yml +95 -0
- data/config/locales/en.yml +11 -0
- data/config/locales/nl.yml +13 -3
- data/config/locales/pt-BR.yml +11 -1
- data/config/routes.rb +14 -8
- data/db/migrate/1_create_spina_tables.rb +0 -7
- data/db/migrate/2_create_spina_translation_tables.rb +26 -7
- data/db/migrate/3_create_spina_navigations.rb +21 -0
- data/lib/generators/spina/templates/config/initializers/carrierwave.rb +1 -1
- data/lib/spina/engine.rb +1 -2
- data/lib/spina/fontcustom/_ics_spina.scss +5 -0
- data/lib/spina/version.rb +1 -1
- data/lib/spina.rb +3 -1
- metadata +146 -45
- data/app/assets/images/spina/admin/logo@2x.png +0 -0
- data/app/assets/javascripts/spina/admin/application.js +0 -10
- data/app/assets/javascripts/spina/admin/spina.scaffold.coffee +0 -15
- data/app/assets/javascripts/spina/application.js +0 -15
- data/app/assets/stylesheets/spina/_mixins.scss +0 -34
@@ -0,0 +1,79 @@
|
|
1
|
+
textarea.wysihtml5
|
2
|
+
font-size: 14px
|
3
|
+
height: 225px
|
4
|
+
padding-top: 50px
|
5
|
+
padding-right: 125px
|
6
|
+
resize: none
|
7
|
+
|
8
|
+
&:focus
|
9
|
+
border: 1px solid $primary-color
|
10
|
+
|
11
|
+
.wysihtml5-container
|
12
|
+
overflow: hidden
|
13
|
+
position: relative
|
14
|
+
|
15
|
+
.toolbar
|
16
|
+
border-bottom: 1px solid #e9e9e9
|
17
|
+
top: 1px
|
18
|
+
left: 1px
|
19
|
+
line-height: 40px
|
20
|
+
position: absolute
|
21
|
+
width: 100%
|
22
|
+
|
23
|
+
a.command
|
24
|
+
border-right: 1px solid #e9e9e9
|
25
|
+
color: #999
|
26
|
+
display: block
|
27
|
+
float: left
|
28
|
+
height: 40px
|
29
|
+
text-align: center
|
30
|
+
width: 40px
|
31
|
+
|
32
|
+
a.command i
|
33
|
+
vertical-align: middle
|
34
|
+
|
35
|
+
a.command i:before
|
36
|
+
line-height: 40px
|
37
|
+
|
38
|
+
a.wysihtml5-command-active, a.command:hover
|
39
|
+
color: #333
|
40
|
+
|
41
|
+
.command-bold, .command-italic, .command-insert-unordered-list, .command-link, .action-change-view
|
42
|
+
font-size: 12px
|
43
|
+
line-height: 43px
|
44
|
+
|
45
|
+
.command.action-change-view
|
46
|
+
border: none
|
47
|
+
float: right
|
48
|
+
|
49
|
+
.choose-text-type
|
50
|
+
border-left: 1px solid #e9e9e9
|
51
|
+
display: none
|
52
|
+
height: 183px
|
53
|
+
padding-top: 6px
|
54
|
+
position: absolute
|
55
|
+
right: 0
|
56
|
+
top: 40px
|
57
|
+
width: 115px
|
58
|
+
|
59
|
+
a
|
60
|
+
color: #999
|
61
|
+
display: block
|
62
|
+
line-height: 40px
|
63
|
+
padding: 0 16px
|
64
|
+
|
65
|
+
a:hover
|
66
|
+
color: #333
|
67
|
+
|
68
|
+
ul li a
|
69
|
+
color: #999
|
70
|
+
line-height: 30px
|
71
|
+
text-align: left
|
72
|
+
|
73
|
+
&.wysihtml5-command-active
|
74
|
+
color: $primary-color
|
75
|
+
|
76
|
+
&.wysihtml5-command-active:hover
|
77
|
+
background: none
|
78
|
+
color: $primary-color
|
79
|
+
cursor: default
|
@@ -0,0 +1,564 @@
|
|
1
|
+
// Frameworks
|
2
|
+
@import bourbon
|
3
|
+
@import neat
|
4
|
+
|
5
|
+
// Configuration
|
6
|
+
@import spina/configuration
|
7
|
+
|
8
|
+
// Normalizing
|
9
|
+
@import spina/normalize
|
10
|
+
|
11
|
+
// Icons
|
12
|
+
@import spina/ics_spina
|
13
|
+
@import spina/fonts
|
14
|
+
|
15
|
+
// Animations
|
16
|
+
@import spina/animate
|
17
|
+
@import spina/custom_animations
|
18
|
+
|
19
|
+
// Elements
|
20
|
+
@import spina/forms
|
21
|
+
@import spina/tables
|
22
|
+
@import spina/buttons
|
23
|
+
@import spina/labels
|
24
|
+
@import spina/modal
|
25
|
+
@import spina/sortable_lists
|
26
|
+
@import spina/gallery
|
27
|
+
@import spina/login
|
28
|
+
@import spina/cards
|
29
|
+
@import spina/trix
|
30
|
+
@import spina/wizard
|
31
|
+
@import spina/notifications
|
32
|
+
|
33
|
+
// Plugins
|
34
|
+
@import spina/morris
|
35
|
+
@import spina/wysihtml5
|
36
|
+
@import spina/farbtastic
|
37
|
+
|
38
|
+
html
|
39
|
+
box-sizing: border-box
|
40
|
+
min-height: 100%
|
41
|
+
|
42
|
+
*, *:before, *:after
|
43
|
+
box-sizing: inherit
|
44
|
+
|
45
|
+
html, body
|
46
|
+
height: 100%
|
47
|
+
font-family: $font-family
|
48
|
+
-webkit-font-smoothing: antialiased
|
49
|
+
|
50
|
+
body
|
51
|
+
background: #f5f5fa
|
52
|
+
min-width: 1024px
|
53
|
+
|
54
|
+
// Primary navigation
|
55
|
+
nav#primary
|
56
|
+
height: 100%
|
57
|
+
overflow: hidden
|
58
|
+
position: fixed
|
59
|
+
width: 300px
|
60
|
+
z-index: 5
|
61
|
+
@include linear-gradient(#3b3f74, #7a76ad)
|
62
|
+
|
63
|
+
& > ul
|
64
|
+
height: 100%
|
65
|
+
padding-top: 12px
|
66
|
+
position: relative
|
67
|
+
width: 100%
|
68
|
+
|
69
|
+
ul li
|
70
|
+
display: block
|
71
|
+
|
72
|
+
ul li.bottom
|
73
|
+
bottom: 10px
|
74
|
+
position: absolute
|
75
|
+
|
76
|
+
ul li a
|
77
|
+
color: #f5f5fa
|
78
|
+
display: block
|
79
|
+
font-size: 15px
|
80
|
+
font-weight: 600
|
81
|
+
line-height: 54px
|
82
|
+
opacity: .5
|
83
|
+
outline: none
|
84
|
+
padding: 0 20px
|
85
|
+
position: relative
|
86
|
+
|
87
|
+
&:hover
|
88
|
+
opacity: 1
|
89
|
+
|
90
|
+
.icon
|
91
|
+
font-size: 26px
|
92
|
+
margin-left: 5px
|
93
|
+
margin-right: 11px
|
94
|
+
|
95
|
+
.icon-caret-right
|
96
|
+
font-size: 18px
|
97
|
+
position: absolute
|
98
|
+
right: 10px
|
99
|
+
|
100
|
+
.icon-home
|
101
|
+
font-size: 32px
|
102
|
+
margin-left: 2px
|
103
|
+
margin-right: 8px
|
104
|
+
|
105
|
+
ul li.active > a
|
106
|
+
opacity: 1
|
107
|
+
|
108
|
+
ul li ul
|
109
|
+
bottom: 0
|
110
|
+
left: 80px
|
111
|
+
padding-top: 20px
|
112
|
+
position: absolute
|
113
|
+
top: 0
|
114
|
+
width: calc(100% - 80px)
|
115
|
+
z-index: 1
|
116
|
+
@include linear-gradient(#3b3f74, #7a76ad)
|
117
|
+
@include transform(translateX(100%))
|
118
|
+
|
119
|
+
li a
|
120
|
+
line-height: 40px
|
121
|
+
|
122
|
+
ul li ul li a.back-to-main-menu
|
123
|
+
font-size: 13px
|
124
|
+
font-weight: 700
|
125
|
+
opacity: .25
|
126
|
+
text-transform: uppercase
|
127
|
+
|
128
|
+
.icon
|
129
|
+
font-size: 16px
|
130
|
+
margin: -2px 0 0 -2px
|
131
|
+
|
132
|
+
&:hover
|
133
|
+
opacity: .5
|
134
|
+
|
135
|
+
ul li ul li
|
136
|
+
position: relative
|
137
|
+
|
138
|
+
ul li ul li[data-badge]:after
|
139
|
+
background: rgba(255, 255, 255, .4)
|
140
|
+
border-radius: 9px
|
141
|
+
color: #3b3f74
|
142
|
+
content: attr(data-badge)
|
143
|
+
display: block
|
144
|
+
font-size: 12px
|
145
|
+
font-weight: 600
|
146
|
+
height: 18px
|
147
|
+
line-height: 18px
|
148
|
+
min-width: 24px
|
149
|
+
padding: 0 8px
|
150
|
+
position: absolute
|
151
|
+
right: 20px
|
152
|
+
text-align: center
|
153
|
+
top: 50%
|
154
|
+
vertical-align: middle
|
155
|
+
z-index: 1
|
156
|
+
@include transform(translateY(-50%))
|
157
|
+
|
158
|
+
ul li ul li[data-badge] a
|
159
|
+
z-index: 2
|
160
|
+
|
161
|
+
ul li ul li.active[data-badge], ul li ul li:hover[data-badge]
|
162
|
+
&:after
|
163
|
+
background: rgba(255, 255, 255, .9)
|
164
|
+
|
165
|
+
&.animated > ul
|
166
|
+
@include transition(background .3s ease)
|
167
|
+
|
168
|
+
& > li > a
|
169
|
+
@include transition(all .3s ease)
|
170
|
+
|
171
|
+
.icon
|
172
|
+
@include transition(all .3s ease)
|
173
|
+
|
174
|
+
li.active ul
|
175
|
+
@include transition(all .3s ease)
|
176
|
+
|
177
|
+
&.transformed > ul
|
178
|
+
background: rgba(0, 0, 0, .4)
|
179
|
+
|
180
|
+
& > li > a
|
181
|
+
color: transparent
|
182
|
+
@include transform(translateX(-10px))
|
183
|
+
|
184
|
+
.icon
|
185
|
+
color: #f5f5fa
|
186
|
+
@include transform(translateX(10px))
|
187
|
+
|
188
|
+
li.active ul
|
189
|
+
@include transform(translateX(0%))
|
190
|
+
|
191
|
+
// Secondary navigation
|
192
|
+
nav#secondary
|
193
|
+
margin-bottom: -30px
|
194
|
+
margin-top: 20px
|
195
|
+
|
196
|
+
ul li
|
197
|
+
display: inline
|
198
|
+
|
199
|
+
ul li a
|
200
|
+
color: #4b4b4d
|
201
|
+
display: inline-block
|
202
|
+
font-size: 12px
|
203
|
+
font-weight: 700
|
204
|
+
line-height: 34px
|
205
|
+
opacity: .5
|
206
|
+
outline: none
|
207
|
+
padding: 0 16px
|
208
|
+
position: relative
|
209
|
+
text-transform: uppercase
|
210
|
+
|
211
|
+
&:after
|
212
|
+
background-color: $primary-color
|
213
|
+
bottom: 0px
|
214
|
+
content: " "
|
215
|
+
height: 3px
|
216
|
+
left: 0px
|
217
|
+
opacity: 0
|
218
|
+
position: absolute
|
219
|
+
width: 100%
|
220
|
+
@include transform(scale(0))
|
221
|
+
|
222
|
+
ul li a:hover
|
223
|
+
opacity: 1
|
224
|
+
|
225
|
+
ul li.active a
|
226
|
+
cursor: default
|
227
|
+
opacity: 1
|
228
|
+
margin: 0 16px
|
229
|
+
padding: 0
|
230
|
+
|
231
|
+
&:after
|
232
|
+
opacity: 1
|
233
|
+
@include transform(scale(1))
|
234
|
+
@include transition(all .2s ease)
|
235
|
+
@include transition-delay(.05s)
|
236
|
+
|
237
|
+
ul li:first-child a
|
238
|
+
margin-left: 0
|
239
|
+
padding-left: 0
|
240
|
+
|
241
|
+
// Tabs
|
242
|
+
.tab-content
|
243
|
+
display: none
|
244
|
+
|
245
|
+
&.active
|
246
|
+
display: block
|
247
|
+
|
248
|
+
// Permanent notice
|
249
|
+
.permanent-notice
|
250
|
+
background: #eee
|
251
|
+
border-bottom: 1px solid #ddd
|
252
|
+
color: #333
|
253
|
+
margin: 0 -40px 30px -40px
|
254
|
+
padding: 0 40px
|
255
|
+
position: relative
|
256
|
+
|
257
|
+
i.icon
|
258
|
+
font-size: 16px
|
259
|
+
left: 14px
|
260
|
+
opacity: .25
|
261
|
+
position: absolute
|
262
|
+
top: 12px
|
263
|
+
|
264
|
+
p
|
265
|
+
font-size: 13px
|
266
|
+
font-weight: 600
|
267
|
+
line-height: 18px
|
268
|
+
margin: 0
|
269
|
+
padding: 12px 0
|
270
|
+
|
271
|
+
small
|
272
|
+
display: block
|
273
|
+
font-size: 12px
|
274
|
+
font-weight: 400
|
275
|
+
|
276
|
+
&.permanent-notice-info
|
277
|
+
background: #eef6fe
|
278
|
+
border-color: #def
|
279
|
+
color: #12659b
|
280
|
+
|
281
|
+
p
|
282
|
+
color: inherit
|
283
|
+
|
284
|
+
// Filters
|
285
|
+
|
286
|
+
.filters
|
287
|
+
margin: 20px 0
|
288
|
+
|
289
|
+
// Datepicker
|
290
|
+
|
291
|
+
.ui-datepicker
|
292
|
+
background: #fff
|
293
|
+
border: none
|
294
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, .25)
|
295
|
+
width: 250px
|
296
|
+
|
297
|
+
.ui-datepicker-header
|
298
|
+
border: none
|
299
|
+
font-weight: 300
|
300
|
+
|
301
|
+
a.ui-datepicker-prev, a.ui-datepicker-next
|
302
|
+
background: none
|
303
|
+
border: none
|
304
|
+
color: transparent
|
305
|
+
cursor: pointer
|
306
|
+
display: block
|
307
|
+
height: 36px
|
308
|
+
opacity: .6
|
309
|
+
padding: 8px 0
|
310
|
+
position: absolute
|
311
|
+
right: 0
|
312
|
+
top: 0
|
313
|
+
width: 36px
|
314
|
+
|
315
|
+
a.ui-datepicker-prev
|
316
|
+
left: 0
|
317
|
+
|
318
|
+
a.ui-datepicker-prev:hover, a.ui-datepicker-next:hover
|
319
|
+
opacity: 1
|
320
|
+
|
321
|
+
a.ui-datepicker-prev span
|
322
|
+
background: url(asset-path('spina/arrow-left.png')) no-repeat center
|
323
|
+
background-size: 10px 13px
|
324
|
+
display: block
|
325
|
+
|
326
|
+
a.ui-datepicker-next span
|
327
|
+
background: url(asset-path('spina/arrow-right.png')) no-repeat center
|
328
|
+
background-size: 10px 13px
|
329
|
+
display: block
|
330
|
+
|
331
|
+
.ui-datepicker-title
|
332
|
+
line-height: 42px
|
333
|
+
text-align: center
|
334
|
+
|
335
|
+
.ui-datepicker-calendar
|
336
|
+
width: 100%
|
337
|
+
|
338
|
+
tr td:first-child, tr th:first-child
|
339
|
+
padding-left: 0px
|
340
|
+
|
341
|
+
tr td:last-child, tr th:last-child
|
342
|
+
padding-right: 0px
|
343
|
+
|
344
|
+
thead th
|
345
|
+
color: #444
|
346
|
+
font-weight: 600
|
347
|
+
|
348
|
+
tbody tr, thead tr
|
349
|
+
border: none
|
350
|
+
|
351
|
+
tbody tr td
|
352
|
+
background: none
|
353
|
+
|
354
|
+
tbody tr td a
|
355
|
+
display: block
|
356
|
+
line-height: 28px
|
357
|
+
text-align: center
|
358
|
+
padding: 2px 4px
|
359
|
+
width: 32px
|
360
|
+
|
361
|
+
tbody tr td a.ui-state-default
|
362
|
+
background: none
|
363
|
+
border: none
|
364
|
+
color: #777
|
365
|
+
font-weight: 600
|
366
|
+
|
367
|
+
tr:hover
|
368
|
+
background: none
|
369
|
+
|
370
|
+
tbody tr td a:hover
|
371
|
+
color: #000
|
372
|
+
|
373
|
+
tbody tr td a.ui-state-highlight
|
374
|
+
background: #eee
|
375
|
+
border-radius: 2px
|
376
|
+
|
377
|
+
tbody tr td a.ui-state-active
|
378
|
+
background: #444
|
379
|
+
border-radius: 2px
|
380
|
+
color: #fff
|
381
|
+
|
382
|
+
// Main header
|
383
|
+
header#header
|
384
|
+
background: #fff
|
385
|
+
border-bottom: 1px solid #eee
|
386
|
+
left: 300px
|
387
|
+
padding: 30px 40px
|
388
|
+
position: fixed
|
389
|
+
right: 0
|
390
|
+
top: 0
|
391
|
+
z-index: 10
|
392
|
+
|
393
|
+
#header_actions
|
394
|
+
float: right
|
395
|
+
position: absolute
|
396
|
+
right: 20px
|
397
|
+
top: 24px
|
398
|
+
|
399
|
+
// Main content
|
400
|
+
|
401
|
+
section#main
|
402
|
+
padding: 30px 40px 30px 340px
|
403
|
+
|
404
|
+
// Danger zone
|
405
|
+
.danger-zone
|
406
|
+
background: url(asset-path('spina/danger-zone-ribbon.png')) repeat-x #fcfcfc
|
407
|
+
margin: 60px -40px 0 -40px
|
408
|
+
padding: 26px 40px
|
409
|
+
|
410
|
+
h2
|
411
|
+
color: #777
|
412
|
+
font-size: 16px
|
413
|
+
font-weight: 600
|
414
|
+
|
415
|
+
&:before
|
416
|
+
margin-right: 6px
|
417
|
+
vertical-align: middle
|
418
|
+
|
419
|
+
// Breadcrumbs
|
420
|
+
|
421
|
+
#main_content_header
|
422
|
+
.preview-website i
|
423
|
+
vertical-align: bottom
|
424
|
+
|
425
|
+
.breadcrumbs
|
426
|
+
color: #333
|
427
|
+
display: inline-block
|
428
|
+
font-size: 24px
|
429
|
+
|
430
|
+
.button
|
431
|
+
margin-left: 12px
|
432
|
+
vertical-align: middle
|
433
|
+
|
434
|
+
a
|
435
|
+
color: #999
|
436
|
+
|
437
|
+
&:hover
|
438
|
+
color: #999
|
439
|
+
|
440
|
+
.divider
|
441
|
+
background: url(asset-path('spina/divider.png'))
|
442
|
+
color: #999
|
443
|
+
display: inline-block
|
444
|
+
height: 17px
|
445
|
+
margin: 0 20px
|
446
|
+
width: 6px
|
447
|
+
|
448
|
+
// Well
|
449
|
+
|
450
|
+
.well
|
451
|
+
background: #fff
|
452
|
+
border: 1px solid #eee
|
453
|
+
border-radius: 3px
|
454
|
+
margin: 24px -20px
|
455
|
+
padding: 20px
|
456
|
+
|
457
|
+
hr.divider
|
458
|
+
clear: both
|
459
|
+
margin: 20px -20px
|
460
|
+
|
461
|
+
.table-container
|
462
|
+
margin: -20px -20px
|
463
|
+
|
464
|
+
.table
|
465
|
+
margin: 0
|
466
|
+
|
467
|
+
tr td:first-child, tr th:first-child
|
468
|
+
padding-left: 20px
|
469
|
+
|
470
|
+
tr td:last-child, tr th:last-child
|
471
|
+
padding-right: 20px
|
472
|
+
|
473
|
+
// General styles
|
474
|
+
|
475
|
+
h1, h2, h3, h4, h5, h6
|
476
|
+
font-weight: 400
|
477
|
+
margin: 0
|
478
|
+
|
479
|
+
&.page-header
|
480
|
+
border-bottom: 1px solid #eee
|
481
|
+
color: #333
|
482
|
+
margin: 40px 0 20px 0
|
483
|
+
padding-bottom: 8px
|
484
|
+
|
485
|
+
h1, h2
|
486
|
+
color: #333
|
487
|
+
font-size: 24px
|
488
|
+
|
489
|
+
h3
|
490
|
+
color: #333
|
491
|
+
|
492
|
+
ul
|
493
|
+
list-style: none
|
494
|
+
margin: 0
|
495
|
+
padding: 0
|
496
|
+
|
497
|
+
p
|
498
|
+
color: #333
|
499
|
+
font-size: 14px
|
500
|
+
line-height: 18px
|
501
|
+
|
502
|
+
a
|
503
|
+
color: $primary-color
|
504
|
+
text-decoration: none
|
505
|
+
|
506
|
+
&:hover
|
507
|
+
color: shade($primary-color, 40%)
|
508
|
+
|
509
|
+
label
|
510
|
+
color: #333
|
511
|
+
font-size: 11px
|
512
|
+
font-weight: 600
|
513
|
+
margin-right: 14px
|
514
|
+
|
515
|
+
.divider-container
|
516
|
+
margin: 0 -40px
|
517
|
+
|
518
|
+
hr.divider
|
519
|
+
background: #e9e9eb
|
520
|
+
border: none
|
521
|
+
height: 1px
|
522
|
+
margin: 20px 0
|
523
|
+
|
524
|
+
.pull-left
|
525
|
+
float: left
|
526
|
+
|
527
|
+
.pull-right
|
528
|
+
float: right
|
529
|
+
|
530
|
+
.clearfix
|
531
|
+
@include clearfix()
|
532
|
+
|
533
|
+
.spina-logo
|
534
|
+
bottom: 0px
|
535
|
+
opacity: .5
|
536
|
+
padding: 20px
|
537
|
+
position: fixed
|
538
|
+
right: 0px
|
539
|
+
@include transition(opacity .2s ease)
|
540
|
+
|
541
|
+
&:hover
|
542
|
+
opacity: 1
|
543
|
+
|
544
|
+
img
|
545
|
+
display: block
|
546
|
+
|
547
|
+
.text-danger
|
548
|
+
color: $danger-color
|
549
|
+
|
550
|
+
.text-success
|
551
|
+
color: $success-color
|
552
|
+
|
553
|
+
.text-muted
|
554
|
+
color: #999
|
555
|
+
|
556
|
+
.text-center
|
557
|
+
text-align: center
|
558
|
+
|
559
|
+
.text-right
|
560
|
+
text-align: right
|
561
|
+
|
562
|
+
// Turbolinks
|
563
|
+
.turbolinks-progress-bar
|
564
|
+
background-color: $primary-color
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Spina
|
2
|
+
module Frontend
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_action :set_locale
|
7
|
+
before_action :rewrite_page, only: [:show]
|
8
|
+
end
|
9
|
+
|
10
|
+
def show
|
11
|
+
if should_skip_to_first_child?
|
12
|
+
redirect_to first_live_child.try(:materialized_path) and return
|
13
|
+
elsif page.link_url.present?
|
14
|
+
redirect_to page.link_url and return
|
15
|
+
end
|
16
|
+
|
17
|
+
render_with_template(page)
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def set_locale
|
23
|
+
I18n.locale = params[:locale] || I18n.default_locale
|
24
|
+
end
|
25
|
+
|
26
|
+
def rewrite_page
|
27
|
+
if page.nil? && rule = RewriteRule.find_by(old_path: "/" + params[:id])
|
28
|
+
redirect_to rule.new_path, status: :moved_permanently
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def page_by_locale(locale)
|
33
|
+
Page.with_translations(locale).find_by!(materialized_path: spina_request_path)
|
34
|
+
end
|
35
|
+
|
36
|
+
def page
|
37
|
+
current_page = page_by_locale(I18n.locale) || page_by_locale(I18n.default_locale)
|
38
|
+
@page ||= (action_name == 'homepage') ? Page.find_by!(name: 'homepage') : current_page
|
39
|
+
end
|
40
|
+
|
41
|
+
def spina_request_path
|
42
|
+
segments = ['/', params[:locale], params[:id]].compact
|
43
|
+
File.join(*segments)
|
44
|
+
end
|
45
|
+
|
46
|
+
def should_skip_to_first_child?
|
47
|
+
page.skip_to_first_child && first_live_child
|
48
|
+
end
|
49
|
+
|
50
|
+
def first_live_child
|
51
|
+
page.children.sorted.live.first
|
52
|
+
end
|
53
|
+
|
54
|
+
def render_with_template(page)
|
55
|
+
render layout: "#{current_theme.name.parameterize.underscore}/#{page.layout_template || 'application'}", template: "#{current_theme.name.parameterize.underscore}/pages/#{page.view_template || 'show'}"
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|