thecore_ui_commons 3.0.11 → 3.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd76f97a808fa400e1c08fa5b467e9d708f43450295f0025cce65a68c5f875a0
4
- data.tar.gz: '08bbaeeeb52df83cb053c1210685abc94b88a373ed88690210c44bdf4fbfc559'
3
+ metadata.gz: 79df975e4f9d2028d60fa20ca2683a101321fb1463d5b0d10e907403ed230db2
4
+ data.tar.gz: 9629ea433061b16f03e702e18b0460069b80b96ddbe11fabdeba3d9949afff76
5
5
  SHA512:
6
- metadata.gz: 6a671522375a69039ed9add52f68ccd958ca9d1bcbcb05b49c7beec1f4c44c6b77b6da8f651147ca613a18cf4a17f0d193b145e76512c03e6ae93d1cb48405f1
7
- data.tar.gz: fed6ba02869995a012a2191f13b361175ba688d48a916eb93cfc7d814907672a0bf5b68b02a38faa7b87039187288016b837b371a21ae07149829608d057ad53
6
+ metadata.gz: d0bdd980ec9a43aa8d526ec5619d929f17133c1c50a07764ceb1c273c37f2907db04e6cca74107d959d4db1d343e70497fe8fe72641a5fe6971178ca921c78a6
7
+ data.tar.gz: 5955ed3f37e7535bf4e362a3882f823e6811cb8084c582fe1fd6b89d8579e438f5b059d64a0a01613994a5ce8da8b8909b6da8f7cd69050f2bae6688da36e4f8
@@ -0,0 +1 @@
1
+ // Override this in your engine
@@ -0,0 +1,199 @@
1
+ @import 'thecore_ui_commons/variables';
2
+ @import 'thecore_ui_commons/alerts';
3
+
4
+ html,
5
+ body {
6
+ width: 100vw;
7
+ height: 100vh;
8
+ }
9
+
10
+ body {
11
+ margin: 0;
12
+ // background-color: $primary;
13
+ background: linear-gradient(0deg, $primary 0%, $primary 35%, $background 100%);
14
+ overflow: hidden;
15
+ color: $shadows;
16
+ }
17
+
18
+ h2 {
19
+ display: none;
20
+ }
21
+
22
+ /* unvisited link */
23
+ a:link {
24
+ color: $link-color;
25
+ }
26
+
27
+ /* visited link */
28
+ a:visited {
29
+ color: $link-color;
30
+ }
31
+
32
+ /* mouse over link */
33
+ a:hover {
34
+ color: $link-hover-color;
35
+ }
36
+
37
+ /* selected link */
38
+ a:active {
39
+ color: $link-hover-color;
40
+ text-decoration: $link-hover-decoration;
41
+ }
42
+
43
+ .container {
44
+ display: flex;
45
+ flex-direction: column;
46
+ align-items: center;
47
+ justify-content: space-evenly;
48
+ min-height: calc(100vh - 2em);
49
+ }
50
+
51
+ #footer {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ background-color: $background;
56
+ width: 100vw;
57
+ height: 2em;
58
+ color: $primary;
59
+ padding-top: 4px;
60
+ padding-bottom: 4px;
61
+ }
62
+
63
+ #footer img {
64
+ height: 2em;
65
+ }
66
+
67
+ #main-menu-app-header,
68
+ #main-menu-app-description {
69
+ display: none;
70
+ }
71
+
72
+ #main-menu-app-logo {
73
+ width: 10vw;
74
+ }
75
+
76
+ .contained {
77
+ display: flex;
78
+ flex-direction: column;
79
+ align-items: center;
80
+ justify-content: space-evenly;
81
+ width: 30vw;
82
+ background-color: $body-bg;
83
+ border-radius: 1em;
84
+ border: 1px solid $body-bg;
85
+ padding: 1em;
86
+ }
87
+
88
+ .contained div {
89
+ margin-bottom: 1em;
90
+ }
91
+
92
+ #user_password,
93
+ #user_email {
94
+ display: block;
95
+ height: 34px;
96
+ padding: 6px 12px;
97
+ font-size: 14px;
98
+ line-height: 1.42857143;
99
+ color: $text-highlight;
100
+ background-color: $background;
101
+ background-image: none;
102
+ border: 1px solid $gray;
103
+ border-radius: 4px;
104
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
105
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
106
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
107
+ -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
108
+ -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
109
+ transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
110
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
111
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
112
+ }
113
+
114
+ .btn-default {
115
+ color: $gray-darker;
116
+ background-color: $text-highlight;
117
+ border-color: $gray;
118
+ }
119
+
120
+ .btn {
121
+ display: inline-block;
122
+ margin-bottom: 0;
123
+ font-weight: 400;
124
+ text-align: center;
125
+ white-space: nowrap;
126
+ vertical-align: middle;
127
+ -ms-touch-action: manipulation;
128
+ touch-action: manipulation;
129
+ cursor: pointer;
130
+ background-image: none;
131
+ border: 1px solid transparent;
132
+ padding: 6px 12px;
133
+ font-size: 14px;
134
+ line-height: 1.42857143;
135
+ border-radius: 4px;
136
+ -webkit-user-select: none;
137
+ -moz-user-select: none;
138
+ -ms-user-select: none;
139
+ user-select: none;
140
+ }
141
+
142
+ .form-check-label {
143
+ color: $gray-lighter;
144
+ }
145
+
146
+ .alert-warning {
147
+ color: $gray-dark;
148
+ background-color: $brand-warning;
149
+ border-color: $brand-warning;
150
+ }
151
+
152
+ .alert-success {
153
+ color: $gray-dark;
154
+ background-color: $brand-success;
155
+ border-color: $brand-success;
156
+ }
157
+
158
+ .alert-danger {
159
+ color: $gray-lighter;
160
+ background-color: $brand-danger;
161
+ border-color: $brand-danger;
162
+ }
163
+
164
+ .alert-info {
165
+ color: #5c5c5c;
166
+ background-color: $brand-info;
167
+ border-color: $gray-dark;
168
+ }
169
+
170
+ input[name=commit] {
171
+ color: $background;
172
+ background-color: $primary;
173
+ width: 100%;
174
+ border-color: $primary;
175
+ border-radius: 2em;
176
+ -webkit-appearance: button;
177
+ cursor: pointer;
178
+ text-decoration: none;
179
+ display: inline-block;
180
+ margin-bottom: 0;
181
+ font-weight: normal;
182
+ text-align: center;
183
+ white-space: nowrap;
184
+ vertical-align: middle;
185
+ touch-action: manipulation;
186
+ cursor: pointer;
187
+ background-image: none;
188
+ border: 1px solid transparent;
189
+ padding: 6px 12px;
190
+ font-size: 14px;
191
+ line-height: 1.428571429;
192
+ border-radius: 4px;
193
+ -webkit-user-select: none;
194
+ -moz-user-select: none;
195
+ -ms-user-select: none;
196
+ user-select: none;
197
+ }
198
+
199
+ @import '/devise/custom/sessions';
@@ -0,0 +1,22 @@
1
+ .alert {
2
+ position: absolute;
3
+ bottom: 3.3em !important;
4
+ top: auto !important;
5
+ right: 2.5em !important;
6
+ width: auto !important;
7
+ z-index: 9999 !important;
8
+ border-radius: 2em !important;
9
+ animation: hideMe 5s 1;
10
+ animation-fill-mode: forwards;
11
+ animation-delay: 2s;
12
+ }
13
+
14
+ @keyframes hideMe {
15
+ 0% {
16
+ opacity: 1;
17
+ }
18
+
19
+ 100% {
20
+ opacity: 0;
21
+ }
22
+ }
@@ -0,0 +1,48 @@
1
+ //** COLORS
2
+ $primary: #2e5670 !default;
3
+ //** Background color for `<body>`.
4
+ $body-bg: #fff !default;
5
+ //** Background on other Elements
6
+ $background: #f1f1f1 !default;
7
+ $shadows: #1c3444 !default;
8
+ $text-highlight: #fad23c !default;
9
+
10
+ $neutral: #999999 !default;
11
+ $success: #37BC9B !default;
12
+ $info: #ebebeb !default;
13
+ $warning: #F6BB42 !default;
14
+ $danger: #E9573F !default;
15
+
16
+ // COMPUTED FROM VARS
17
+ $element: $primary !default;
18
+ $element-text: darken($element, 70%) !default;;
19
+ $element-border: darken($element, 70%) !default;
20
+ $element-text-highlight: lighten($element-text, 10%) !default;
21
+
22
+ //## Gray and brand colors for use across Bootstrap.
23
+ // Gray Color
24
+ $gray-base: $neutral !default;
25
+ $gray-darker: lighten($gray-base, 13.5%) !default; // #222
26
+ $gray-dark: lighten($gray-base, 20%) !default; // #333
27
+ $gray: lighten($gray-base, 33.5%) !default; // #555
28
+ $gray-light: lighten($gray-base, 46.7%) !default; // #777
29
+ $gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
30
+
31
+ $brand-primary: darken($neutral, 6.5%) !default; // #337ab7
32
+ $brand-success: $success !default;
33
+ $brand-info: $info !default;
34
+ $brand-warning: $warning !default;
35
+ $brand-danger: $danger !default;
36
+
37
+ //** Global text color on `<body>`
38
+ $text: $gray-dark !default;
39
+ $text-color: $text !default;
40
+
41
+ $link: $text-color !default;
42
+ $link-highlight: lighten($link, 10%) !default;
43
+ //** Global textual link color.
44
+ $link-color: $brand-primary !default;
45
+ //** Link hover color set via `darken()` function.
46
+ $link-hover-color: darken($link-color, 15%) !default;
47
+ //** Link hover decoration.
48
+ $link-hover-decoration: underline !default;
@@ -1,40 +1,6 @@
1
- <style>
2
- .alerts {
3
- position: absolute;
4
- top: 1em !important;
5
- bottom: auto !important;
6
- right: 2.5em !important;
7
- width: auto !important;
8
- }
9
- .alert {
10
- z-index: 9999 !important;
11
- border-radius: 2em !important;
12
- animation: hideMe 5s 1;
13
- animation-fill-mode: forwards;
14
- animation-delay: 2s;
15
- }
16
- .close {
17
- background-color: transparent;
18
- border: none;
19
- }
20
- @keyframes hideMe {
21
- 0% {
22
- opacity: 1;
23
- }
24
- 100% {
25
- opacity: 0;
26
- }
27
- }
28
- </style>
29
-
30
- <div class="alerts">
31
1
  <% flash.each do |type, message| %>
