beyond_canvas 0.18.0.pre → 0.21.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -45
- data/app/assets/javascripts/beyond_canvas/base.js +1 -1
- data/app/assets/stylesheets/beyond_canvas/base.scss +5 -3
- data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +44 -0
- data/app/assets/stylesheets/beyond_canvas/components/_flash.scss +2 -1
- data/app/assets/stylesheets/beyond_canvas/components/_grids.scss +2 -2
- data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +11 -0
- data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +4 -0
- data/app/assets/stylesheets/beyond_canvas/components/_menu.scss +10 -0
- data/app/assets/stylesheets/beyond_canvas/components/_select2.scss +65 -0
- data/app/assets/stylesheets/beyond_canvas/components/_statuses.scss +27 -0
- data/app/assets/stylesheets/beyond_canvas/components/_texts.scss +8 -0
- data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +33 -0
- data/app/controllers/beyond_canvas/application_controller.rb +1 -0
- data/app/form_builders/beyond_canvas/form_builder.rb +8 -6
- data/app/helpers/beyond_canvas/application_helper.rb +1 -1
- data/app/helpers/beyond_canvas/controller_helper.rb +9 -0
- data/app/helpers/beyond_canvas/statuses_helper.rb +26 -0
- data/app/javascript/beyond_canvas/initializers/flash.js +1 -1
- data/app/views/beyond_canvas/shared/_menu.html.erb +1 -1
- data/app/views/layouts/beyond_canvas/application.html.erb +1 -1
- data/lib/beyond_canvas/engine.rb +1 -4
- data/lib/beyond_canvas/version.rb +1 -1
- data/lib/generators/beyond_canvas/controller/controller_generator.rb +1 -5
- data/lib/generators/beyond_canvas/controller/templates/{controller.erb → shops_controller.rb} +1 -1
- data/lib/generators/beyond_canvas/custom_menu/templates/beyond_canvas_custom_menu.html.erb +6 -6
- data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.scss +33 -0
- data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8090819de67a4cd59730d513d833430cb0314693d92614a40b150603e9e569bc
|
4
|
+
data.tar.gz: 447fc7161eda427ad167d616265322f33db7f42bf232c9dd642f900f730a1afa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e99a7527ad594aa9c3805d6d422c13030252e0c8b9d614bc3bef1c29bbef358093bebfffe80f6dad4e1799345ce38835ed2398e70eed6b4eef5babb5c5ffba5c
|
7
|
+
data.tar.gz: 7f725871fca780a660973273cae8b4102d98f1f9f49633e4b9ed2a496e23388a7aac61e8940575f023ab213cca894be65d6e6e2ca1e4db16577a30997091d435
|
data/README.md
CHANGED
@@ -3,59 +3,17 @@
|
|
3
3
|
![Gem Version](https://img.shields.io/gem/v/beyond_canvas?label=gem%20version)
|
4
4
|
![License](https://img.shields.io/github/license/ePages-de/beyond_canvas)
|
5
5
|
|
6
|
-
## Installation
|
7
|
-
|
8
|
-
1. Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem "beyond_canvas"
|
12
|
-
```
|
13
|
-
|
14
|
-
1. Then execute:
|
15
|
-
|
16
|
-
```bash
|
17
|
-
$ bundle install
|
18
|
-
```
|
19
|
-
|
20
|
-
1. Restart your server and rename `application.css` to `application.scss` or `application.sass` (in case you prefer to use the `sass` syntax):
|
21
|
-
|
22
|
-
```bash
|
23
|
-
$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
|
24
|
-
```
|
25
|
-
|
26
|
-
1. Delete _all_ Sprockets directives in `application.scss` (`require`, `require_tree` and `require_self`) and use Sass’s native `@import` instead ([Here's why?](https://content.pivotal.io/blog/structure-your-sass-files-with-import)).
|
27
|
-
|
28
|
-
1. Import Beyond Canvas at the beginning of `application.scss`. Any other styles must be imported after Beyond Canvas to avoid issues:
|
29
|
-
|
30
|
-
```scss
|
31
|
-
@import 'beyond_canvas'
|
32
|
-
```
|
33
|
-
|
34
|
-
1. Add the following to `application.js`:
|
35
|
-
|
36
|
-
```js
|
37
|
-
//= require beyond_canvas
|
38
|
-
```
|
39
|
-
|
40
|
-
1. Run the generator:
|
41
|
-
|
42
|
-
```bash
|
43
|
-
$ rails g beyond_canvas:install
|
44
|
-
```
|
45
|
-
|
46
|
-
This will generate `config/initializers/beyond_canvas.rb` file, used for general Beyond Canvas configuration. Read [this wiki entry](https://github.com/ePages-de/beyond_canvas/wiki/Initializer) to get more information about the different configuration options.
|
47
|
-
|
48
6
|
## Documentation
|
49
7
|
|
50
|
-
|
8
|
+
Please see the [Beyond Canvas wiki](https://github.com/ePages-de/beyond_canvas/wiki) for additional information about the gem and its features.
|
51
9
|
|
52
10
|
## Contributing
|
53
11
|
|
54
12
|
Please see [CONTRIBUTING](https://github.com/ePages-de/beyond_canvas/blob/master/CONTRIBUTING.md).
|
55
13
|
|
56
|
-
##
|
14
|
+
## Change log
|
57
15
|
|
58
|
-
Beyond Canvas's
|
16
|
+
Beyond Canvas's change log is available [here](https://github.com/ePages-de/beyond_canvas/blob/master/CHANGELOG.md).
|
59
17
|
|
60
18
|
## License
|
61
19
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
@import "utilities/functions";
|
9
9
|
@import "utilities/mixins";
|
10
10
|
|
11
|
+
@import "components/action_bar";
|
11
12
|
@import "components/actions";
|
12
13
|
@import "components/breadcrumbs";
|
13
14
|
@import "components/buttons";
|
@@ -24,14 +25,15 @@
|
|
24
25
|
@import "components/main";
|
25
26
|
@import "components/margins";
|
26
27
|
@import "components/markdown";
|
27
|
-
@import "components/
|
28
|
+
@import "components/menu";
|
28
29
|
@import "components/modals";
|
29
30
|
@import "components/notices";
|
30
31
|
@import "components/relative";
|
31
32
|
@import "components/scrollbox";
|
33
|
+
@import "components/select2";
|
32
34
|
@import "components/sidebar";
|
33
35
|
@import "components/spinner";
|
34
|
-
@import "components/
|
36
|
+
@import "components/statuses";
|
35
37
|
@import "components/tables";
|
36
|
-
@import "components/titles";
|
37
38
|
@import "components/texts";
|
39
|
+
@import "components/titles";
|
@@ -18,6 +18,16 @@
|
|
18
18
|
transition: $main-transition;
|
19
19
|
}
|
20
20
|
|
21
|
+
%button_disabled {
|
22
|
+
border-color: $button-disabled-background;
|
23
|
+
background-color: $button-disabled-background;
|
24
|
+
pointer-events: none;
|
25
|
+
color: $button-disabled-color;
|
26
|
+
text-shadow: $button-disabled-text-shadow;
|
27
|
+
border-bottom-color: #aaaaaa;
|
28
|
+
}
|
29
|
+
|
30
|
+
|
21
31
|
@mixin button-solid($background, $color) {
|
22
32
|
@include background-color-darken($background, 10%);
|
23
33
|
|
@@ -63,6 +73,10 @@
|
|
63
73
|
}
|
64
74
|
}
|
65
75
|
|
76
|
+
input[type=file][disabled] ~ .button__transparent--primary {
|
77
|
+
@extend %button_disabled;
|
78
|
+
}
|
79
|
+
|
66
80
|
.button {
|
67
81
|
&__solid {
|
68
82
|
&--primary {
|
@@ -70,6 +84,11 @@
|
|
70
84
|
|
71
85
|
@include button-solid($button-primary-background, $button-primary-color);
|
72
86
|
@include button-border($button-primary-background);
|
87
|
+
|
88
|
+
&:disabled,
|
89
|
+
&[disabled] {
|
90
|
+
@extend %button_disabled;
|
91
|
+
}
|
73
92
|
}
|
74
93
|
|
75
94
|
&--secondary {
|
@@ -77,6 +96,11 @@
|
|
77
96
|
|
78
97
|
@include button-solid($button-secondary-background, $button-secondary-color);
|
79
98
|
@include button-border($button-secondary-background);
|
99
|
+
|
100
|
+
&:disabled,
|
101
|
+
&[disabled] {
|
102
|
+
@extend %button_disabled;
|
103
|
+
}
|
80
104
|
}
|
81
105
|
|
82
106
|
&--danger {
|
@@ -84,6 +108,11 @@
|
|
84
108
|
|
85
109
|
@include button-solid($button-danger-background, $button-danger-color);
|
86
110
|
@include button-border($button-danger-background);
|
111
|
+
|
112
|
+
&:disabled,
|
113
|
+
&[disabled] {
|
114
|
+
@extend %button_disabled;
|
115
|
+
}
|
87
116
|
}
|
88
117
|
}
|
89
118
|
|
@@ -93,6 +122,11 @@
|
|
93
122
|
|
94
123
|
@include button-transparent($button-primary-background);
|
95
124
|
@include button-border($button-primary-background);
|
125
|
+
|
126
|
+
&:disabled,
|
127
|
+
&[disabled] {
|
128
|
+
@extend %button_disabled;
|
129
|
+
}
|
96
130
|
}
|
97
131
|
|
98
132
|
&--secondary {
|
@@ -100,6 +134,11 @@
|
|
100
134
|
|
101
135
|
@include button-transparent($button-secondary-background);
|
102
136
|
@include button-border($button-secondary-background);
|
137
|
+
|
138
|
+
&:disabled,
|
139
|
+
&[disabled] {
|
140
|
+
@extend %button_disabled;
|
141
|
+
}
|
103
142
|
}
|
104
143
|
|
105
144
|
&--danger {
|
@@ -107,6 +146,11 @@
|
|
107
146
|
|
108
147
|
@include button-transparent($button-danger-background);
|
109
148
|
@include button-border($button-danger-background);
|
149
|
+
|
150
|
+
&:disabled,
|
151
|
+
&[disabled] {
|
152
|
+
@extend %button_disabled;
|
153
|
+
}
|
110
154
|
}
|
111
155
|
}
|
112
156
|
}
|
@@ -9,6 +9,12 @@ select {
|
|
9
9
|
outline: none;
|
10
10
|
padding: 6px 8px;
|
11
11
|
width: 100%;
|
12
|
+
|
13
|
+
&:disabled {
|
14
|
+
background-color: $input-disabled-background !important;
|
15
|
+
color: $input-disabled-color;
|
16
|
+
opacity: 1;
|
17
|
+
}
|
12
18
|
}
|
13
19
|
|
14
20
|
#{$all-text-inputs} {
|
@@ -29,6 +35,11 @@ select {
|
|
29
35
|
background-repeat: no-repeat;
|
30
36
|
}
|
31
37
|
|
38
|
+
textarea {
|
39
|
+
min-height: 100px;
|
40
|
+
resize: vertical;
|
41
|
+
}
|
42
|
+
|
32
43
|
#{$all-text-inputs},
|
33
44
|
select {
|
34
45
|
&.input__error {
|
@@ -15,14 +15,24 @@
|
|
15
15
|
height: $menu-logo-height;
|
16
16
|
}
|
17
17
|
|
18
|
+
&--left {
|
19
|
+
display: inherit;
|
20
|
+
}
|
21
|
+
|
18
22
|
&--center {
|
19
23
|
left: 50%;
|
20
24
|
position: absolute;
|
21
25
|
transform: translateX(-50%);
|
26
|
+
display: inherit;
|
27
|
+
}
|
28
|
+
|
29
|
+
&--right {
|
30
|
+
display: inherit;
|
22
31
|
}
|
23
32
|
|
24
33
|
&__item {
|
25
34
|
@include margin(0 15px);
|
35
|
+
line-height: 1;
|
26
36
|
color: $menu-item-color;
|
27
37
|
|
28
38
|
&:hover {
|
@@ -0,0 +1,65 @@
|
|
1
|
+
.beyond-canvas {
|
2
|
+
|
3
|
+
.select2-container--default .select2-selection--multiple {
|
4
|
+
border: 1px solid $select2-border-color;
|
5
|
+
border-radius: 3px;
|
6
|
+
}
|
7
|
+
|
8
|
+
.select2-container--default.select2-container--focus .select2-selection--multiple{
|
9
|
+
border: 1px solid $select2-border-color-focus;
|
10
|
+
}
|
11
|
+
|
12
|
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
|
13
|
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
14
|
+
border-bottom-left-radius: 0;
|
15
|
+
border-bottom-right-radius: 0;
|
16
|
+
border-color: $select2-border-color-focus;
|
17
|
+
}
|
18
|
+
|
19
|
+
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
20
|
+
background-color: $select2-disabled-background;
|
21
|
+
pointer-events: none;
|
22
|
+
}
|
23
|
+
|
24
|
+
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
25
|
+
background-color: $select2-option-hover-background;
|
26
|
+
color: $select2-option-hover-color;
|
27
|
+
}
|
28
|
+
|
29
|
+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
30
|
+
background-color: $select2-tag-background;
|
31
|
+
color: $select2-tag-color;
|
32
|
+
font-weight: bold;
|
33
|
+
font-size: 11px;
|
34
|
+
border-radius: 3px;
|
35
|
+
border: none;
|
36
|
+
padding: 3px 7px 4px;
|
37
|
+
display: flex;
|
38
|
+
align-items: center;
|
39
|
+
flex-direction: row-reverse;
|
40
|
+
}
|
41
|
+
|
42
|
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
43
|
+
margin-left: 8px;
|
44
|
+
color: $select2-close-icon-color;
|
45
|
+
font-size: 18px;
|
46
|
+
line-height: 0;
|
47
|
+
|
48
|
+
&:hover {
|
49
|
+
color: $select2-close-icon-color-hover;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.select2-dropdown{
|
54
|
+
border: 1px solid $input-border-color-focus;
|
55
|
+
border-top: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
.select2-results__option {
|
59
|
+
font-weight: 700;
|
60
|
+
}
|
61
|
+
|
62
|
+
.select2-results__option[aria-selected=true] {
|
63
|
+
display: none;
|
64
|
+
}
|
65
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.status {
|
2
|
+
@include padding(4px 6px);
|
3
|
+
font-size: 12px;
|
4
|
+
border-radius: 3px;
|
5
|
+
line-height: 1.2;
|
6
|
+
font-weight: 500;
|
7
|
+
|
8
|
+
&--good {
|
9
|
+
background-color: $status-good-background;
|
10
|
+
color: $status-good-color;
|
11
|
+
}
|
12
|
+
|
13
|
+
&--warning {
|
14
|
+
background-color: $status-warning-background;
|
15
|
+
color: $status-warning-color;
|
16
|
+
}
|
17
|
+
|
18
|
+
&--danger {
|
19
|
+
background-color: $status-danger-background;
|
20
|
+
color: $status-danger-color;
|
21
|
+
}
|
22
|
+
|
23
|
+
&--neutral {
|
24
|
+
border: 1px solid $status-neutral-background;
|
25
|
+
color: $status-neutral-color;
|
26
|
+
}
|
27
|
+
}
|
@@ -54,6 +54,10 @@ $button-secondary-color: $white !default;
|
|
54
54
|
$button-danger-background: $palette-danger !default;
|
55
55
|
$button-danger-color: $white !default;
|
56
56
|
|
57
|
+
$button-disabled-background: rgb(208,208,208) !default;
|
58
|
+
$button-disabled-color: rgb(144,144,144) !default;
|
59
|
+
$button-disabled-text-shadow: 1px 1px 0 $white !default;
|
60
|
+
|
57
61
|
$button-border-radius: 3px !default;
|
58
62
|
$button-box-shadow: true !default;
|
59
63
|
$button-font-weight: 700;
|
@@ -90,6 +94,8 @@ $label-color: rgb(128, 128, 128) !default;
|
|
90
94
|
$input-border-color: rgb(217, 216, 195) !default;
|
91
95
|
$input-border-color-focus: $palette-primary !default;
|
92
96
|
$input-errors-color: $palette-danger !default;
|
97
|
+
$input-disabled-background: rgb(245,244,239) !default;
|
98
|
+
$input-disabled-color: rgb(163,161,137) !default;
|
93
99
|
|
94
100
|
// ************************************************************
|
95
101
|
// Checkboxes
|
@@ -161,6 +167,19 @@ $notice-error-background: rgb(218, 60, 60) !default;
|
|
161
167
|
$notice-border-radius: 4px !default;
|
162
168
|
$notice-color: rgb(153, 153, 153) !default;
|
163
169
|
|
170
|
+
// ************************************************************
|
171
|
+
// Status
|
172
|
+
// ************************************************************
|
173
|
+
|
174
|
+
$status-good-background: rgb(205,225,165) !default;
|
175
|
+
$status-good-color: rgb(85,110,41) !default;
|
176
|
+
$status-warning-background: rgb(249,220,166) !default;
|
177
|
+
$status-warning-color: rgb(178,120,18) !default;
|
178
|
+
$status-danger-background: rgb(247,174,163) !default;
|
179
|
+
$status-danger-color: rgb(164,35,34) !default;
|
180
|
+
$status-neutral-background: rgb(224,223,205) !default;
|
181
|
+
$status-neutral-color: rgb(155,151,100) !default;
|
182
|
+
|
164
183
|
// ************************************************************
|
165
184
|
// Breadcrums
|
166
185
|
// ************************************************************
|
@@ -224,3 +243,17 @@ $modal-padding: 10px;
|
|
224
243
|
$modal-width: 650px;
|
225
244
|
$modal-close-icon-color: #8b8b8b !default;
|
226
245
|
$modal-background-color: rgba(0, 0, 0, 0.5) !default;
|
246
|
+
|
247
|
+
// ************************************************************
|
248
|
+
// Select2
|
249
|
+
// ************************************************************
|
250
|
+
|
251
|
+
$select2-border-color: $input-border-color !default;
|
252
|
+
$select2-border-color-focus: $input-border-color-focus !default;
|
253
|
+
$select2-close-icon-color: #79764b !default;
|
254
|
+
$select2-close-icon-color-hover: darken($select2-close-icon-color, 15%) !default;
|
255
|
+
$select2-tag-background: rgb(223, 222, 204) !default;
|
256
|
+
$select2-tag-color: rgb(122, 118, 76) !default;
|
257
|
+
$select2-disabled-background: rgb(245, 244, 239) !default;
|
258
|
+
$select2-option-hover-background: rgb(229, 241, 240) !default;
|
259
|
+
$select2-option-hover-color: rgb(62, 62, 62) !default;
|
@@ -2,10 +2,6 @@
|
|
2
2
|
|
3
3
|
module BeyondCanvas
|
4
4
|
class FormBuilder < ActionView::Helpers::FormBuilder # :nodoc:
|
5
|
-
############################################################################
|
6
|
-
# Wrappers
|
7
|
-
############################################################################
|
8
|
-
|
9
5
|
def field_wrapper(attribute, args, &block)
|
10
6
|
label = args[:label] == false ? nil : args[:label].presence || attribute.to_s.humanize
|
11
7
|
|
@@ -38,14 +34,20 @@ module BeyondCanvas
|
|
38
34
|
end
|
39
35
|
end
|
40
36
|
|
41
|
-
%i[
|
42
|
-
define_method
|
37
|
+
%i[email_field text_field number_field password_field text_area].each do |method|
|
38
|
+
define_method method do |attribute, args = {}|
|
43
39
|
field_wrapper(attribute, args) do
|
44
40
|
super(attribute, args)
|
45
41
|
end
|
46
42
|
end
|
47
43
|
end
|
48
44
|
|
45
|
+
def select(attribute, choices, options = {}, args = {})
|
46
|
+
field_wrapper(attribute, args) do
|
47
|
+
super(attribute, choices, options, args)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
49
51
|
def check_box(attribute, args = {})
|
50
52
|
inline_wrapper(attribute, args) do
|
51
53
|
filed_identifyer = filed_identifyer(attribute)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BeyondCanvas
|
4
|
+
module StatusesHelper # :nodoc:
|
5
|
+
%i[good warning danger neutral].each do |method|
|
6
|
+
define_method :"status_#{method}" do |name = nil, html_options = nil, &block|
|
7
|
+
status_render(method, name, html_options, &block)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def status_render(method, name = nil, html_options = nil, &block)
|
14
|
+
if block_given?
|
15
|
+
html_options = name
|
16
|
+
name = block
|
17
|
+
end
|
18
|
+
|
19
|
+
html_options ||= {}
|
20
|
+
|
21
|
+
html_options.merge!(class: "status status--#{method}") { |_key, old_val, new_val| [new_val, old_val].join(' ') }
|
22
|
+
|
23
|
+
content_tag('span', block_given? ? capture(&name) : name, html_options)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<% path = Rails.application.routes.recognize_path(url) %>
|
18
18
|
|
19
|
-
<% options = options.merge(class: 'menu__item--active') { |_key, old_val, new_val| [new_val, old_val].join(' ') if !external_url && path[:controller] == params[:controller]
|
19
|
+
<% options = options.merge(class: 'menu__item--active') { |_key, old_val, new_val| [new_val, old_val].join(' ') } if !external_url && (path[:controller] == params[:controller]) %>
|
20
20
|
<% options = options.merge(class: 'menu__item') { |_key, old_val, new_val| [new_val, old_val].join(' ') } %>
|
21
21
|
|
22
22
|
<%= link_to name, url, options %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<html>
|
4
4
|
<%= render 'beyond_canvas/shared/head' %>
|
5
5
|
|
6
|
-
<body class="body--application"<% if is_cockpit_app? && Rails.env.development? %> style="display: flex;"<% end %>>
|
6
|
+
<body class="beyond-canvas body--application"<% if is_cockpit_app? && Rails.env.development? %> style="display: flex;"<% end %>>
|
7
7
|
|
8
8
|
<%= render 'beyond_canvas/shared/sidebar' %>
|
9
9
|
|
data/lib/beyond_canvas/engine.rb
CHANGED
@@ -24,13 +24,10 @@ module BeyondCanvas
|
|
24
24
|
include ::BeyondCanvas::StatusCodes
|
25
25
|
include ::BeyondCanvas::AuthenticationsHelper
|
26
26
|
include ::BeyondCanvas::DebugHelper
|
27
|
+
include ::BeyondCanvas::ControllerHelper
|
27
28
|
|
28
29
|
::ActionController::Base.helper BeyondCanvas::Engine.helpers
|
29
30
|
end
|
30
|
-
|
31
|
-
ActiveSupport.on_load :action_mailer do
|
32
|
-
layout 'beyond_canvas/mailer'
|
33
|
-
end
|
34
31
|
end
|
35
32
|
end
|
36
33
|
end
|
@@ -1,18 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'rails/generators/active_record'
|
4
|
-
|
5
3
|
module BeyondCanvas
|
6
4
|
module Generators
|
7
5
|
class ControllerGenerator < Rails::Generators::Base # :nodoc:
|
8
6
|
desc 'Creates an inherited Beyond Canvas controller in the app/controllers folder'
|
9
7
|
|
10
|
-
argument :scope, required: true, desc: 'The scope to create the controller, e.g. shops, users'
|
11
|
-
|
12
8
|
source_root File.expand_path('templates', __dir__)
|
13
9
|
|
14
10
|
def create_controller
|
15
|
-
template '
|
11
|
+
template 'shops_controller.rb', "app/controllers/shops_controller.rb"
|
16
12
|
end
|
17
13
|
end
|
18
14
|
end
|
@@ -7,25 +7,25 @@
|
|
7
7
|
<div class="menu--center">
|
8
8
|
|
9
9
|
<%
|
10
|
-
=begin
|
10
|
+
=begin %>
|
11
11
|
Add here your menu links. You can use `menu__item` as class name and add
|
12
12
|
`menu__item--selected` as secondary class for selected menu item. E.g:
|
13
13
|
|
14
14
|
<%= link_to 'About us', about_us_path, class: "menu__item #{ 'menu__item--selected' if params[:controller] == 'about_us' }" %>
|
15
15
|
<%= link_to 'Support', support_path, class: "menu__item #{ 'menu__item--selected' if params[:controller] == 'support' }" %>
|
16
|
-
|
17
|
-
%>
|
16
|
+
<%
|
17
|
+
=end %>
|
18
18
|
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div class="menu--right">
|
22
22
|
|
23
23
|
<%
|
24
|
-
=begin
|
24
|
+
=begin %>
|
25
25
|
You can also add here some content that will be right-aligned, like a user
|
26
26
|
avatar image or a dropdown account menu.
|
27
|
-
|
28
|
-
%>
|
27
|
+
<%
|
28
|
+
=end %>
|
29
29
|
|
30
30
|
</div>
|
31
31
|
|
@@ -47,6 +47,10 @@
|
|
47
47
|
// $button-danger-background: $palette-danger;
|
48
48
|
// $button-danger-color: $white;
|
49
49
|
|
50
|
+
// $button-disabled-background: rgb(208,208,208);
|
51
|
+
// $button-disabled-color: rgb(144,144,144);
|
52
|
+
// $button-disabled-text-shadow: 1px 1px 0 $white;
|
53
|
+
|
50
54
|
// $button-border-radius: 3px;
|
51
55
|
// $button-box-shadow: true;
|
52
56
|
|
@@ -77,6 +81,8 @@
|
|
77
81
|
// $input-border-color: rgb(217, 216, 195);
|
78
82
|
// $input-border-color-focus: $palette-primary;
|
79
83
|
// $input-errors-color: $palette-danger;
|
84
|
+
// $input-disabled-background: rgb(245,244,239);
|
85
|
+
// $input-disabled-color: rgb(163,161,137);
|
80
86
|
|
81
87
|
// ************************************************************
|
82
88
|
// Checkboxes
|
@@ -148,6 +154,19 @@
|
|
148
154
|
// $notice-border-radius: 4px;
|
149
155
|
// $notice-color: rgb(153, 153, 153);
|
150
156
|
|
157
|
+
// ************************************************************
|
158
|
+
// Status
|
159
|
+
// ************************************************************
|
160
|
+
|
161
|
+
// $status-good-background: rgb(205,225,165);
|
162
|
+
// $status-good-color: rgb(85,110,41);
|
163
|
+
// $status-warning-background: rgb(249,220,166);
|
164
|
+
// $status-warning-color: rgb(178,120,18);
|
165
|
+
// $status-danger-background: rgb(247,174,163);
|
166
|
+
// $status-danger-color: rgb(164,35,34);
|
167
|
+
// $status-neutral-background: rgb(224,223,205);
|
168
|
+
// $status-neutral-color: rgb(155,151,100);
|
169
|
+
|
151
170
|
// ************************************************************
|
152
171
|
// Breadcrums
|
153
172
|
// ************************************************************
|
@@ -197,3 +216,17 @@
|
|
197
216
|
|
198
217
|
// $modal-close-icon-color: #8b8b8b;
|
199
218
|
// $modal-background-color: rgba(0, 0, 0, 0.5);
|
219
|
+
|
220
|
+
// ************************************************************
|
221
|
+
// Select2
|
222
|
+
// ************************************************************
|
223
|
+
|
224
|
+
// $select2-border-color: $input-border-color;
|
225
|
+
// $select2-border-color-focus: $input-border-color-focus;
|
226
|
+
// $select2-close-icon-color: #79764b;
|
227
|
+
// $select2-close-icon-color-hover: darken($select2-close-icon-color, 15%);
|
228
|
+
// $select2-tag-background: rgb(223, 222, 204);
|
229
|
+
// $select2-tag-color: rgb(122, 118, 76);
|
230
|
+
// $select2-disabled-background: rgb(245, 244, 239);
|
231
|
+
// $select2-option-hover-background: rgb(229, 241, 240);
|
232
|
+
// $select2-option-hover-color: rgb(62, 62, 62);
|
@@ -83,7 +83,7 @@ BeyondCanvas.setup do |config|
|
|
83
83
|
#
|
84
84
|
<% unless @skip_webpacker %># <% end %>config.skip_webpacker = <%= @skip_webpacker %>
|
85
85
|
|
86
|
-
# ==>
|
86
|
+
# ==> Database encryption
|
87
87
|
|
88
88
|
config.encryption_key = '<%= SecureRandom.hex(32) %>'
|
89
89
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: attr_encrypted
|
@@ -252,8 +252,10 @@ files:
|
|
252
252
|
- app/assets/stylesheets/beyond_canvas/components/_notices.scss
|
253
253
|
- app/assets/stylesheets/beyond_canvas/components/_relative.scss
|
254
254
|
- app/assets/stylesheets/beyond_canvas/components/_scrollbox.scss
|
255
|
+
- app/assets/stylesheets/beyond_canvas/components/_select2.scss
|
255
256
|
- app/assets/stylesheets/beyond_canvas/components/_sidebar.scss
|
256
257
|
- app/assets/stylesheets/beyond_canvas/components/_spinner.scss
|
258
|
+
- app/assets/stylesheets/beyond_canvas/components/_statuses.scss
|
257
259
|
- app/assets/stylesheets/beyond_canvas/components/_tables.scss
|
258
260
|
- app/assets/stylesheets/beyond_canvas/components/_texts.scss
|
259
261
|
- app/assets/stylesheets/beyond_canvas/components/_titles.scss
|
@@ -275,8 +277,10 @@ files:
|
|
275
277
|
- app/helpers/beyond_canvas/application_helper.rb
|
276
278
|
- app/helpers/beyond_canvas/authentications_helper.rb
|
277
279
|
- app/helpers/beyond_canvas/cockpit_app_helper.rb
|
280
|
+
- app/helpers/beyond_canvas/controller_helper.rb
|
278
281
|
- app/helpers/beyond_canvas/debug_helper.rb
|
279
282
|
- app/helpers/beyond_canvas/locale_switch_helper.rb
|
283
|
+
- app/helpers/beyond_canvas/statuses_helper.rb
|
280
284
|
- app/javascript/beyond_canvas/base.js
|
281
285
|
- app/javascript/beyond_canvas/initializers/buttons.js
|
282
286
|
- app/javascript/beyond_canvas/initializers/flash.js
|
@@ -317,7 +321,7 @@ files:
|
|
317
321
|
- lib/generators/beyond_canvas/assets/templates/beyond_canvas.scss
|
318
322
|
- lib/generators/beyond_canvas/beyond_api/beyond_api_generator.rb
|
319
323
|
- lib/generators/beyond_canvas/controller/controller_generator.rb
|
320
|
-
- lib/generators/beyond_canvas/controller/templates/
|
324
|
+
- lib/generators/beyond_canvas/controller/templates/shops_controller.rb
|
321
325
|
- lib/generators/beyond_canvas/custom_menu/custom_menu_generator.rb
|
322
326
|
- lib/generators/beyond_canvas/custom_menu/templates/beyond_canvas_custom_menu.html.erb
|
323
327
|
- lib/generators/beyond_canvas/custom_styles/custom_styles_generator.rb
|