humdrum-rails 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/.gitignore +18 -0
  2. data/Features.md +23 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +1 -0
  7. data/humdrum-rails.gemspec +30 -0
  8. data/lib/humdrum/version.rb +4 -0
  9. data/lib/humdrum.rb +4 -0
  10. data/lib/rails/generators/humdrum/layout/layout_generator.rb +133 -0
  11. data/lib/rails/generators/humdrum/layout/templates/controllers/admin_controller.rb +5 -0
  12. data/lib/rails/generators/humdrum/layout/templates/controllers/application_controller.rb +14 -0
  13. data/lib/rails/generators/humdrum/layout/templates/controllers/public_controller.rb +5 -0
  14. data/lib/rails/generators/humdrum/layout/templates/controllers/user_controller.rb +5 -0
  15. data/lib/rails/generators/humdrum/layout/templates/controllers/welcome_controller.rb +7 -0
  16. data/lib/rails/generators/humdrum/layout/templates/helpers/display_helper.rb +41 -0
  17. data/lib/rails/generators/humdrum/layout/templates/helpers/meta_tags_helper.rb +3 -0
  18. data/lib/rails/generators/humdrum/layout/templates/helpers/navigation_helper.rb +19 -0
  19. data/lib/rails/generators/humdrum/layout/templates/helpers/title_helper.rb +15 -0
  20. data/lib/rails/generators/humdrum/layout/templates/images/favicon.ico +0 -0
  21. data/lib/rails/generators/humdrum/layout/templates/images/glyphicons-halflings-white.png +0 -0
  22. data/lib/rails/generators/humdrum/layout/templates/images/glyphicons-halflings.png +0 -0
  23. data/lib/rails/generators/humdrum/layout/templates/javascripts/bootstrap.js +2276 -0
  24. data/lib/rails/generators/humdrum/layout/templates/javascripts/modernizr.2.6.2.js +815 -0
  25. data/lib/rails/generators/humdrum/layout/templates/stylesheets/bootstrap-responsive.css +1109 -0
  26. data/lib/rails/generators/humdrum/layout/templates/stylesheets/bootstrap.css +6158 -0
  27. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/boilerplate.css.scss +299 -0
  28. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/box.css.scss +57 -0
  29. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/caligraphy.css.scss +30 -0
  30. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/dividers.css.scss +18 -0
  31. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/form.css.scss +80 -0
  32. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/misc.css.scss +9 -0
  33. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/normalize.css.scss +533 -0
  34. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/palettes.css.scss +66 -0
  35. data/lib/rails/generators/humdrum/layout/templates/stylesheets/humdrum/positioning.css.scss +702 -0
  36. data/lib/rails/generators/humdrum/layout/templates/stylesheets/overrides-bootstrap.css +24 -0
  37. data/lib/rails/generators/humdrum/layout/templates/views/layouts/admin/_footer.html.erb +0 -0
  38. data/lib/rails/generators/humdrum/layout/templates/views/layouts/admin/_header.html.erb +35 -0
  39. data/lib/rails/generators/humdrum/layout/templates/views/layouts/admin/_navbar.html.erb +0 -0
  40. data/lib/rails/generators/humdrum/layout/templates/views/layouts/admin.html.erb +65 -0
  41. data/lib/rails/generators/humdrum/layout/templates/views/layouts/common/_flash_message.html.erb +24 -0
  42. data/lib/rails/generators/humdrum/layout/templates/views/layouts/common/_meta_tags.html.erb +42 -0
  43. data/lib/rails/generators/humdrum/layout/templates/views/layouts/common/_overlays.html.erb +9 -0
  44. data/lib/rails/generators/humdrum/layout/templates/views/layouts/public/_footer.html.erb +0 -0
  45. data/lib/rails/generators/humdrum/layout/templates/views/layouts/public/_header.html.erb +35 -0
  46. data/lib/rails/generators/humdrum/layout/templates/views/layouts/public/_navbar.html.erb +0 -0
  47. data/lib/rails/generators/humdrum/layout/templates/views/layouts/public.html.erb +65 -0
  48. data/lib/rails/generators/humdrum/layout/templates/views/layouts/user/_footer.html.erb +0 -0
  49. data/lib/rails/generators/humdrum/layout/templates/views/layouts/user/_header.html.erb +35 -0
  50. data/lib/rails/generators/humdrum/layout/templates/views/layouts/user/_navbar.html.erb +0 -0
  51. data/lib/rails/generators/humdrum/layout/templates/views/layouts/user.html.erb +65 -0
  52. data/lib/rails/generators/humdrum/layout/templates/views/welcome/index.html.erb +5 -0
  53. data/lib/rails/generators/humdrum/resource/resource_generator.rb +237 -0
  54. data/lib/rails/generators/humdrum/resource/templates/config/locales/humdrum.en.yml +6 -0
  55. data/lib/rails/generators/humdrum/resource/templates/controllers/resource_controller.rb +192 -0
  56. data/lib/rails/generators/humdrum/resource/templates/migrations/create_resources.rb +14 -0
  57. data/lib/rails/generators/humdrum/resource/templates/models/resource.rb +5 -0
  58. data/lib/rails/generators/humdrum/resource/templates/views/resource/_edit.html.erb +7 -0
  59. data/lib/rails/generators/humdrum/resource/templates/views/resource/_filters.html.erb +9 -0
  60. data/lib/rails/generators/humdrum/resource/templates/views/resource/_form.html.erb +44 -0
  61. data/lib/rails/generators/humdrum/resource/templates/views/resource/_index.html.erb +22 -0
  62. data/lib/rails/generators/humdrum/resource/templates/views/resource/_item.html.erb +21 -0
  63. data/lib/rails/generators/humdrum/resource/templates/views/resource/_nav_filters.html.erb +9 -0
  64. data/lib/rails/generators/humdrum/resource/templates/views/resource/_new.html.erb +9 -0
  65. data/lib/rails/generators/humdrum/resource/templates/views/resource/_show.html.erb +38 -0
  66. data/lib/rails/generators/humdrum/resource/templates/views/resource/_summary.html.erb +10 -0
  67. data/lib/rails/generators/humdrum/resource/templates/views/resource/create.js.erb +15 -0
  68. data/lib/rails/generators/humdrum/resource/templates/views/resource/destroy.js.erb +14 -0
  69. data/lib/rails/generators/humdrum/resource/templates/views/resource/edit.js.erb +2 -0
  70. data/lib/rails/generators/humdrum/resource/templates/views/resource/index.html.erb +33 -0
  71. data/lib/rails/generators/humdrum/resource/templates/views/resource/index.js.erb +15 -0
  72. data/lib/rails/generators/humdrum/resource/templates/views/resource/new.js.erb +2 -0
  73. data/lib/rails/generators/humdrum/resource/templates/views/resource/show.js.erb +2 -0
  74. data/lib/rails/generators/humdrum/resource/templates/views/resource/update.js.erb +14 -0
  75. metadata +170 -0