32
- <%-unless [true, "true", :true].include? message%>
33
- <div class="alert <%= bootstrap_class_for(type) %> alert-dismissible fade-out show" role="alert">
34
- <button class="close" data-dismiss="alert">×</button>
35
- <span class="sr-only"><%= type.capitalize%>:</span>
36
- <%= message %>
37
- </div>
38
- <%-end%>
39
- <% end %>
2
+ <div class="alert <%= bootstrap_class_for(type) %> alert-dismissible">
3
+ <%= message %>
4
+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
40
5
  </div>
6
+ <%-end%>
@@ -10,4 +10,5 @@ Rails.application.config.assets.precompile += %w(
10
10
  devise/sessions.js
11
11
  thecore_ui_commons.js
12
12
  thecore_ui_commons.css
13
+ thecore_ui_commons/variables.css
13
14
  )
@@ -4,7 +4,8 @@ module ConcernApplicationController
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- protect_from_forgery prepend: true
7
+ # protect_from_forgery prepend: true
8
+ protect_from_forgery except: :sign_in, prepend: true
8
9
 
9
10
  rescue_from CanCan::AccessDenied do |exception|
10
11
  redirect_to main_app.root_url, alert: exception.message
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.11
4
+ version: 3.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-11 00:00:00.000000000 Z
11
+ date: 2023-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons
@@ -115,8 +115,11 @@ files:
115
115
  - app/assets/javascripts/manifest.json
