hot-glue 0.2.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -2
  3. data/Gemfile.lock +4 -24
  4. data/LICENCE +11 -4
  5. data/README.md +0 -524
  6. data/app/helpers/hot_glue/controller_helper.rb +8 -5
  7. data/app/views/layouts/_flash_notices.erb +12 -0
  8. data/lib/generators/hot_glue/install_generator.rb +110 -1
  9. data/lib/generators/hot_glue/markup_templates/erb.rb +68 -29
  10. data/lib/generators/hot_glue/markup_templates/haml.rb +5 -3
  11. data/lib/generators/hot_glue/scaffold_generator.rb +223 -58
  12. data/lib/generators/hot_glue/templates/capybara_login.rb +8 -0
  13. data/lib/generators/hot_glue/templates/controller.rb.erb +41 -32
  14. data/lib/generators/hot_glue/templates/erb/_form.erb +1 -1
  15. data/lib/generators/hot_glue/templates/erb/_line.erb +3 -2
  16. data/lib/generators/hot_glue/templates/erb/_list.erb +24 -8
  17. data/lib/generators/hot_glue/templates/erb/_show.erb +24 -4
  18. data/lib/generators/hot_glue/templates/erb/create.turbo_stream.erb +4 -4
  19. data/lib/generators/hot_glue/templates/erb/destroy.turbo_stream.erb +2 -2
  20. data/lib/generators/hot_glue/templates/erb/edit.erb +3 -13
  21. data/lib/generators/hot_glue/templates/erb/index.erb +11 -9
  22. data/lib/generators/hot_glue/templates/erb/update.turbo_stream.erb +5 -2
  23. data/lib/generators/hot_glue/templates/haml/_line.haml +1 -1
  24. data/lib/generators/hot_glue/templates/haml/_list.haml +6 -2
  25. data/lib/generators/hot_glue/templates/haml/create.turbo_stream.haml +3 -3
  26. data/lib/generators/hot_glue/templates/haml/destroy.turbo_stream.haml +1 -1
  27. data/lib/generators/hot_glue/templates/haml/edit.haml +0 -2
  28. data/lib/generators/hot_glue/templates/haml/index.haml +2 -3
  29. data/lib/generators/hot_glue/templates/system_spec.rb.erb +146 -47
  30. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_dark_knight.scss +158 -0
  31. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_like_bootstrap.scss +154 -0
  32. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_like_los_gatos.scss +182 -0
  33. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_like_mountain_view.scss +179 -0
  34. data/lib/hot-glue.rb +1 -2
  35. data/lib/hotglue/version.rb +1 -1
  36. metadata +15 -33
