easy_cms 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +31 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/easy_cms.gemspec +36 -0
  13. data/lib/easy_cms.rb +5 -0
  14. data/lib/easy_cms/version.rb +3 -0
  15. data/lib/generators/easy_cms/model/model_generator.rb +71 -0
  16. data/lib/generators/easy_cms/model/templates/controllers/model_controller.erb +55 -0
  17. data/lib/generators/easy_cms/model/templates/layouts/_form.html.erb +26 -0
  18. data/lib/generators/easy_cms/model/templates/layouts/edit.html.erb +13 -0
  19. data/lib/generators/easy_cms/model/templates/layouts/index.html.erb +37 -0
  20. data/lib/generators/easy_cms/model/templates/layouts/item_navegation.html.erb +19 -0
  21. data/lib/generators/easy_cms/model/templates/layouts/new.html.erb +13 -0
  22. data/lib/generators/easy_cms/model/templates/layouts/show.html.erb +22 -0
  23. data/lib/generators/easy_cms/namespace/namespace_generator.rb +45 -0
  24. data/lib/generators/easy_cms/namespace/templates/assets/base_javascript.erb +3 -0
  25. data/lib/generators/easy_cms/namespace/templates/assets/base_scss.erb +1 -0
  26. data/lib/generators/easy_cms/namespace/templates/controllers/base_controller.erb +5 -0
  27. data/lib/generators/easy_cms/namespace/templates/layouts/layout.html.erb +71 -0
  28. data/lib/generators/resource_helpers.rb +31 -0
  29. data/vendor/assets/javascripts/.keep +0 -0
  30. data/vendor/assets/javascripts/easy_cms/base.js +351 -0
  31. data/vendor/assets/javascripts/easy_cms/bootstrap-notify.js +404 -0
  32. data/vendor/assets/javascripts/easy_cms/bootstrap.min.js +7 -0
  33. data/vendor/assets/javascripts/easy_cms/chartist.min.js +9 -0
  34. data/vendor/assets/javascripts/easy_cms/demo.js +183 -0
  35. data/vendor/assets/javascripts/easy_cms/jquery-3.1.0.min.js +4 -0
  36. data/vendor/assets/javascripts/easy_cms/material.min.js +1 -0
  37. data/vendor/assets/stylesheets/.keep +0 -0
  38. data/vendor/assets/stylesheets/easy_cms/bootstrap.min.css +5 -0
  39. data/vendor/assets/stylesheets/easy_cms/demo.css +64 -0
  40. data/vendor/assets/stylesheets/easy_cms/easy_cms.css +5065 -0
  41. data/vendor/assets/stylesheets/easy_cms/easy_cms_sass.scss +51 -0
  42. data/vendor/assets/stylesheets/easy_cms/md/_alerts.scss +57 -0
  43. data/vendor/assets/stylesheets/easy_cms/md/_buttons.scss +259 -0
  44. data/vendor/assets/stylesheets/easy_cms/md/_cards.scss +337 -0
  45. data/vendor/assets/stylesheets/easy_cms/md/_chartist.scss +254 -0
  46. data/vendor/assets/stylesheets/easy_cms/md/_checkboxes.scss +193 -0
  47. data/vendor/assets/stylesheets/easy_cms/md/_colors.scss +325 -0
  48. data/vendor/assets/stylesheets/easy_cms/md/_dialogs.scss +99 -0
  49. data/vendor/assets/stylesheets/easy_cms/md/_dropdown.scss +67 -0
  50. data/vendor/assets/stylesheets/easy_cms/md/_footers.scss +44 -0
  51. data/vendor/assets/stylesheets/easy_cms/md/_forms.scss +58 -0
  52. data/vendor/assets/stylesheets/easy_cms/md/_inputs-size.scss +223 -0
  53. data/vendor/assets/stylesheets/easy_cms/md/_inputs.scss +394 -0
  54. data/vendor/assets/stylesheets/easy_cms/md/_misc.scss +115 -0
  55. data/vendor/assets/stylesheets/easy_cms/md/_mixins.scss +422 -0
  56. data/vendor/assets/stylesheets/easy_cms/md/_navbars.scss +329 -0
  57. data/vendor/assets/stylesheets/easy_cms/md/_pills.scss +117 -0
  58. data/vendor/assets/stylesheets/easy_cms/md/_popups.scss +77 -0
  59. data/vendor/assets/stylesheets/easy_cms/md/_radios.scss +114 -0
  60. data/vendor/assets/stylesheets/easy_cms/md/_responsive.scss +453 -0
  61. data/vendor/assets/stylesheets/easy_cms/md/_ripples.scss +40 -0
  62. data/vendor/assets/stylesheets/easy_cms/md/_shadows.scss +138 -0
  63. data/vendor/assets/stylesheets/easy_cms/md/_sidebar-and-main-panel.scss +260 -0
  64. data/vendor/assets/stylesheets/easy_cms/md/_tables.scss +45 -0
  65. data/vendor/assets/stylesheets/easy_cms/md/_tabs.scss +53 -0
  66. data/vendor/assets/stylesheets/easy_cms/md/_togglebutton.scss +87 -0
  67. data/vendor/assets/stylesheets/easy_cms/md/_typography.scss +75 -0
  68. data/vendor/assets/stylesheets/easy_cms/md/_variables.scss +1127 -0
  69. data/vendor/assets/stylesheets/easy_cms/md/mixins/_chartist.scss +89 -0
  70. data/vendor/assets/stylesheets/easy_cms/md/mixins/_transparency.scss +20 -0
  71. data/vendor/assets/stylesheets/easy_cms/md/mixins/_vendor-prefixes.scss +185 -0
  72. data/vendor/assets/stylesheets/easy_cms/md/plugins/_animate.scss +227 -0
  73. data/vendor/assets/stylesheets/easy_cms/md/plugins/_plugin-nouislider.scss +161 -0
  74. metadata +174 -0