116
116
  - app/assets/javascripts/rails_admin/main.js
117
117
  - app/assets/javascripts/thecore_ui_commons.js
118
- - app/assets/stylesheets/devise/sessions.css
118
+ - app/assets/stylesheets/devise/custom/sessions.scss
119
+ - app/assets/stylesheets/devise/sessions.scss
119
120
  - app/assets/stylesheets/thecore_ui_commons.scss
121
+ - app/assets/stylesheets/thecore_ui_commons/alerts.scss
122
+ - app/assets/stylesheets/thecore_ui_commons/variables.scss
120
123
  - app/helpers/thecore_helper.rb
121
124
  - app/views/contact_mailer/contact_message.html.erb
122
125
  - app/views/kaminari/_first_page.html.erb
@@ -1,185 +0,0 @@
1
- html, body {
2
- width: 100vw;
3
- height: 100vh;
4
- }
5
- body {
6
- margin: 0;
7
- background-color: #37505C;
8
- overflow: hidden;
9
- color: #FFEAD0;
10
- }
11
- h2 {
12
- display: none;
13
- }
14
- /* unvisited link */
15
- a:link {
16
- color: #F76F8E;
17
- }
18
-
19
- /* visited link */
20
- a:visited {
21
- color: #96616B;
22
- }
23
-
24
- /* mouse over link */
25
- a:hover {
26
- color: #FFEAD0;
27
- }
28
-
29
- /* selected link */
30
- a:active {
31
- color: #F76F8E;
32
- }
33
- .container {
34
- display : flex;
35
- flex-direction: column;
36
- align-items : center;
37
- justify-content: space-evenly;
38
- min-height: calc(100vh - 2em);
39
- }
40
- #footer {
41
- display : flex;
42
- align-items : center;
43
- justify-content: center;
44
- background-color: #113537;
45
- width: 100vw;
46
- height: 2em;
47
- color: #FFEAD0;
48
- padding-top: 4px;
49
- padding-bottom: 4px;
50
- }
51
- #footer img {
52
- height: 2em;
53
- }
54
- #main-menu-app-header, #main-menu-app-description {
55
- display: none;
56
- }
57
- #main-menu-app-logo {
58
- width: 10vw;
59
- }
60
- .contained {
61
- display : flex;
62
- flex-direction: column;
63
- align-items : center;
64
- justify-content: space-evenly;
65
- width: 30vw;
66
- background-color: #113537;
67
- border-radius: 1em;
68
- border: 1px solid #96616B;
69
- padding: 1em;
70
- }
71
- .contained div {
72
- margin-bottom: 1em;
73
- }
74
- #user_password, #user_email {
75
- display: block;
76
- height: 34px;
77
- padding: 6px 12px;
78
- font-size: 14px;
79
- line-height: 1.42857143;
80
- color: #555;
81
- background-color: #fff;
82
- background-image: none;
83
- border: 1px solid #ccc;
84
- border-radius: 4px;
85
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
86
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
87
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
88
- -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
89
- -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
90
- transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
91
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
92
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
93
- }
94
-
95
- .btn-default {
96
- color: #333;
97
- background-color: #fff;
98
- border-color: #ccc;
99
- }
100
-
101
- .btn {
102
- display: inline-block;
103
- margin-bottom: 0;
104
- font-weight: 400;
105
- text-align: center;
106
- white-space: nowrap;
107
- vertical-align: middle;
108
- -ms-touch-action: manipulation;
109
- touch-action: manipulation;
110
- cursor: pointer;
111
- background-image: none;
112
- border: 1px solid transparent;
113
- padding: 6px 12px;
114
- font-size: 14px;
115
- line-height: 1.42857143;
116
- border-radius: 4px;
117
- -webkit-user-select: none;
118
- -moz-user-select: none;
119
- -ms-user-select: none;
120
- user-select: none;
121
- }
122
-
123
- .form-check-label {
124
- color: #FFEAD0;
125
- }
126
-
127
- .alert-warning {
128
- color: #113537;
129
- background-color: #F6BB42;
130
- border-color: #96616B;
131
- }
132
-
133
- .alert-success {
134
- color: #113537;
135
- background-color: #37BC9B;
136
- border-color: #96616B;
137
- }
138
-
139
- .alert-danger {
140
- color: #113537;
141
- background-color: #E9573F;
142
- border-color: #96616B;
143
- }
144
-
145
- .alert-info {
146
- color: #113537;
147
- background-color: #CCCCCC;
148
- border-color: #96616B;
149
- }
150
-
151
- .alert {
152
- padding: 15px;
153
- margin-bottom: 20px;
154
- border: 1px solid transparent;
155
- border-radius: 4px;
156
- }
157
-
158
- input[name=commit] {
159
- color: white;
160
- background-color: #ED6A16;
161
- width: 100%;
162
- border-color: #BD4B39;
163
- border-radius: 2em;
164
- -webkit-appearance: button;
165
- cursor: pointer;
166
- text-decoration: none;
167
- display: inline-block;
168
- margin-bottom: 0;
169
- font-weight: normal;
170
- text-align: center;
171
- white-space: nowrap;
172
- vertical-align: middle;
173
- touch-action: manipulation;
174
- cursor: pointer;
175
- background-image: none;
176
- border: 1px solid transparent;
177
- padding: 6px 12px;
178
- font-size: 14px;
179
- line-height: 1.428571429;
180
- border-radius: 4px;
181
- -webkit-user-select: none;
182
- -moz-user-select: none;
183
- -ms-user-select: none;
184
- user-select: none;
185
- }