@@ -0,0 +1,158 @@
1
+ body {
2
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
3
+ background-color: black;
4
+ color: white;
5
+
6
+ .alert.alert-danger {
7
+ padding: 1em;
8
+ border: solid 1px crimson;
9
+ background-color: #ffd9d9;
10
+ color: black;
11
+ font-weight: bold;
12
+ }
13
+ }
14
+
15
+ .scaffold-container {
16
+
17
+
18
+
19
+
20
+ .cell input {
21
+ -webkit-writing-mode: horizontal-tb !important;
22
+ text-rendering: auto;
23
+ letter-spacing: normal;
24
+ word-spacing: normal;
25
+ line-height: normal;
26
+ text-transform: none;
27
+ text-indent: 0px;
28
+ text-shadow: none;
29
+ display: inline-block;
30
+ text-align: start;
31
+ appearance: auto;
32
+ -webkit-rtl-ordering: logical;
33
+ margin: 0em;
34
+ border-image: initial;
35
+
36
+ display: block;
37
+ padding: 0.375rem 0.75rem;
38
+ font-size: 1rem;
39
+ font-weight: 400;
40
+ line-height: 1.5;
41
+
42
+ background-clip: padding-box;
43
+ border: 1px solid #ced4da;
44
+ -webkit-appearance: none;
45
+ -moz-appearance: none;
46
+ appearance: none;
47
+ border-radius: 0.25rem;
48
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
49
+ color: #212529;
50
+ background-clip: padding-box;
51
+ border: 1px solid #ced4da;
52
+ }
53
+
54
+ .scaffold-row {
55
+ .scaffold-col-heading {
56
+ }
57
+ .scaffold-col, .scaffold-col-heading {
58
+
59
+ }
60
+
61
+ .scaffold-cell {
62
+ }
63
+
64
+ .scaffold-list {
65
+ flex: 0 0 auto;
66
+ width: 100%;
67
+ }
68
+ }
69
+
70
+ .container-fluid, .scaffold-container {
71
+ width: 100%;
72
+
73
+ margin-right: auto;
74
+ margin-left: auto;
75
+ }
76
+
77
+ .row {
78
+ display: flex;
79
+ --bs-gutter-x: 1.5rem;
80
+ --bs-gutter-y: 0;
81
+ display: flex;
82
+ flex-wrap: wrap;
83
+
84
+ margin-top: calc(-1 * var(--bs-gutter-y));
85
+ }
86
+
87
+ .btn-primary {
88
+ color: #212529;
89
+
90
+ background-color: #4D889E;
91
+ &:hover {
92
+ color: #fff;
93
+ border-color: #4D889E;
94
+ }
95
+ }
96
+
97
+ .btn-secondary {
98
+ color: white;
99
+
100
+ background-color: darkgrey;
101
+ &:hover {
102
+ color: lightgrey;
103
+ border-color: black;
104
+ }
105
+ }
106
+
107
+ .scaffold-list {
108
+ input, .btn {
109
+ font-size: 0.8rem;
110
+ font-weight: 400;
111
+ line-height: 1.4;
112
+ }
113
+
114
+
115
+ .scaffold-list {
116
+ input, .btn {
117
+ font-size: 0.8rem;
118
+ line-height: 1.2;
119
+ }
120
+
121
+
122
+
123
+ .scaffold-list {
124
+ input, .btn {
125
+ font-size: 0.55rem;
126
+ line-height: 1.0;
127
+ }
128
+ }
129
+ }
130
+ }
131
+
132
+
133
+ .btn {
134
+ display: inline-block;
135
+ font-weight: 400;
136
+ line-height: 1.5;
137
+ color: #212529;
138
+ text-align: center;
139
+ text-decoration: none;
140
+ vertical-align: middle;
141
+ cursor: pointer;
142
+ -webkit-user-select: none;
143
+ -moz-user-select: none;
144
+ -ms-user-select: none;
145
+ user-select: none;
146
+ border: 1px solid transparent;
147
+ padding: 0.375rem 0.75rem;
148
+ font-size: 1rem;
149
+ border-radius: 6px;
150
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
151
+
152
+ box-shadow: 0px 0px 12px 2px whitesmoke;
153
+ margin-right: 0.6em;
154
+ }
155
+
156
+
157
+
158
+ }
@@ -0,0 +1,154 @@
1
+ body {
2
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
3
+ background-color: white;
4
+ color: darkslategrey;
5
+
6
+ .alert.alert-danger {
7
+ padding: 1em;
8
+ border: 1px solid transparent;
9
+ color: #721c24;
10
+ background-color: #f8d7da;
11
+ border-color: #f5c6cb;
12
+ }
13
+ }
14
+
15
+
16
+ .scaffold-container {
17
+ .cell input {
18
+ -webkit-writing-mode: horizontal-tb !important;
19
+ text-rendering: auto;
20
+ letter-spacing: normal;
21
+ word-spacing: normal;
22
+ line-height: normal;
23
+ text-transform: none;
24
+ text-indent: 0px;
25
+ text-shadow: none;
26
+ display: inline-block;
27
+ text-align: start;
28
+ appearance: auto;
29
+ -webkit-rtl-ordering: logical;
30
+ margin: 0em;
31
+ border-image: initial;
32
+
33
+ display: block;
34
+ padding: 0.375rem 0.75rem;
35
+ font-size: 1rem;
36
+ font-weight: 400;
37
+ line-height: 1.5;
38
+
39
+ background-color: #fff;
40
+ background-clip: padding-box;
41
+ border: 1px solid #ced4da;
42
+ -webkit-appearance: none;
43
+ -moz-appearance: none;
44
+ appearance: none;
45
+ border-radius: 0.25rem;
46
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
47
+ color: #212529;
48
+ background-color: #fff;
49
+ background-clip: padding-box;
50
+ border: 1px solid #ced4da;
51
+ }
52
+
53
+ .scaffold-row {
54
+ .scaffold-col-heading {
55
+ }
56
+ .scaffold-col, .scaffold-col-heading {
57
+
58
+ }
59
+
60
+ .scaffold-cell {
61
+ }
62
+
63
+ .scaffold-list {
64
+ flex: 0 0 auto;
65
+ width: 100%;
66
+ }
67
+ }
68
+
69
+ .container-fluid, .scaffold-container {
70
+ width: 100%;
71
+
72
+ margin-right: auto;
73
+ margin-left: auto;
74
+ }
75
+
76
+ .row {
77
+ display: flex;
78
+ --bs-gutter-x: 1.5rem;
79
+ --bs-gutter-y: 0;
80
+ display: flex;
81
+ flex-wrap: wrap;
82
+
83
+ margin-top: calc(-1 * var(--bs-gutter-y));
84
+ }
85
+
86
+ .btn-primary {
87
+ color: #212529;
88
+
89
+ background-color: #0d6efd;
90
+ &:hover {
91
+ color: #fff;
92
+ border-color: #0a58ca;
93
+ }
94
+ }
95
+
96
+ .btn-secondary {
97
+ color: white;
98
+
99
+ background-color: darkgrey;
100
+ &:hover {
101
+ color: lightgrey;
102
+ border-color: black;
103
+ }
104
+ }
105
+
106
+ .scaffold-list {
107
+ input, .btn {
108
+ font-size: 0.8rem;
109
+ font-weight: 400;
110
+ line-height: 1.4;
111
+ }
112
+
113
+
114
+ .scaffold-list {
115
+ input, .btn {
116
+ font-size: 0.8rem;
117
+ line-height: 1.2;
118
+ }
119
+
120
+
121
+
122
+ .scaffold-list {
123
+ input, .btn {
124
+ font-size: 0.55rem;
125
+ line-height: 1.0;
126
+ }
127
+ }
128
+ }
129
+ }
130
+
131
+
132
+ .btn {
133
+ display: inline-block;
134
+ font-weight: 400;
135
+ line-height: 1.5;
136
+ color: #212529;
137
+ text-align: center;
138
+ text-decoration: none;
139
+ vertical-align: middle;
140
+ cursor: pointer;
141
+ -webkit-user-select: none;
142
+ -moz-user-select: none;
143
+ -ms-user-select: none;
144
+ user-select: none;
145
+ border: 1px solid transparent;
146
+ padding: 0.375rem 0.75rem;
147
+ font-size: 1rem;
148
+ border-radius: 0.25rem;
149
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
150
+ }
151
+
152
+
153
+
154
+ }
@@ -0,0 +1,182 @@
1
+ .scaffold-container {
2
+ -webkit-font-smoothing: antialiased;
3
+ font-family: 'Netflix Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
4
+ color: #737373;
5
+
6
+ font-size: .875rem;
7
+ letter-spacing: .2px;
8
+ input[type='submit'] {
9
+ background-color: rgba(255,255,255,0);
10
+ border: none;
11
+ }
12
+
13
+
14
+
15
+
16
+ .scaffold-cell {
17
+ textarea {
18
+
19
+ -webkit-box-sizing: border-box;
20
+ box-sizing: border-box;
21
+ margin: 1px!important;
22
+ padding: 3px 1px 3px 3px;
23
+ -webkit-transition: none;
24
+ transition: none;
25
+ }
26
+
27
+ input {
28
+ -webkit-writing-mode: horizontal-tb !important;
29
+ text-rendering: auto;
30
+ letter-spacing: normal;
31
+ word-spacing: normal;
32
+ line-height: normal;
33
+ text-transform: none;
34
+ text-indent: 0px;
35
+ text-shadow: none;
36
+ display: inline-block;
37
+ text-align: start;
38
+ appearance: auto;
39
+ -webkit-rtl-ordering: logical;
40
+ margin: 0em;
41
+ border-image: initial;
42
+
43
+ display: block;
44
+ padding: 0.375rem 0.75rem;
45
+ font-size: 1rem;
46
+ font-weight: 400;
47
+ line-height: 1.5;
48
+
49
+ background-color: #fff;
50
+ background-clip: padding-box;
51
+ -webkit-appearance: none;
52
+ -moz-appearance: none;
53
+ appearance: none;
54
+ border: 1px solid #ced4da;
55
+ border-radius: 1px;
56
+
57
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
58
+ color: #212529;
59
+ background-color: #fff;
60
+ background-clip: padding-box;
61
+
62
+ &[type=submit] {
63
+ border: none;
64
+ border-radius: 0;
65
+ }
66
+ }
67
+
68
+ input, textarea, select {
69
+ &:hover {
70
+ cursor: pointer;
71
+ }
72
+ background-color: #fff;
73
+ color: #222;
74
+
75
+ border: solid 1px #828282;
76
+ border-radius: 2px;
77
+
78
+
79
+ outline: none !important;
80
+
81
+ box-shadow: none;
82
+
83
+ &:focus, &:focus-visible {
84
+
85
+ outline: none !important;
86
+ }
87
+ }
88
+ }
89
+
90
+
91
+ .scaffold-row {
92
+ .scaffold-col-heading {
93
+ }
94
+ .scaffold-col, .scaffold-col-heading {
95
+
96
+ }
97
+
98
+ .scaffold-cell {
99
+ }
100
+
101
+ .scaffold-list {
102
+ flex: 0 0 auto;
103
+ width: 100%;
104
+ }
105
+ }
106
+
107
+ .container-fluid, .scaffold-container {
108
+ width: 100%;
109
+
110
+ margin-right: auto;
111
+ margin-left: auto;
112
+ }
113
+
114
+ .row {
115
+ display: flex;
116
+ --bs-gutter-x: 1.5rem;
117
+ --bs-gutter-y: 0;
118
+ flex-wrap: wrap;
119
+ margin-top: calc(-1 * var(--bs-gutter-y));
120
+ }
121
+
122
+ .btn-primary {
123
+ color: white;
124
+ background-color: #e50914;
125
+ border-radius: 2px;
126
+ &:hover {
127
+ color: darkslategrey;
128
+ }
129
+ }
130
+
131
+ .btn-secondary {
132
+ color: darkslategrey;
133
+
134
+ background-color: white;
135
+ &:hover {
136
+ color: lightgrey;
137
+ }
138
+ }
139
+
140
+ .scaffold-list {
141
+ input, .btn {
142
+ font-size: 0.8rem;
143
+ font-weight: 400;
144
+ line-height: 1.4;
145
+ }
146
+
147
+
148
+ .scaffold-list {
149
+ input, .btn {
150
+ font-size: 0.8rem;
151
+ line-height: 1.2;
152
+ }
153
+
154
+
155
+
156
+ .scaffold-list {
157
+ input, .btn {
158
+ font-size: 0.55rem;
159
+ line-height: 1.0;
160
+ }
161
+ }
162
+ }
163
+ }
164
+
165
+ .btn {
166
+ display: inline-block;
167
+ font-weight: 400;
168
+ line-height: 1.5;
169
+ color: #212529;
170
+ text-align: center;
171
+ text-decoration: none;
172
+ vertical-align: middle;
173
+ cursor: pointer;
174
+ -webkit-user-select: none;
175
+ -moz-user-select: none;
176
+ -ms-user-select: none;
177
+ user-select: none;
178
+ padding: 0.375rem 0.75rem;
179
+ font-size: 1rem;
180
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
181
+ }
182
+ }
@@ -0,0 +1,179 @@
1
+ .scaffold-container {
2
+ -webkit-font-smoothing: antialiased;
3
+ font-family: Roboto,RobotoDraft,Helvetica,Arial,sans-serif;
4
+ font-size: .875rem;
5
+ letter-spacing: .2px;
6
+ color: #202124;
7
+ input[type='submit'] {
8
+ background-color: rgba(255,255,255,0);
9
+ border: none;
10
+ }
11
+
12
+
13
+
14
+
15
+ .scaffold-cell {
16
+ textarea {
17
+ border: 1px solid #d9d9d9!important;
18
+ -webkit-border-radius: 1px;
19
+ border-radius: 1px;
20
+ border-top-color: #c0c0c0!important;
21
+ -webkit-box-sizing: border-box;
22
+ box-sizing: border-box;
23
+ margin: 1px!important;
24
+ padding: 3px 1px 3px 3px;
25
+ -webkit-transition: none;
26
+ transition: none;
27
+ background-color: #fff;
28
+ color: #222;
29
+ }
30
+
31
+ input {
32
+ -webkit-writing-mode: horizontal-tb !important;
33
+ text-rendering: auto;
34
+ letter-spacing: normal;
35
+ word-spacing: normal;
36
+ line-height: normal;
37
+ text-transform: none;
38
+ text-indent: 0px;
39
+ text-shadow: none;
40
+ display: inline-block;
41
+ text-align: start;
42
+ appearance: auto;
43
+ -webkit-rtl-ordering: logical;
44
+ margin: 0em;
45
+ border-image: initial;
46
+
47
+ display: block;
48
+ padding: 0.375rem 0.75rem;
49
+ font-size: 1rem;
50
+ font-weight: 400;
51
+ line-height: 1.5;
52
+
53
+ background-color: #fff;
54
+ background-clip: padding-box;
55
+ -webkit-appearance: none;
56
+ -moz-appearance: none;
57
+ appearance: none;
58
+ border: 1px solid #ced4da;
59
+ border-radius: 1px;
60
+
61
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
62
+ color: #212529;
63
+ background-color: #fff;
64
+ background-clip: padding-box;
65
+
66
+ &[type=submit] {
67
+ border: none;
68
+ border-radius: 0;
69
+ }
70
+ }
71
+
72
+ input, textarea, select {
73
+ &:hover {
74
+ cursor: pointer;
75
+ }
76
+
77
+ outline: none !important;
78
+ &:focus, &:focus-visible {
79
+ border: none;
80
+ box-shadow: inset 0 1px 2px rgba(0, 0,0, 30%);
81
+ outline: none !important;
82
+ }
83
+ }
84
+ }
85
+
86
+
87
+ .scaffold-row {
88
+ .scaffold-col-heading {
89
+ }
90
+ .scaffold-col, .scaffold-col-heading {
91
+
92
+ }
93
+
94
+ .scaffold-cell {
95
+ }
96
+
97
+ .scaffold-list {
98
+ flex: 0 0 auto;
99
+ width: 100%;
100
+ }
101
+ }
102
+
103
+ .container-fluid, .scaffold-container {
104
+ width: 100%;
105
+
106
+ margin-right: auto;
107
+ margin-left: auto;
108
+ }
109
+
110
+ .row {
111
+ display: flex;
112
+ --bs-gutter-x: 1.5rem;
113
+ --bs-gutter-y: 0;
114
+ display: flex;
115
+ flex-wrap: wrap;
116
+ margin-top: calc(-1 * var(--bs-gutter-y));
117
+ }
118
+
119
+ .btn-primary {
120
+ color: #212529;
121
+
122
+ &:hover {
123
+ color: darkslategrey;
124
+ }
125
+ }
126
+
127
+ .btn-secondary {
128
+ color: darkslategrey;
129
+
130
+ background-color: white;
131
+ &:hover {
132
+ color: lightgrey;
133
+ }
134
+ }
135
+
136
+ .scaffold-list {
137
+ input, .btn {
138
+ font-size: 0.8rem;
139
+ font-weight: 400;
140
+ line-height: 1.4;
141
+ }
142
+
143
+
144
+ .scaffold-list {
145
+ input, .btn {
146
+ font-size: 0.8rem;
147
+ line-height: 1.2;
148
+ }
149
+
150
+
151
+
152
+ .scaffold-list {
153
+ input, .btn {
154
+ font-size: 0.55rem;
155
+ line-height: 1.0;
156
+ }
157
+ }
158
+ }
159
+ }
160
+
161
+
162
+ .btn {
163
+ display: inline-block;
164
+ font-weight: 400;
165
+ line-height: 1.5;
166
+ color: #212529;
167
+ text-align: center;
168
+ text-decoration: none;
169
+ vertical-align: middle;
170
+ cursor: pointer;
171
+ -webkit-user-select: none;
172
+ -moz-user-select: none;
173
+ -ms-user-select: none;
174
+ user-select: none;
175
+ padding: 0.375rem 0.75rem;
176
+ font-size: 1rem;
177
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
178
+ }
179
+ }
data/lib/hot-glue.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "hotglue/engine"
2
-
3
2
  require 'kaminari'
4
- require 'haml-rails'
3
+
5
4
 
6
5
  module HotGlue
7
6
 
@@ -1,3 +1,3 @@
1
1
  module HotGlue
2
- VERSION = '0.2.4'
2
+ VERSION = '0.3.5'
3
3
  end