beyond_canvas 0.16.2.pre → 0.19.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/beyond_canvas_manifest.js +1 -0
- data/app/assets/images/icons/arrow_right.svg +1 -0
- data/app/assets/images/icons/close.svg +1 -0
- data/app/assets/images/icons/home.svg +1 -0
- data/app/assets/javascripts/beyond_canvas/base.js +120 -246
- data/app/assets/stylesheets/beyond_canvas/base.scss +10 -1
- data/app/assets/stylesheets/beyond_canvas/components/_action_bar.scss +28 -0
- data/app/assets/stylesheets/beyond_canvas/components/_breadcrumbs.scss +29 -0
- data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +1 -1
- data/app/assets/stylesheets/beyond_canvas/components/_debug.scss +10 -0
- data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +11 -14
- data/app/assets/stylesheets/beyond_canvas/components/_grids.scss +12 -0
- data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +5 -0
- data/app/assets/stylesheets/beyond_canvas/components/_main.scss +12 -13
- data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +12 -0
- data/app/assets/stylesheets/beyond_canvas/components/_menu.scss +50 -0
- data/app/assets/stylesheets/beyond_canvas/components/_modals.scss +35 -0
- data/app/assets/stylesheets/beyond_canvas/components/_scrollbox.scss +35 -0
- data/app/assets/stylesheets/beyond_canvas/components/_sidebar.scss +53 -0
- data/app/assets/stylesheets/beyond_canvas/components/_texts.scss +8 -0
- data/app/assets/stylesheets/beyond_canvas/components/_titles.scss +7 -0
- data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +64 -9
- data/app/controllers/beyond_canvas/application_controller.rb +3 -0
- data/app/controllers/beyond_canvas/authentications_controller.rb +37 -30
- data/app/controllers/concerns/beyond_canvas/authentication.rb +1 -12
- data/app/controllers/concerns/beyond_canvas/locale_management.rb +5 -4
- data/app/form_builders/beyond_canvas/form_builder.rb +8 -6
- data/app/helpers/beyond_canvas/authentications_helper.rb +28 -0
- data/app/helpers/beyond_canvas/cockpit_app_helper.rb +17 -0
- data/app/helpers/beyond_canvas/controller_helper.rb +9 -0
- data/app/helpers/beyond_canvas/debug_helper.rb +9 -0
- data/app/helpers/beyond_canvas/locale_switch_helper.rb +5 -1
- data/app/javascript/beyond_canvas/base.js +3 -0
- data/app/javascript/beyond_canvas/initializers/buttons.js +65 -19
- data/app/javascript/beyond_canvas/initializers/flash.js +9 -2
- data/app/javascript/beyond_canvas/initializers/inputs.js +4 -1
- data/app/javascript/beyond_canvas/initializers/modals.js +14 -0
- data/app/views/beyond_canvas/authentications/new.html.erb +19 -10
- data/app/views/beyond_canvas/shared/_action_bar.html.erb +15 -0
- data/app/views/beyond_canvas/shared/_breadcrumbs.html.erb +14 -0
- data/app/views/beyond_canvas/shared/_flash.html.erb +22 -12
- data/app/views/beyond_canvas/shared/_locales.html.erb +8 -0
- data/app/views/beyond_canvas/shared/_menu.html.erb +31 -0
- data/app/views/beyond_canvas/shared/_modal.html.erb +6 -0
- data/app/views/beyond_canvas/shared/_sidebar.html.erb +16 -0
- data/app/views/layouts/beyond_canvas/application.html.erb +31 -0
- data/app/views/layouts/beyond_canvas/public.html.erb +11 -4
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +5 -4
- data/lib/beyond_canvas.rb +12 -12
- data/lib/beyond_canvas/configuration.rb +11 -6
- data/lib/beyond_canvas/engine.rb +5 -6
- data/lib/beyond_canvas/menu_item_registration.rb +19 -0
- data/lib/beyond_canvas/parameter_sanitizer.rb +1 -1
- data/lib/beyond_canvas/rails/routes.rb +8 -7
- data/lib/beyond_canvas/version.rb +1 -1
- data/lib/generators/beyond_canvas/controller/controller_generator.rb +1 -6
- data/lib/generators/beyond_canvas/controller/templates/shops_controller.rb +20 -0
- data/lib/generators/beyond_canvas/custom_menu/custom_menu_generator.rb +13 -0
- data/lib/generators/beyond_canvas/custom_menu/templates/beyond_canvas_custom_menu.html.erb +32 -0
- data/lib/generators/beyond_canvas/custom_styles/custom_styles_generator.rb +1 -1
- data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.scss +55 -9
- data/lib/generators/beyond_canvas/install/install_generator.rb +3 -5
- data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +52 -14
- data/lib/generators/beyond_canvas/{auth_model/auth_model_generator.rb → model/model_generator.rb} +4 -5
- data/lib/generators/beyond_canvas/{auth_model → model}/templates/migration.erb +2 -4
- data/lib/generators/beyond_canvas/{auth_model → model}/templates/model.erb +0 -0
- data/lib/generators/beyond_canvas/views/views_generator.rb +4 -6
- data/lib/models/concerns/authentication.rb +57 -0
- data/lib/models/concerns/utils.rb +79 -0
- data/lib/models/shop.rb +12 -0
- metadata +73 -31
- data/app/controllers/concerns/beyond_canvas/resource_management.rb +0 -33
- data/app/javascript/beyond_canvas/initializers/functions.js +0 -41
- data/app/views/beyond_canvas/locales/_edit.html.erb +0 -8
- data/lib/beyond_canvas/models/authentication.rb +0 -66
- data/lib/beyond_canvas/models/shop.rb +0 -28
- data/lib/beyond_canvas/models/utils.rb +0 -55
- data/lib/generators/beyond_canvas/controller/templates/controller.erb +0 -37
@@ -0,0 +1,29 @@
|
|
1
|
+
.breadcrumbs {
|
2
|
+
font-size: 90%;
|
3
|
+
margin-bottom: 30px;
|
4
|
+
|
5
|
+
.home-icon {
|
6
|
+
width: 12px;
|
7
|
+
height: 12px;
|
8
|
+
fill: $breadcrum-color-current;
|
9
|
+
}
|
10
|
+
|
11
|
+
.arrow-right {
|
12
|
+
width: 8px;
|
13
|
+
height: 8px;
|
14
|
+
margin-left: 7px;
|
15
|
+
margin-right: 7px;
|
16
|
+
fill: $breadcrum-color;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.breadcrumb {
|
21
|
+
&__item {
|
22
|
+
color: $breadcrum-color-current;
|
23
|
+
|
24
|
+
&--current {
|
25
|
+
color: $breadcrum-color;
|
26
|
+
pointer-events: none;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
%form__actions {
|
2
|
-
|
3
|
-
display: flex;
|
2
|
+
overflow: auto;
|
4
3
|
}
|
5
4
|
|
6
5
|
.form {
|
@@ -14,29 +13,27 @@
|
|
14
13
|
}
|
15
14
|
|
16
15
|
&__actions {
|
17
|
-
&--spaced {
|
18
|
-
@extend %form__actions;
|
19
|
-
|
20
|
-
justify-content: space-between;
|
21
|
-
}
|
22
|
-
|
23
16
|
&--left {
|
24
17
|
@extend %form__actions;
|
25
18
|
|
26
|
-
|
19
|
+
> * {
|
20
|
+
float: left;
|
27
21
|
|
28
|
-
|
29
|
-
|
22
|
+
&:not(:first-child) {
|
23
|
+
margin-left: 30px;
|
24
|
+
}
|
30
25
|
}
|
31
26
|
}
|
32
27
|
|
33
28
|
&--right {
|
34
29
|
@extend %form__actions;
|
35
30
|
|
36
|
-
|
31
|
+
> * {
|
32
|
+
float: right;
|
37
33
|
|
38
|
-
|
39
|
-
|
34
|
+
&:not(:first-child) {
|
35
|
+
margin-right: 30px;
|
36
|
+
}
|
40
37
|
}
|
41
38
|
}
|
42
39
|
}
|
@@ -1,9 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
.main {
|
2
|
+
position: relative;
|
3
|
+
width: 100%;
|
4
|
+
height: 100vh;
|
5
|
+
overflow-y: scroll;
|
3
6
|
}
|
4
7
|
|
5
8
|
.body--public {
|
6
|
-
|
9
|
+
background-color: $main-background-public;
|
7
10
|
|
8
11
|
.main-wrapper {
|
9
12
|
@include margin(32px auto);
|
@@ -20,20 +23,16 @@
|
|
20
23
|
}
|
21
24
|
}
|
22
25
|
|
23
|
-
.body--
|
24
|
-
|
26
|
+
.body--application {
|
27
|
+
background-color: $main-background-application;
|
25
28
|
|
26
29
|
.main-wrapper {
|
27
|
-
@include margin(
|
30
|
+
@include margin(25px auto 100px auto);
|
28
31
|
|
29
|
-
|
30
|
-
width: 94%;
|
32
|
+
width: calc(100% - 50px);
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
display: block;
|
36
|
-
width: 238px;
|
34
|
+
&--action_bar {
|
35
|
+
margin-top: 12px;
|
37
36
|
}
|
38
37
|
}
|
39
38
|
}
|
@@ -1,4 +1,8 @@
|
|
1
1
|
.margin {
|
2
|
+
&--clear {
|
3
|
+
margin: 0 !important;
|
4
|
+
}
|
5
|
+
|
2
6
|
&--top {
|
3
7
|
margin-top: 30px;
|
4
8
|
}
|
@@ -6,4 +10,12 @@
|
|
6
10
|
&--bottom {
|
7
11
|
margin-bottom: 30px;
|
8
12
|
}
|
13
|
+
|
14
|
+
&--left {
|
15
|
+
margin-left: 30px;
|
16
|
+
}
|
17
|
+
|
18
|
+
&--right {
|
19
|
+
margin-right: 30px;
|
20
|
+
}
|
9
21
|
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
.menu {
|
2
|
+
@include padding(0 15px);
|
3
|
+
|
4
|
+
height: $menu-height;
|
5
|
+
background-color: $menu-background;
|
6
|
+
align-items: center;
|
7
|
+
display: flex;
|
8
|
+
box-sizing: border-box;
|
9
|
+
justify-content: space-between;
|
10
|
+
position: sticky;
|
11
|
+
top: 0;
|
12
|
+
z-index: 999;
|
13
|
+
|
14
|
+
.logo {
|
15
|
+
height: $menu-logo-height;
|
16
|
+
}
|
17
|
+
|
18
|
+
&--left {
|
19
|
+
display: inherit;
|
20
|
+
}
|
21
|
+
|
22
|
+
&--center {
|
23
|
+
left: 50%;
|
24
|
+
position: absolute;
|
25
|
+
transform: translateX(-50%);
|
26
|
+
display: inherit;
|
27
|
+
}
|
28
|
+
|
29
|
+
&--right {
|
30
|
+
display: inherit;
|
31
|
+
}
|
32
|
+
|
33
|
+
&__item {
|
34
|
+
@include margin(0 15px);
|
35
|
+
line-height: 1;
|
36
|
+
color: $menu-item-color;
|
37
|
+
|
38
|
+
&:hover {
|
39
|
+
color: $menu-item-hover-color;
|
40
|
+
}
|
41
|
+
|
42
|
+
&--active {
|
43
|
+
color: $menu-item-selected-color;
|
44
|
+
|
45
|
+
&:hover {
|
46
|
+
color: $menu-item-selected-hover-color;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.modal {
|
2
|
+
|
3
|
+
&__background {
|
4
|
+
width: 100%;
|
5
|
+
height: 100%;
|
6
|
+
background-color: $modal-background-color;
|
7
|
+
position: absolute;
|
8
|
+
z-index: 99999;
|
9
|
+
justify-content: center;
|
10
|
+
align-items: center;
|
11
|
+
display: none;
|
12
|
+
|
13
|
+
.card {
|
14
|
+
width: 100%;
|
15
|
+
max-width: $modal-width;
|
16
|
+
margin: 25px;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
&__headline {
|
21
|
+
margin-bottom: 30px;
|
22
|
+
font-size: 24px;
|
23
|
+
font-weight: normal;
|
24
|
+
line-height: 1.2;
|
25
|
+
color: rgb(62, 62, 62);
|
26
|
+
}
|
27
|
+
|
28
|
+
&__close {
|
29
|
+
@include position(absolute, $modal-padding $modal-padding null null);
|
30
|
+
@include size(14px);
|
31
|
+
|
32
|
+
cursor: pointer;
|
33
|
+
fill: $modal-close-icon-color;
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.scrollbox {
|
2
|
+
max-height: 65vh;
|
3
|
+
overflow: auto;
|
4
|
+
width: 100%;
|
5
|
+
|
6
|
+
-ms-overflow-style: none;
|
7
|
+
scrollbar-width: none;
|
8
|
+
|
9
|
+
background:
|
10
|
+
/* Shadow covers */
|
11
|
+
linear-gradient(white 30%, rgba(255,255,255,0)),
|
12
|
+
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
|
13
|
+
|
14
|
+
/* Shadows */
|
15
|
+
radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)),
|
16
|
+
radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
|
17
|
+
background:
|
18
|
+
/* Shadow covers */
|
19
|
+
linear-gradient(white 30%, rgba(255,255,255,0)),
|
20
|
+
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
|
21
|
+
|
22
|
+
/* Shadows */
|
23
|
+
radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)),
|
24
|
+
radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
|
25
|
+
background-repeat: no-repeat;
|
26
|
+
background-color: white;
|
27
|
+
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
|
28
|
+
|
29
|
+
/* Opera doesn’t support this in the shorthand */
|
30
|
+
background-attachment: local, local, scroll, scroll;
|
31
|
+
|
32
|
+
&::-webkit-scrollbar {
|
33
|
+
display: none;
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
.sidebar {
|
2
|
+
height: 100vh;
|
3
|
+
width: $sidebar-width;
|
4
|
+
min-width: $sidebar-width;
|
5
|
+
background-color: $sidebar-background;
|
6
|
+
position: relative;
|
7
|
+
|
8
|
+
&__header, &__footer {
|
9
|
+
width: 100%;
|
10
|
+
}
|
11
|
+
|
12
|
+
&__header {
|
13
|
+
background-color: $sidebar-header-background;
|
14
|
+
height: 73px;
|
15
|
+
padding-left: 15px;
|
16
|
+
box-sizing: border-box;
|
17
|
+
display: flex;
|
18
|
+
align-items: center;
|
19
|
+
}
|
20
|
+
|
21
|
+
&__logo {
|
22
|
+
width: 128px;
|
23
|
+
height: 30px;
|
24
|
+
background-color: white;
|
25
|
+
}
|
26
|
+
|
27
|
+
&__item {
|
28
|
+
width: 120px;
|
29
|
+
height: 14px;
|
30
|
+
background-color: $sidebar-item-background;
|
31
|
+
margin: 16px 0 24px 35px;
|
32
|
+
|
33
|
+
&--selected {
|
34
|
+
background-color: $sidebar-item-selected-background;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
&__footer {
|
39
|
+
background-color: $sidebar-footer-background;
|
40
|
+
height: 40px;
|
41
|
+
position: absolute;
|
42
|
+
bottom: 0;
|
43
|
+
display: flex;
|
44
|
+
justify-content: space-around;
|
45
|
+
align-items: center;
|
46
|
+
}
|
47
|
+
|
48
|
+
&__icon {
|
49
|
+
width: 16px;
|
50
|
+
height: 16px;
|
51
|
+
background-color: $sidebar-footer-icon-background;
|
52
|
+
}
|
53
|
+
}
|
@@ -13,7 +13,8 @@ $palette-danger: rgb(218, 60, 60) !default;
|
|
13
13
|
// General styles
|
14
14
|
// ************************************************************
|
15
15
|
|
16
|
-
$main-background: rgb(233, 232, 220) !default;
|
16
|
+
$main-background-public: rgb(233, 232, 220) !default;
|
17
|
+
$main-background-application: rgb(233, 232, 220) !default;
|
17
18
|
$main-transition: 0.125s ease-in;
|
18
19
|
|
19
20
|
// ************************************************************
|
@@ -94,19 +95,19 @@ $input-errors-color: $palette-danger !default;
|
|
94
95
|
// Checkboxes
|
95
96
|
// ************************************************************
|
96
97
|
|
97
|
-
$checkbox-checked-color: #97C344 !default;
|
98
|
-
$checkbox-checked-background: #ffffff !default;
|
99
|
-
$checkbox-unchecked-color: #C2BF9D !default;
|
100
|
-
$checkbox-unchecked-background: #ffffff !default;
|
98
|
+
$checkbox-checked-color: #97C344 !default; // This value MUST be HEX
|
99
|
+
$checkbox-checked-background: #ffffff !default; // This value MUST be HEX
|
100
|
+
$checkbox-unchecked-color: #C2BF9D !default; // This value MUST be HEX
|
101
|
+
$checkbox-unchecked-background: #ffffff !default; // This value MUST be HEX
|
101
102
|
|
102
103
|
// ************************************************************
|
103
104
|
// Radiobuttons
|
104
105
|
// ************************************************************
|
105
106
|
|
106
|
-
$radio-checked-color: #97C344 !default;
|
107
|
-
$radio-checked-background: #ffffff !default;
|
108
|
-
$radio-unchecked-color: #C2BF9D !default;
|
109
|
-
$radio-unchecked-background: #ffffff !default;
|
107
|
+
$radio-checked-color: #97C344 !default; // This value MUST be HEX
|
108
|
+
$radio-checked-background: #ffffff !default; // This value MUST be HEX
|
109
|
+
$radio-unchecked-color: #C2BF9D !default; // This value MUST be HEX
|
110
|
+
$radio-unchecked-background: #ffffff !default; // This value MUST be HEX
|
110
111
|
|
111
112
|
// ************************************************************
|
112
113
|
// Hints
|
@@ -160,6 +161,39 @@ $notice-error-background: rgb(218, 60, 60) !default;
|
|
160
161
|
$notice-border-radius: 4px !default;
|
161
162
|
$notice-color: rgb(153, 153, 153) !default;
|
162
163
|
|
164
|
+
// ************************************************************
|
165
|
+
// Breadcrums
|
166
|
+
// ************************************************************
|
167
|
+
|
168
|
+
$breadcrum-color: rgb(122, 118, 76) !default;
|
169
|
+
$breadcrum-color-current: rgb(61, 149, 137) !default;
|
170
|
+
|
171
|
+
// ************************************************************
|
172
|
+
// Titles
|
173
|
+
// ************************************************************
|
174
|
+
|
175
|
+
$title-color: rgb(122, 118, 76) !default;
|
176
|
+
|
177
|
+
// ************************************************************
|
178
|
+
// Menu
|
179
|
+
// ************************************************************
|
180
|
+
|
181
|
+
$menu-background: #1c3445 !default;
|
182
|
+
$menu-height: 60px !default;
|
183
|
+
$menu-logo-height: 30px !default;
|
184
|
+
$menu-item-color: #9ab5c6 !default;
|
185
|
+
$menu-item-hover-color: lighten($menu-item-color, 13%) !default;
|
186
|
+
$menu-item-selected-color: #4eb7a8 !default;
|
187
|
+
$menu-item-selected-hover-color: lighten($menu-item-selected-color, 13%) !default;
|
188
|
+
|
189
|
+
// ************************************************************
|
190
|
+
// Action bar
|
191
|
+
// ************************************************************
|
192
|
+
|
193
|
+
$action-bar-background: rgb(255, 255, 255) !default;
|
194
|
+
$action-bar-shadow: 1px solid rgba(0, 0, 0, 0.2) !default;
|
195
|
+
$action-bar-height: 73px !default;
|
196
|
+
|
163
197
|
// ************************************************************
|
164
198
|
// Markdown
|
165
199
|
// ************************************************************
|
@@ -169,3 +203,24 @@ $markdown-table-border-color: #dfe2e5;
|
|
169
203
|
$markdown-blockquote-font-color: #6a737d;
|
170
204
|
$markdown-blockquote-border-color: #dfe2e5;
|
171
205
|
$markdown-hr-background: #e1e4e8;
|
206
|
+
|
207
|
+
// ************************************************************
|
208
|
+
// Sidebar
|
209
|
+
// ************************************************************
|
210
|
+
|
211
|
+
$sidebar-width: 250px;
|
212
|
+
$sidebar-background: #1d3544;
|
213
|
+
$sidebar-header-background: #12222c;
|
214
|
+
$sidebar-footer-background: #12222c;
|
215
|
+
$sidebar-footer-icon-background: #9ab5c5;
|
216
|
+
$sidebar-item-background: #9ab5c6;
|
217
|
+
$sidebar-item-selected-background: #4eb7a8;
|
218
|
+
|
219
|
+
// ************************************************************
|
220
|
+
// Modals
|
221
|
+
// ************************************************************
|
222
|
+
|
223
|
+
$modal-padding: 10px;
|
224
|
+
$modal-width: 650px;
|
225
|
+
$modal-close-icon-color: #8b8b8b !default;
|
226
|
+
$modal-background-color: rgba(0, 0, 0, 0.5) !default;
|