@@ -0,0 +1,299 @@
1
+ /*
2
+ * HTML5 Boilerplate
3
+ *
4
+ * What follows is the result of much research on cross-browser styling.
5
+ * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
6
+ * Kroc Camen, and the H5BP dev community and team.
7
+ */
8
+
9
+ /* ==========================================================================
10
+ Base styles: opinionated defaults
11
+ ========================================================================== */
12
+
13
+ html,
14
+ button,
15
+ input,
16
+ select,
17
+ textarea {
18
+ color: #222;
19
+ }
20
+
21
+ body {
22
+ line-height: 1.4;
23
+ }
24
+
25
+ /*
26
+ * Remove text-shadow in selection highlight: h5bp.com/i
27
+ * These selection rule sets have to be separate.
28
+ * Customize the background color to match your design.
29
+ */
30
+
31
+ ::-moz-selection {
32
+ background: #b3d4fc;
33
+ text-shadow: none;
34
+ }
35
+
36
+ ::selection {
37
+ background: #b3d4fc;
38
+ text-shadow: none;
39
+ }
40
+
41
+ /*
42
+ * A better looking default horizontal rule
43
+ */
44
+
45
+ hr {
46
+ display: block;
47
+ height: 1px;
48
+ border: 0;
49
+ border-top: 1px solid #ccc;
50
+ margin: 1em 0;
51
+ padding: 0;
52
+ }
53
+
54
+ /*
55
+ * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
56
+ */
57
+
58
+ img {
59
+ vertical-align: middle;
60
+ }
61
+
62
+ /*
63
+ * Remove default fieldset styles.
64
+ */
65
+
66
+ fieldset {
67
+ border: 0;
68
+ margin: 0;
69
+ padding: 0;
70
+ }
71
+
72
+ /*
73
+ * Allow only vertical resizing of textareas.
74
+ */
75
+
76
+ textarea {
77
+ resize: vertical;
78
+ }
79
+
80
+ /* ==========================================================================
81
+ Chrome Frame prompt
82
+ ========================================================================== */
83
+
84
+ .chromeframe {
85
+ margin: 0.2em 0;
86
+ background: #ccc;
87
+ color: #000;
88
+ padding: 0.2em 0;
89
+ }
90
+
91
+ /* ==========================================================================
92
+ Author's custom styles
93
+ ========================================================================== */
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ /* ==========================================================================
112
+ Helper classes
113
+ ========================================================================== */
114
+
115
+ /*
116
+ * Image replacement
117
+ */
118
+
119
+ .ir {
120
+ background-color: transparent;
121
+ border: 0;
122
+ overflow: hidden;
123
+ /* IE 6/7 fallback */
124
+ *text-indent: -9999px;
125
+ }
126
+
127
+ .ir:before {
128
+ content: "";
129
+ display: block;
130
+ width: 0;
131
+ height: 150%;
132
+ }
133
+
134
+ /*
135
+ * Hide from both screenreaders and browsers: h5bp.com/u
136
+ */
137
+
138
+ .hidden {
139
+ display: none !important;
140
+ visibility: hidden;
141
+ }
142
+
143
+ /*
144
+ * Hide only visually, but have it available for screenreaders: h5bp.com/v
145
+ */
146
+
147
+ .visuallyhidden {
148
+ border: 0;
149
+ clip: rect(0 0 0 0);
150
+ height: 1px;
151
+ margin: -1px;
152
+ overflow: hidden;
153
+ padding: 0;
154
+ position: absolute;
155
+ width: 1px;
156
+ }
157
+
158
+ /*
159
+ * Extends the .visuallyhidden class to allow the element to be focusable
160
+ * when navigated to via the keyboard: h5bp.com/p
161
+ */
162
+
163
+ .visuallyhidden.focusable:active,
164
+ .visuallyhidden.focusable:focus {
165
+ clip: auto;
166
+ height: auto;
167
+ margin: 0;
168
+ overflow: visible;
169
+ position: static;
170
+ width: auto;
171
+ }
172
+
173
+ /*
174
+ * Hide visually and from screenreaders, but maintain layout
175
+ */
176
+
177
+ .invisible {
178
+ visibility: hidden;
179
+ }
180
+
181
+ /*
182
+ * Clearfix: contain floats
183
+ *
184
+ * For modern browsers
185
+ * 1. The space content is one way to avoid an Opera bug when the
186
+ * `contenteditable` attribute is included anywhere else in the document.
187
+ * Otherwise it causes space to appear at the top and bottom of elements
188
+ * that receive the `clearfix` class.
189
+ * 2. The use of `table` rather than `block` is only necessary if using
190
+ * `:before` to contain the top-margins of child elements.
191
+ */
192
+
193
+ .clearfix:before,
194
+ .clearfix:after {
195
+ content: " "; /* 1 */
196
+ display: table; /* 2 */
197
+ }
198
+
199
+ .clearfix:after {
200
+ clear: both;
201
+ }
202
+
203
+ /*
204
+ * For IE 6/7 only
205
+ * Include this rule to trigger hasLayout and contain floats.
206
+ */
207
+
208
+ .clearfix {
209
+ *zoom: 1;
210
+ }
211
+
212
+ /* ==========================================================================
213
+ EXAMPLE Media Queries for Responsive Design.
214
+ These examples override the primary ('mobile first') styles.
215
+ Modify as content requires.
216
+ ========================================================================== */
217
+
218
+ @media only screen and (min-width: 35em) {
219
+ /* Style adjustments for viewports that meet the condition */
220
+ }
221
+
222
+ @media print,
223
+ (-o-min-device-pixel-ratio: 5/4),
224
+ (-webkit-min-device-pixel-ratio: 1.25),
225
+ (min-resolution: 120dpi) {
226
+ /* Style adjustments for high resolution devices */
227
+ }
228
+
229
+ /* ==========================================================================
230
+ Print styles.
231
+ Inlined to avoid required HTTP connection: h5bp.com/r
232
+ ========================================================================== */
233
+
234
+ @media print {
235
+ * {
236
+ background: transparent !important;
237
+ color: #000 !important; /* Black prints faster: h5bp.com/s */
238
+ box-shadow: none !important;
239
+ text-shadow: none !important;
240
+ }
241
+
242
+ a,
243
+ a:visited {
244
+ text-decoration: underline;
245
+ }
246
+
247
+ a[href]:after {
248
+ content: " (" attr(href) ")";
249
+ }
250
+
251
+ abbr[title]:after {
252
+ content: " (" attr(title) ")";
253
+ }
254
+
255
+ /*
256
+ * Don't show links for images, or javascript/internal links
257
+ */
258
+
259
+ .ir a:after,
260
+ a[href^="javascript:"]:after,
261
+ a[href^="#"]:after {
262
+ content: "";
263
+ }
264
+
265
+ pre,
266
+ blockquote {
267
+ border: 1px solid #999;
268
+ page-break-inside: avoid;
269
+ }
270
+
271
+ thead {
272
+ display: table-header-group; /* h5bp.com/t */
273
+ }
274
+
275
+ tr,
276
+ img {
277
+ page-break-inside: avoid;
278
+ }
279
+
280
+ img {
281
+ max-width: 100% !important;
282
+ }
283
+
284
+ @page {
285
+ margin: 0.5cm;
286
+ }
287
+
288
+ p,
289
+ h2,
290
+ h3 {
291
+ orphans: 3;
292
+ widows: 3;
293
+ }
294
+
295
+ h2,
296
+ h3 {
297
+ page-break-after: avoid;
298
+ }
299
+ }
@@ -0,0 +1,57 @@
1
+ /* boxes */
2
+ .box {
3
+ border:1px solid #c1c1c1;
4
+ border-radius: 4px;
5
+ margin-bottom: 5px;
6
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
7
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
8
+ box-sizing: border-box;
9
+
10
+ -webkit-box-shadow: 2px 2px 5px #c1c1c1;
11
+ -moz-box-shadow: 2px 2px 5px #c1c1c1;
12
+ box-shadow: 2px 2px 5px #c1c1c1;
13
+
14
+ }
15
+ .box.hoverable:hover, .box.hoverable:active, .box.hoverable:focus, .box.hoverable.selected {
16
+ background-color:#e5eef6;
17
+ border-color:#25aae1;
18
+
19
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
20
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
21
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
22
+ transition: border linear 0.2s, box-shadow linear 0.2s;
23
+ }
24
+ .box.active{
25
+ background-color:#e5eef6;
26
+ }
27
+ .box-border-blue{
28
+ border-left: 5px solid #25aae1 !important;
29
+ }
30
+ .box-border-green{
31
+ border-left: 5px solid #5ebc5e !important;
32
+ }
33
+ .box-border-red{
34
+ border-left: 5px solid red !important;
35
+ }
36
+ .box-border-yellow{
37
+ border-left: 5px solid #e9e16d !important;
38
+ }
39
+ .box-border-grey{
40
+ border-left: 5px solid #989898 !important;
41
+ }
42
+
43
+ .box-blue{
44
+ background-color: #25aae1;
45
+ }
46
+ .box-green{
47
+ background-color: #5ebc5e;
48
+ }
49
+ .box-red{
50
+ background-color: red;
51
+ }
52
+ .box-yellow{
53
+ background-color: #e9e16d;
54
+ }
55
+ .box-grey{
56
+ background-color: #989898;
57
+ }
@@ -0,0 +1,30 @@
1
+ /* text styles */
2
+ .text-color-red { color: darkred;}
3
+ .text-color-blue { color: #24a9e1;}
4
+ .text-color-dark-grey { color: #4b4b4b; }
5
+ .text-color-grey { color: #898989; }
6
+ .text-color-light-grey { color: #999999; }
7
+ .text-color-white { color: #FFF; }
8
+ .text-color-green { color: green; }
9
+
10
+ .font-size-10{font-size:10px !important;}
11
+ .font-size-11{font-size:11px !important;}
12
+ .font-size-12{font-size:12px !important;}
13
+ .font-size-13{font-size:13px !important;}
14
+ .font-size-14{font-size:14px !important;}
15
+ .font-size-15{font-size:15px !important;}
16
+ .font-size-16{font-size:16px !important;}
17
+ .font-size-18{font-size:18px !important;}
18
+ .font-size-20{font-size:20px !important;}
19
+ .font-size-22{font-size:22px !important;}
20
+ .font-size-24{font-size:24px !important;}
21
+
22
+ .line-height-10{line-height:10px !important;}
23
+ .line-height-20{line-height:20px !important;}
24
+ .line-height-30{line-height:30px !important;}
25
+ .line-height-40{line-height:40px !important;}
26
+
27
+ /* To align text to Right / Left */
28
+ .text-align-center{ text-align: center !important; }
29
+ .text-align-left{ text-align: left !important; }
30
+ .text-align-right{ text-align: right !important; }
@@ -0,0 +1,18 @@
1
+ /* Dividers */
2
+ .border-right-black{ border-right:1px solid black; }
3
+ .border-left-black{ border-left:1px solid black; }
4
+ .border-top-black{ border-top:1px solid black; }
5
+ .border-bottom-black{ border-bottom:1px solid black; }
6
+ .border-right-red{ border-right:1px solid red; }
7
+ .border-left-red{ border-left:1px solid red; }
8
+ .border-top-red{ border-top:1px solid red; }
9
+ .border-bottom-red{ border-bottom:1px solid red; }
10
+ .border-right-green{ border-right:1px solid green; }
11
+ .border-left-green{ border-left:1px solid green; }
12
+ .border-top-green{ border-top:1px solid green; }
13
+ .border-bottom-green{ border-bottom:1px solid green; }
14
+
15
+ /* Dividers */
16
+
17
+ .divider-horrizontal { border-bottom: 1px solid #c1c1c1; width:100%;}
18
+ .divider-vertical { border-left: 1px solid #c1c1c1;float:left; height:200px}
@@ -0,0 +1,80 @@
1
+ .form-label label {
2
+ font-weight: bold;
3
+ }
4
+
5
+ .grid-error-label {
6
+ margin: 0px;
7
+ font-size: 14px;
8
+ font-weight: normal;
9
+ color: #FF0000;
10
+ text-align: left; }
11
+
12
+ .grid-error-field input {
13
+ border: 1px solid red;
14
+ margin: 0px;
15
+ font-size: 12px;
16
+ font-weight: normal;
17
+ font-family: arial;
18
+ color: #4B4B4B;
19
+ background-color: #FFF; }
20
+
21
+ .grid-error-field select {
22
+ border: 1px solid red; }
23
+
24
+ .grid-error-field textarea {
25
+ border: 1px solid red;
26
+ margin: 0px;
27
+ font-size: 12px;
28
+ font-weight: normal;
29
+ font-family: arial;
30
+ color: #4B4B4B;
31
+ background-color: #FFF; }
32
+
33
+ .grid-label {
34
+ margin: 0px;
35
+ font-size: 14px;
36
+ font-weight: normal;
37
+ color: #4B4B4B;
38
+ text-align: left; }
39
+
40
+ .error-message {
41
+ margin: 0px;
42
+ font-size: 12px;
43
+ font-weight: normal;
44
+ color: #FF0000;
45
+ text-align: left; }
46
+
47
+ .form-grid {
48
+ clear: both;
49
+ display: block; }
50
+
51
+ .form-grid .form-grid-row {
52
+ width: 100%;
53
+ padding: 2px 0px 2px 0px; }
54
+
55
+ .form-grid .form-grid-heading {
56
+ color: #FFFFFF;
57
+ width: 100%;
58
+ font-weight: bold; }
59
+
60
+ .form-grid .form-grid-cell {
61
+ float: left;
62
+ padding: 2px;
63
+ display: table-cell;
64
+ text-align: left;
65
+ vertical-align: middle;
66
+ margin-left: 5px; }
67
+
68
+ .form-grid .form-grid-cell input {
69
+ margin: 0px;
70
+ font-size: 12px;
71
+ font-weight: normal;
72
+ font-family: arial;
73
+ color: #4B4B4B; }
74
+
75
+ .form-grid .form-grid-cell textarea {
76
+ margin: 0px;
77
+ font-size: 12px;
78
+ font-weight: normal;
79
+ font-family: arial;
80
+ color: #4B4B4B; }
@@ -0,0 +1,9 @@
1
+ /* boxes */
2
+ .bold {
3
+ font-weight: bold !important; }
4
+
5
+ .italic {
6
+ font-style: italic; }
7
+
8
+ .underline {
9
+ text-decoration: underline; }