@@ -0,0 +1,99 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ //
4
+ // Modals
5
+ // Material Design element Dialogs
6
+ // --------------------------------------------------
7
+ .modal-content {
8
+ @include shadow-z-5();
9
+ border-radius: $border-radius-large;
10
+ border: none;
11
+ // Modal header
12
+ // Top section of the modal w/ title and dismiss
13
+ .modal-header {
14
+ border-bottom: none;
15
+ padding-top: 24px;
16
+ padding-right: 24px;
17
+ padding-bottom: 0;
18
+ padding-left: 24px;
19
+ }
20
+ // Modal body
21
+ // Where all modal content resides (sibling of .modal-header and .modal-footer)
22
+ .modal-body {
23
+ padding-top: 24px;
24
+ padding-right: 24px;
25
+ padding-bottom: 16px;
26
+ padding-left: 24px;
27
+ }
28
+ // Footer (for actions)
29
+ .modal-footer {
30
+ border-top: none;
31
+ padding: 7px;
32
+
33
+ &.text-center{
34
+ text-align: center;
35
+ }
36
+
37
+ button {
38
+ margin: 0;
39
+ padding-left: 16px;
40
+ padding-right: 16px;
41
+ width: auto;
42
+ &.pull-left {
43
+ padding-left: 5px;
44
+ padding-right: 5px;
45
+ position: relative;
46
+ left: -5px;
47
+ }
48
+ }
49
+ button+button {
50
+ margin-bottom: 16px;
51
+ }
52
+ }
53
+ .modal-body + .modal-footer {
54
+ padding-top: 0;
55
+ }
56
+ }
57
+ .modal-backdrop {
58
+ background: rgba(0,0,0,0.3);
59
+ }
60
+
61
+ .modal{
62
+ .modal-dialog{
63
+ margin-top: 100px;
64
+ }
65
+ .modal-header .close{
66
+ color: $gray-light;
67
+
68
+ &:hover,
69
+ &:focus{
70
+ opacity: 1;
71
+ }
72
+
73
+ i{
74
+ font-size: 16px;
75
+ }
76
+ }
77
+ }
78
+
79
+ .modal-notice {
80
+ .instruction{
81
+ margin-bottom: 25px;
82
+ }
83
+ .picture{
84
+ max-width: 150px;
85
+ }
86
+
87
+ .modal-content{
88
+ .btn-raised{
89
+ margin-bottom: 15px;
90
+ }
91
+ }
92
+ }
93
+
94
+ .modal-small{
95
+ width: 300px;
96
+ .modal-body{
97
+ margin-top: 20px;
98
+ }
99
+ }
@@ -0,0 +1,67 @@
1
+ .dropdown-menu {
2
+ border: 0;
3
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
4
+
5
+ .divider {
6
+ background-color: rgba(0, 0, 0, .12);
7
+ }
8
+
9
+
10
+ li > a{
11
+ font-size: $mdb-dropdown-font-size;
12
+ padding: 10px 20px;
13
+ margin: 0 5px;
14
+ border-radius: $border-radius-small;
15
+ @include transition($fast-transition-time, $transition-linear);
16
+
17
+ &:hover,
18
+ &:focus {
19
+ @include shadow-8dp();
20
+
21
+ }
22
+ }
23
+
24
+ &.dropdown-with-icons{
25
+ li > a{
26
+ padding: 12px 20px 12px 12px;
27
+
28
+ .material-icons{
29
+ vertical-align: middle;
30
+ font-size: 24px;
31
+ position: relative;
32
+ margin-top: -4px;
33
+ top: 1px;
34
+ margin-right: 12px;
35
+ opacity: .5;
36
+ }
37
+ }
38
+ }
39
+
40
+ li {
41
+ position: relative;
42
+ a:hover,
43
+ a:focus,
44
+ a:active {
45
+ background-color: $brand-primary;
46
+ color: #FFFFFF;
47
+ }
48
+ }
49
+
50
+ .divider{
51
+ margin: 5px 0;
52
+ }
53
+
54
+ .navbar &,
55
+ .navbar.navbar-default &{
56
+ li{
57
+ a:hover,
58
+ a:focus,
59
+ a:active {
60
+ background-color: $brand-primary;
61
+ color: #FFFFFF;
62
+ @include shadow-big-color($brand-primary);
63
+ }
64
+ }
65
+ }
66
+
67
+ }
@@ -0,0 +1,44 @@
1
+ footer{
2
+ padding: $padding-base 0;
3
+
4
+ ul{
5
+ margin-bottom: 0;
6
+ padding: 0;
7
+ list-style: none;
8
+
9
+ li{
10
+ display: inline-block;
11
+
12
+ a{
13
+ color: inherit;
14
+ padding: $padding-base;
15
+ font-weight: $font-weight-bold;
16
+ font-size: $mdb-btn-font-size-base;
17
+ text-transform: uppercase;
18
+ border-radius: $border-radius-base;
19
+ text-decoration: none;
20
+ position: relative;
21
+ display: block;
22
+
23
+ &:hover{
24
+ text-decoration: none;
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ .copyright{
31
+ padding: 15px 0;
32
+ margin: 0;
33
+ .material-icons{
34
+ font-size: 18px;
35
+ position: relative;
36
+ top: 3px;
37
+ }
38
+ }
39
+
40
+ .btn{
41
+ margin-top: 0;
42
+ margin-bottom: 0;
43
+ }
44
+ }
@@ -0,0 +1,58 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ @mixin mdb-label-color-toggle-focus(){
4
+ // override bootstrap focus and keep all the standard color (could be multiple radios in the form group)
5
+ .form-group.is-focused & {
6
+ color: $mdb-label-color;
7
+
8
+ // on focus just darken the specific labels, do not turn them to the brand-primary
9
+ &:hover,
10
+ &:focus {
11
+ color: $mdb-label-color-toggle-focus;
12
+ }
13
+
14
+ // correct the above focus color for disabled items
15
+ fieldset[disabled] & {
16
+ color: $mdb-label-color;
17
+ }
18
+ }
19
+ }
20
+
21
+ .form-horizontal {
22
+
23
+ // Consistent vertical alignment of radios and checkboxes
24
+ .radio,
25
+ .checkbox,
26
+ .radio-inline,
27
+ .checkbox-inline {
28
+ padding-top: 0;
29
+ }
30
+
31
+ .radio {
32
+ margin-bottom: 10px;
33
+ }
34
+
35
+ label {
36
+ text-align: right;
37
+ }
38
+
39
+ label.control-label {
40
+ margin: 0;
41
+ }
42
+ }
43
+
44
+ .form-newsletter{
45
+ .input-group,
46
+ .form-group{
47
+ float: left;
48
+ width: 78%;
49
+ margin-right: 2%;
50
+ margin-top: 9px;
51
+ }
52
+
53
+ .btn{
54
+ float: left;
55
+ width: 20%;
56
+ margin: 9px 0 0;
57
+ }
58
+ }
@@ -0,0 +1,223 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ //
4
+ // Forms - sizing - material - mirrors bootstrap/forms.less with custom sizing
5
+ //
6
+ // LEAVE THIS IDENTICAL TO THE BOOTSTRAP FILE - DO NOT CUSTOMIZE HERE.
7
+ //
8
+ // NOTE: this is intentionally kept structurally _identical_ to the bootstrap/forms.less file to make it easier
9
+ // to identify differences in sizing approaches to form inputs.
10
+ // --------------------------------------------------
11
+
12
+ legend {
13
+ margin-bottom: $mdb-input-line-height-computed;
14
+ font-size: ($mdb-input-font-size-base * 1.5);
15
+ }
16
+
17
+ // Adjust output element
18
+ output {
19
+ padding-top: ($mdb-input-padding-base-vertical + 1);
20
+ font-size: $mdb-input-font-size-base;
21
+ line-height: $mdb-input-line-height-base;
22
+ }
23
+
24
+ .form-control {
25
+ height: $mdb-input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
26
+ padding: $mdb-input-padding-base-vertical $mdb-input-padding-base-horizontal;
27
+ font-size: $mdb-input-font-size-base;
28
+ line-height: $mdb-input-line-height-base;
29
+ }
30
+
31
+ // Special styles for iOS temporal inputs
32
+ //
33
+ // In Mobile Safari, setting `display: block` on temporal inputs causes the
34
+ // text within the input to become vertically misaligned. As a workaround, we
35
+ // set a pixel line-height that matches the given height of the input, but only
36
+ // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
37
+ //
38
+ // Note that as of 8.3, iOS doesn't support `datetime` or `week`.
39
+
40
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
41
+ input[type="date"],
42
+ input[type="time"],
43
+ input[type="datetime-local"],
44
+ input[type="month"] {
45
+ &.form-control {
46
+ line-height: $mdb-input-height-base;
47
+ }
48
+
49
+ &.input-sm,
50
+ .input-group-sm & {
51
+ line-height: $mdb-input-height-small;
52
+ }
53
+
54
+ &.input-lg,
55
+ .input-group-lg & {
56
+ line-height: $mdb-input-height-large;
57
+ }
58
+ }
59
+ }
60
+
61
+ .radio,
62
+ .checkbox {
63
+
64
+ label {
65
+ min-height: $mdb-input-line-height-computed; // Ensure the input doesn't jump when there is no text
66
+ }
67
+ }
68
+
69
+
70
+ // Static form control text
71
+ //
72
+ // Apply class to a `p` element to make any string of text align with labels in
73
+ // a horizontal form layout.
74
+
75
+ .form-control-static {
76
+ // Size it appropriately next to real form controls
77
+ padding-top: ($mdb-input-padding-base-vertical + 1);
78
+ padding-bottom: ($mdb-input-padding-base-vertical + 1);
79
+ min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-base);
80
+ }
81
+
82
+
83
+ // Form control sizing
84
+ //
85
+ // Relative text size, padding, and border-radii changes for form controls. For
86
+ // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
87
+ // element gets special love because it's special, and that's a fact!
88
+
89
+ // mixin pulled from bootstrap and altered for less/sass compatibility with sass parent hack.
90
+ // bootstrap-sass has this one, but we would have to then convert it back to less. chicken meet egg.
91
+ @mixin input-size($parent, $mdb-input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius){
92
+
93
+ #{$parent} {
94
+ height: $mdb-input-height;
95
+ padding: $padding-vertical $padding-horizontal;
96
+ font-size: $font-size;
97
+ line-height: $line-height;
98
+ border-radius: $border-radius;
99
+ }
100
+
101
+ select#{$parent} {
102
+ height: $mdb-input-height;
103
+ line-height: $mdb-input-height;
104
+ }
105
+
106
+ textarea#{$parent},
107
+ select[multiple]#{$parent} {
108
+ height: auto;
109
+ }
110
+ }
111
+
112
+
113
+
114
+ // Form control sizing
115
+ //
116
+ // Build on `.form-control` with modifier classes to decrease or increase the
117
+ // height and font-size of form controls.
118
+ //
119
+ // The `.form-group-* form-control` variations are sadly duplicated to avoid the
120
+ // issue documented in https://github.com/twbs/bootstrap/issues/15074.
121
+ .input-sm {
122
+ @include input-size(unquote(".input-sm"), $mdb-input-height-small, $mdb-input-padding-small-vertical, $mdb-input-padding-small-horizontal, $mdb-input-font-size-small, $mdb-input-line-height-small, $mdb-input-border-radius-small);
123
+ }
124
+ .form-group-sm {
125
+ .form-control {
126
+ height: $mdb-input-height-small;
127
+ padding: $mdb-input-padding-small-vertical $mdb-input-padding-small-horizontal;
128
+ font-size: $mdb-input-font-size-small;
129
+ line-height: $mdb-input-line-height-small;
130
+ }
131
+ select.form-control {
132
+ height: $mdb-input-height-small;
133
+ line-height: $mdb-input-height-small;
134
+ }
135
+ textarea.form-control,
136
+ select[multiple].form-control {
137
+ height: auto;
138
+ }
139
+ .form-control-static {
140
+ height: $mdb-input-height-small;
141
+ min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-small);
142
+ padding: ($mdb-input-padding-small-vertical + 1) $mdb-input-padding-small-horizontal;
143
+ font-size: $mdb-input-font-size-small;
144
+ line-height: $mdb-input-line-height-small;
145
+ }
146
+ }
147
+
148
+ .input-lg {
149
+ @include input-size(unquote(".input-lg"), $mdb-input-height-large, $mdb-input-padding-large-vertical, $mdb-input-padding-large-horizontal, $mdb-input-font-size-large, $mdb-input-line-height-large, $mdb-input-border-radius-large);
150
+ }
151
+ .form-group-lg {
152
+ .form-control {
153
+ height: $mdb-input-height-large;
154
+ padding: $mdb-input-padding-large-vertical $mdb-input-padding-large-horizontal;
155
+ font-size: $mdb-input-font-size-large;
156
+ line-height: $mdb-input-line-height-large;
157
+ }
158
+ select.form-control {
159
+ height: $mdb-input-height-large;
160
+ line-height: $mdb-input-height-large;
161
+ }
162
+ textarea.form-control,
163
+ select[multiple].form-control {
164
+ height: auto;
165
+ }
166
+ .form-control-static {
167
+ height: $mdb-input-height-large;
168
+ min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-large);
169
+ padding: ($mdb-input-padding-large-vertical + 1) $mdb-input-padding-large-horizontal;
170
+ font-size: $mdb-input-font-size-large;
171
+ line-height: $mdb-input-line-height-large;
172
+ }
173
+ }
174
+
175
+
176
+ .form-horizontal {
177
+
178
+ // Consistent vertical alignment of radios and checkboxes
179
+ //
180
+ // Labels also get some reset styles, but that is scoped to a media query below.
181
+ .radio,
182
+ .checkbox,
183
+ .radio-inline,
184
+ .checkbox-inline {
185
+ padding-top: ($mdb-input-padding-base-vertical + 1); // Default padding plus a border
186
+ }
187
+ // Account for padding we're adding to ensure the alignment and of help text
188
+ // and other content below items
189
+ .radio,
190
+ .checkbox {
191
+ min-height: ($mdb-input-line-height-computed + ($mdb-input-padding-base-vertical + 1));
192
+ }
193
+
194
+ // Reset spacing and right align labels, but scope to media queries so that
195
+ // labels on narrow viewports stack the same as a default form example.
196
+ @media (min-width: $screen-sm-min) {
197
+ .control-label {
198
+ padding-top: ($mdb-input-padding-base-vertical + 1); // Default padding plus a border
199
+ }
200
+ }
201
+
202
+
203
+ // Form group sizes
204
+ //
205
+ // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
206
+ // inputs and labels within a `.form-group`.
207
+ .form-group-lg {
208
+ @media (min-width: $screen-sm-min) {
209
+ .control-label {
210
+ padding-top: (($mdb-input-padding-large-vertical * $mdb-input-line-height-large) + 1);
211
+ font-size: $mdb-input-font-size-large;
212
+ }
213
+ }
214
+ }
215
+ .form-group-sm {
216
+ @media (min-width: $screen-sm-min) {
217
+ .control-label {
218
+ padding-top: ($mdb-input-padding-small-vertical + 1);
219
+ font-size: $mdb-input-font-size-small;
220
+ }
221
+ }
222
+ }
223
+ }