jap_mag 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +19 -7
- data/app/assets/javascripts/jap_mag/base.js +9 -0
- data/app/assets/javascripts/jap_mag.js +1 -0
- data/app/assets/stylesheets/{base.scss → jap_mag/base.scss} +31 -66
- data/app/assets/stylesheets/jap_mag/mixins.scss +69 -0
- data/app/assets/stylesheets/{variables.scss → jap_mag/variables.scss} +4 -2
- data/app/assets/stylesheets/{widgets.scss → jap_mag/widgets.scss} +54 -16
- data/app/assets/stylesheets/jap_mag.css +4 -4
- data/app/helpers/{widgets_helper.rb → jap_mag_widgets_helper.rb} +44 -1
- data/app/views/layouts/_tracking.erb +0 -0
- data/app/views/layouts/application.erb +8 -7
- data/config/locales/en.yml +3 -0
- data/lib/jap_mag.rb +10 -2
- metadata +13 -11
- data/app/assets/stylesheets/mixins.scss +0 -28
- data/app/controllers/application_controller.rb +0 -11
- data/lib/jap_mag/version.rb +0 -3
- /data/app/assets/stylesheets/{reset.scss → jap_mag/reset.scss} +0 -0
- /data/app/views/layouts/{_ga.erb → _rss.erb} +0 -0
data/README.md
CHANGED
@@ -6,25 +6,37 @@ This gem helps designers start a project that follows JapMag. It consists of sev
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
+
Please note JapMag only supports Rails 3+.
|
10
|
+
|
9
11
|
Add this line to your application's Gemfile:
|
10
12
|
|
11
|
-
gem 'jap_mag'
|
13
|
+
gem 'jap_mag', git: "git://github.com/felixding/JapMag.git"
|
12
14
|
|
13
15
|
And then execute:
|
14
16
|
|
15
17
|
$ bundle
|
16
18
|
|
17
|
-
|
19
|
+
In your CSS manifest (application.css in default):
|
18
20
|
|
19
|
-
|
21
|
+
*= require jap_mag
|
20
22
|
|
21
|
-
|
23
|
+
In your Javascript manifest (application.js in default):
|
22
24
|
|
23
|
-
|
25
|
+
//= require jquery
|
26
|
+
//= require jquery_ujs
|
27
|
+
//= require jap_mag
|
24
28
|
|
25
|
-
|
29
|
+
In your app/controllers/application_controll.rb, add
|
30
|
+
|
31
|
+
include JapMag
|
32
|
+
|
33
|
+
For a new Rails app, delete app/views/layout/application.html.erb.
|
34
|
+
|
35
|
+
Done! Now start your Rails app and you will see a JapMag-powered website!
|
36
|
+
|
37
|
+
## Usage
|
26
38
|
|
27
|
-
Documentation is
|
39
|
+
Documentation is on the way. Stay tuned!
|
28
40
|
|
29
41
|
## Contributing
|
30
42
|
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require jap_mag/base
|
@@ -6,7 +6,7 @@ body {
|
|
6
6
|
color: $color_body;
|
7
7
|
}
|
8
8
|
|
9
|
-
#
|
9
|
+
#wrapper {
|
10
10
|
width: $base_width;
|
11
11
|
padding: 10px;
|
12
12
|
margin: 0 auto;
|
@@ -16,10 +16,17 @@ a {
|
|
16
16
|
color: $color_blue;
|
17
17
|
text-decoration: none;
|
18
18
|
|
19
|
+
&.dangerous {
|
20
|
+
color: red;
|
21
|
+
}
|
22
|
+
|
23
|
+
&.edit {
|
24
|
+
color: $color_yellow;
|
25
|
+
}
|
19
26
|
|
20
27
|
&:hover {
|
21
28
|
color: #fff;
|
22
|
-
|
29
|
+
background-color: #000;
|
23
30
|
}
|
24
31
|
|
25
32
|
img {
|
@@ -37,7 +44,6 @@ em {
|
|
37
44
|
|
38
45
|
h1, h2, h3, h4 {
|
39
46
|
font-weight: normal;
|
40
|
-
color: black;
|
41
47
|
line-height: 1em;
|
42
48
|
margin: 0 0 1em;
|
43
49
|
-webkit-font-smoothing: antialiased;
|
@@ -54,14 +60,16 @@ h1 {
|
|
54
60
|
|
55
61
|
h2 {
|
56
62
|
font-size: 1.6em;
|
63
|
+
line-height: 1.6em;
|
57
64
|
}
|
58
65
|
|
59
66
|
h3 {
|
60
67
|
font-size: 1.4em;
|
68
|
+
line-height: 1.4em;
|
61
69
|
}
|
62
70
|
|
63
71
|
p {
|
64
|
-
margin:
|
72
|
+
margin: 0.5em 0;
|
65
73
|
}
|
66
74
|
|
67
75
|
blockquote {
|
@@ -83,6 +91,10 @@ blockquote {
|
|
83
91
|
overflow: hidden;
|
84
92
|
margin: 20px 0 0;
|
85
93
|
|
94
|
+
&.left {
|
95
|
+
float: left;
|
96
|
+
}
|
97
|
+
|
86
98
|
li {
|
87
99
|
float: left;
|
88
100
|
margin: 0 10px 0 0;
|
@@ -91,6 +103,8 @@ blockquote {
|
|
91
103
|
|
92
104
|
&:last-child {
|
93
105
|
border: none;
|
106
|
+
margin-right: 0;
|
107
|
+
padding-right: 0;
|
94
108
|
}
|
95
109
|
|
96
110
|
.highlight {
|
@@ -102,9 +116,21 @@ blockquote {
|
|
102
116
|
}
|
103
117
|
}
|
104
118
|
}
|
119
|
+
|
120
|
+
.admin-navigation {
|
121
|
+
@extend .navigation;
|
122
|
+
margin: 10px 0 0;
|
123
|
+
padding: 10px;
|
124
|
+
background: #eee;
|
125
|
+
float: left;
|
126
|
+
|
127
|
+
li {
|
128
|
+
border: none;
|
129
|
+
}
|
130
|
+
}
|
105
131
|
}
|
106
132
|
|
107
|
-
#
|
133
|
+
#body {
|
108
134
|
margin: 0;
|
109
135
|
padding: 0;
|
110
136
|
overflow: hidden;
|
@@ -145,65 +171,4 @@ blockquote {
|
|
145
171
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC) no-repeat 0 2px;
|
146
172
|
}
|
147
173
|
}
|
148
|
-
}
|
149
|
-
|
150
|
-
.field_with_errors {
|
151
|
-
padding: 2px;
|
152
|
-
background-color: red;
|
153
|
-
display: table;
|
154
|
-
}
|
155
|
-
|
156
|
-
#error_explanation {
|
157
|
-
width: 450px;
|
158
|
-
border: 2px solid red;
|
159
|
-
padding: 7px;
|
160
|
-
padding-bottom: 0;
|
161
|
-
margin-bottom: 20px;
|
162
|
-
background-color: #f0f0f0;
|
163
|
-
|
164
|
-
h2 {
|
165
|
-
text-align: left;
|
166
|
-
font-weight: bold;
|
167
|
-
padding: 5px 5px 5px 15px;
|
168
|
-
font-size: 1em;
|
169
|
-
margin: -7px;
|
170
|
-
margin-bottom: 0px;
|
171
|
-
background-color: #c00;
|
172
|
-
color: #fff;
|
173
|
-
}
|
174
|
-
|
175
|
-
ul li {
|
176
|
-
list-style: square;
|
177
|
-
}
|
178
|
-
}
|
179
|
-
|
180
|
-
ol.list {
|
181
|
-
list-style: decimal;
|
182
|
-
margin: 1em 0;
|
183
|
-
padding: 0 0 0 4em;
|
184
|
-
|
185
|
-
li {
|
186
|
-
margin: 0 0 0.5em 0;
|
187
|
-
}
|
188
|
-
}
|
189
|
-
|
190
|
-
/* iPhone 2G, 3G, 3GS Portrait */
|
191
|
-
@media only screen and (device-width: 320px) and (orientation: portrait) {
|
192
|
-
@include iphone(300px);
|
193
|
-
}
|
194
|
-
|
195
|
-
/* iPhone 2G, 3G, 3GS Landscape */
|
196
|
-
@media only screen and (max-device-width: 480px) and (orientation: landscape) {
|
197
|
-
/* CSS3 Rules for iPhone in Landscape Orientation */
|
198
|
-
@include iphone(460px);
|
199
|
-
}
|
200
|
-
|
201
|
-
/* iPhone 4, 4S Portrait */
|
202
|
-
@media only screen and (device-width: 480px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
|
203
|
-
@include iphone(300px);
|
204
|
-
}
|
205
|
-
|
206
|
-
/* iPhone 4, 4S Landscape */
|
207
|
-
@media only screen and (device-width: 960px) and (orientation: landscape) {
|
208
|
-
@include iphone(460px);
|
209
174
|
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
@mixin rounded($radius: 5px) {
|
2
|
+
border-radius: $radius;
|
3
|
+
-moz-border-radius: $radius;
|
4
|
+
-webkit-border-radius: $radius;
|
5
|
+
}
|
6
|
+
|
7
|
+
|
8
|
+
@mixin box-shadow($effect: 1px 0px 5px black) {
|
9
|
+
box-shadow: $effect;
|
10
|
+
-moz-box-shadow: $effect;
|
11
|
+
-webkit-box-shadow: $effect;
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin iphone_base {
|
15
|
+
html {
|
16
|
+
-webkit-text-size-adjust: none;
|
17
|
+
}
|
18
|
+
|
19
|
+
body {
|
20
|
+
font-size: 14px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#wrapper {
|
24
|
+
padding: 10px;
|
25
|
+
margin: 0 auto;
|
26
|
+
}
|
27
|
+
|
28
|
+
#body {
|
29
|
+
.primary {
|
30
|
+
margin: 0 0 10px 0;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
form.basic {
|
35
|
+
input[type=text], input[type=email], input[type=password], textarea {
|
36
|
+
width: 95%;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
@mixin set_width($base_width) {
|
42
|
+
#wrapper {
|
43
|
+
width: $base_width - 20px;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
/* iPhone 2G, 3G, 3GS, 4, 4S, 5 Portrait */
|
48
|
+
@mixin iphone_portrait {
|
49
|
+
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation: portrait) {
|
50
|
+
@include set_width(320px);
|
51
|
+
@content;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
/* iPhone 2G, 3G, 3GS, 4, 4S Landscape */
|
56
|
+
@mixin iphone_4s_landscape {
|
57
|
+
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation: landscape) {
|
58
|
+
@include set_width(480px);
|
59
|
+
@content;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
/* iPhone 5 Landscape */
|
64
|
+
@mixin iphone_5_landscape {
|
65
|
+
@media only screen and (width: 568px) and (orientation: landscape) {
|
66
|
+
@include set_width(568px);
|
67
|
+
@content;
|
68
|
+
}
|
69
|
+
}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
$base_width: 800px;
|
2
2
|
|
3
3
|
$color_green: #53a440;
|
4
|
-
$
|
4
|
+
$color_light_green: #7dde66;
|
5
|
+
$color_lighter_green: #65b453;
|
6
|
+
$color_blue: #3b7fa6; /*#56a1cc;*/
|
5
7
|
$color_light_blue: #6aa5c6;
|
6
8
|
$color_lighter_blue: #EBF8F9;
|
7
|
-
$color_red: #e75151
|
9
|
+
$color_red: #e75151;/*#ff5656;*/
|
8
10
|
$color_yellow: #fc9729;
|
9
11
|
$color_pink: #FF7676;
|
10
12
|
$color_body: #000;
|
@@ -71,10 +71,8 @@ table.basic {
|
|
71
71
|
border: none;
|
72
72
|
border-collapse: collapse;
|
73
73
|
border-spacing: 0;
|
74
|
-
font-size: 12px;
|
75
74
|
margin: 0;
|
76
75
|
padding: 0;
|
77
|
-
text-align: left;
|
78
76
|
width: 100%;
|
79
77
|
|
80
78
|
td, & th {
|
@@ -125,7 +123,7 @@ table.basic {
|
|
125
123
|
|
126
124
|
/* rating stars */
|
127
125
|
.rating {
|
128
|
-
background: url(/
|
126
|
+
background: url(data:image/gif;base64,R0lGODlhEAAwAOYAAKE3N8XFxemzG8yADefCWtSEhNBzc97e3uSvr8BgYOO4Q/fsvMVSUtbW1uK2NOS9Zvb29urLRtqpqe7u7t2oKfHcmt66uuzPea1GRvfp6ey8Iu3CMOnGQevNmc1sbPbhYvTf3/TZWvHOU+fn58daWtmdJc97e9eSkvfrtb9CQsJKSt+vMefEcuzHx+nHTO/FKe/VTPz47+a9QvLVWMxmZszMzPv12Pv15ua/OeiwJfHbot2qRfHcf71KStOPIqo/P+S7Su7DS+WtOO3Sq////9iMjNN8fPTWQOrJgfHNL/LQRfXeXemzIPnu7vLWVe3QWu7DQdGLGenHbu3Ly+/IT+W2OO3OSe+9Ke/OKeq1K961MclgYOu9RO+1QvLcV/DLOffenOi6uuvOh9uUlOy/SLRMTNaZK/LfsLhERPfWSv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAGoALAAAAAAQADAAAAf/gGqCg2oQE4SIiA0NiY0TiyONiouMkoIjDQcHmYkTmoublKAjEJuan6KpaqCiNa41izVEgqyxrrEQhK2vDTW5hJi9vJyIoa2LicapNYmUNZqvzIiukYMjNQGdkoeWIFOWiAY04IMtNDQI5Go0BgYk5Ag0RkZbRYktYwZbNCYeW+4MaBRAkKGfgXlGPDBgQMKDPxIMVKhxWIAGCYgRVaigEbGJoHNGMGpMwVGFx0H/SqpIQTJFBkQS/mlcedFEoiLnGOyLSCJBIgMe2l08R6JMooYMUhQ4gQYNgx+JNI4hJAEDgERhJFkAZ2OBOkFPInxdYMVKBXURnDjBQQ6MlRAhjDhcSISCxxMOb5V8EYHDARApOm48geFliWElL15soBKES5UVK9SIgPHhSJIkiTVoYMJFyIoYglxYWXL5hWYBZIRQAD1IxgzEpgUI4ELhBqIKHGaY1iCgSpUHiS5EiLABCpQsOarsSESAiggqMqpwcWwmkQIqVSiwQFKihJAoiSCLIdTBx4BEZyQNGRQIADs=) repeat-x 0 -32px;
|
129
127
|
height: 16px;
|
130
128
|
|
131
129
|
span {
|
@@ -282,6 +280,16 @@ form.basic {
|
|
282
280
|
}
|
283
281
|
}
|
284
282
|
}
|
283
|
+
|
284
|
+
ul.checkboxes {
|
285
|
+
li.checkbox {
|
286
|
+
margin: 0 0 10px;
|
287
|
+
|
288
|
+
label {
|
289
|
+
margin: 0 0 0 5px;
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
285
293
|
}
|
286
294
|
/* @end */
|
287
295
|
|
@@ -391,20 +399,11 @@ ul.scopes {
|
|
391
399
|
border-top: 1px solid #eee;
|
392
400
|
overflow: hidden;
|
393
401
|
|
394
|
-
&.description {
|
395
|
-
.key {
|
396
|
-
display: none;
|
397
|
-
}
|
398
|
-
|
399
|
-
.value {
|
400
|
-
width: 100%;
|
401
|
-
}
|
402
|
-
}
|
403
|
-
|
404
402
|
.key {
|
405
403
|
float: left;
|
406
404
|
width: 200px;
|
407
405
|
text-transform: uppercase;
|
406
|
+
font-weight: bold;
|
408
407
|
}
|
409
408
|
|
410
409
|
.value {
|
@@ -446,6 +445,45 @@ ul.scopes {
|
|
446
445
|
}
|
447
446
|
|
448
447
|
.list {
|
449
|
-
|
450
|
-
|
451
|
-
|
448
|
+
margin: 1em 0;
|
449
|
+
padding: 0 0 0 4em;
|
450
|
+
|
451
|
+
li {
|
452
|
+
margin: 0 0 0.5em 0;
|
453
|
+
}
|
454
|
+
}
|
455
|
+
|
456
|
+
ol.list {
|
457
|
+
list-style-type: decimal;
|
458
|
+
}
|
459
|
+
|
460
|
+
.field_with_errors {
|
461
|
+
padding: 2px;
|
462
|
+
background-color: red;
|
463
|
+
display: table;
|
464
|
+
}
|
465
|
+
|
466
|
+
#error_explanation {
|
467
|
+
width: 450px;
|
468
|
+
border: 2px solid red;
|
469
|
+
padding: 7px;
|
470
|
+
padding-bottom: 0;
|
471
|
+
margin-bottom: 20px;
|
472
|
+
background-color: #f0f0f0;
|
473
|
+
|
474
|
+
h2 {
|
475
|
+
text-align: left;
|
476
|
+
font-weight: bold;
|
477
|
+
padding: 5px 5px 5px 15px;
|
478
|
+
font-size: 1em;
|
479
|
+
margin: -7px;
|
480
|
+
margin-bottom: 0px;
|
481
|
+
background-color: #c00;
|
482
|
+
color: #fff;
|
483
|
+
}
|
484
|
+
|
485
|
+
ul {
|
486
|
+
list-style: square;
|
487
|
+
@extend .list;
|
488
|
+
}
|
489
|
+
}
|
@@ -9,8 +9,8 @@
|
|
9
9
|
* compiled file, but it's generally better to create a new file per style scope.
|
10
10
|
*
|
11
11
|
*= require_self
|
12
|
-
*= require reset
|
13
|
-
*= require variables
|
14
|
-
*= require widgets
|
15
|
-
*= require base
|
12
|
+
*= require jap_mag/reset
|
13
|
+
*= require jap_mag/variables
|
14
|
+
*= require jap_mag/widgets
|
15
|
+
*= require jap_mag/base
|
16
16
|
*/
|
@@ -1,4 +1,28 @@
|
|
1
|
-
module
|
1
|
+
module JapMagWidgetsHelper
|
2
|
+
|
3
|
+
def is_mobile_device?
|
4
|
+
mobile_user_agents = 'palm|blackberry|nokia|phone|midp|mobi|symbian|chtml|ericsson|minimo|audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|webos|amoi|novarra|cdm|alcatel|pocket|iphone|mobileexplorer|mobile'
|
5
|
+
request.user_agent.to_s.downcase =~ Regexp.new(mobile_user_agents)
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_body_class
|
9
|
+
c = []
|
10
|
+
c << controller.controller_name
|
11
|
+
c << "mobile" if is_mobile_device?
|
12
|
+
|
13
|
+
c.collect{|e| e.titleize.gsub(/\s/, "")}.join " "
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_body_id
|
17
|
+
content_for(:id).to_s.titleize.gsub(/\s/, "") unless content_for(:id).blank?
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_wrapper_class
|
21
|
+
c = []
|
22
|
+
c << controller.action_name
|
23
|
+
|
24
|
+
c.collect{|e| e.titleize.gsub(/\s/, "")}.join " "
|
25
|
+
end
|
2
26
|
|
3
27
|
#
|
4
28
|
# navigation helper
|
@@ -139,6 +163,25 @@ module WidgetsHelper
|
|
139
163
|
end
|
140
164
|
end
|
141
165
|
end
|
166
|
+
|
167
|
+
def last_deployed_at
|
168
|
+
file = File.join("tmp", "restart.txt")
|
169
|
+
File.exists?(file) ? File.atime(file) : nil
|
170
|
+
end
|
171
|
+
|
172
|
+
def current_controller_action_in?(*args)
|
173
|
+
args.each do |element|
|
174
|
+
if element.include?("#")
|
175
|
+
array = element.match(/([a-z\-\_]*)#([a-z\-\_]*)/).to_a
|
176
|
+
c, a = array[1], array[2]
|
177
|
+
return true if controller.controller_name == c && controller.action_name == a
|
178
|
+
else
|
179
|
+
return true if controller.controller_name == element
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
false
|
184
|
+
end
|
142
185
|
|
143
186
|
protected
|
144
187
|
|
File without changes
|
@@ -5,27 +5,28 @@
|
|
5
5
|
<meta charset="utf-8"/>
|
6
6
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
7
7
|
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1, minimum-scale=1,user-scalable=yes" />
|
8
|
-
|
8
|
+
<meta name="description" content="<%= t "slogan" %>" />
|
9
|
+
<meta name="keywords" content="<%= t "logo" %>" />
|
9
10
|
<title><%= content_for(:title) %></title>
|
10
|
-
|
11
11
|
<%= stylesheet_link_tag "application", :media => "all" %>
|
12
|
+
<%= javascript_include_tag "application" %>
|
13
|
+
<%= render "layouts/rss" %>
|
12
14
|
<%= csrf_meta_tags %>
|
13
15
|
</head>
|
14
16
|
|
15
|
-
<body class="<%=
|
16
|
-
<div class="<%=
|
17
|
+
<body class="<%= get_body_class %>"<%= " id=\"#{get_body_id}\"".html_safe if get_body_id %>>
|
18
|
+
<div class="<%= get_wrapper_class %>" id="wrapper">
|
17
19
|
<%= render :partial => "/layouts/header" %>
|
18
20
|
|
19
|
-
<div id="
|
21
|
+
<div id="body">
|
20
22
|
<%= render :partial => "/layouts/flash", :locals => {:flash => flash} %>
|
21
23
|
<%= yield %>
|
22
24
|
</div>
|
23
25
|
|
24
26
|
<%= render :partial => "/layouts/footer" %>
|
25
27
|
</div>
|
26
|
-
<%= render "/layouts/
|
28
|
+
<%= render "/layouts/tracking" if Rails.env.production? %>
|
27
29
|
<!-- layout:application -->
|
28
|
-
<%= javascript_include_tag "application" %>
|
29
30
|
<!--[if lt IE 9]>
|
30
31
|
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
31
32
|
<![endif]-->
|
data/lib/jap_mag.rb
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
require "jap_mag/version"
|
2
|
-
|
3
1
|
module JapMag
|
2
|
+
# i18N
|
3
|
+
def _ key, options={}
|
4
|
+
key = (key[0] == "/") ? key.gsub("/", "") : "#{params[:controller]}.#{params[:action]}.#{key}"
|
5
|
+
t(key, options)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.included base
|
9
|
+
base.helper_method :_
|
10
|
+
end
|
11
|
+
|
4
12
|
class Engine < Rails::Engine
|
5
13
|
end
|
6
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jap_mag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: JapMag is the design language created by Felix Ding. This gem helps designers
|
15
15
|
start a project that follows JapMag.
|
@@ -24,23 +24,25 @@ files:
|
|
24
24
|
- LICENSE
|
25
25
|
- README.md
|
26
26
|
- Rakefile
|
27
|
-
- app/assets/
|
27
|
+
- app/assets/javascripts/jap_mag.js
|
28
|
+
- app/assets/javascripts/jap_mag/base.js
|
28
29
|
- app/assets/stylesheets/jap_mag.css
|
29
|
-
- app/assets/stylesheets/
|
30
|
-
- app/assets/stylesheets/
|
31
|
-
- app/assets/stylesheets/
|
32
|
-
- app/assets/stylesheets/
|
33
|
-
- app/
|
34
|
-
- app/helpers/
|
30
|
+
- app/assets/stylesheets/jap_mag/base.scss
|
31
|
+
- app/assets/stylesheets/jap_mag/mixins.scss
|
32
|
+
- app/assets/stylesheets/jap_mag/reset.scss
|
33
|
+
- app/assets/stylesheets/jap_mag/variables.scss
|
34
|
+
- app/assets/stylesheets/jap_mag/widgets.scss
|
35
|
+
- app/helpers/jap_mag_widgets_helper.rb
|
35
36
|
- app/views/layouts/_flash.erb
|
36
37
|
- app/views/layouts/_footer.erb
|
37
|
-
- app/views/layouts/_ga.erb
|
38
38
|
- app/views/layouts/_header.erb
|
39
39
|
- app/views/layouts/_navigation.erb
|
40
|
+
- app/views/layouts/_rss.erb
|
41
|
+
- app/views/layouts/_tracking.erb
|
40
42
|
- app/views/layouts/application.erb
|
43
|
+
- config/locales/en.yml
|
41
44
|
- jap_mag.gemspec
|
42
45
|
- lib/jap_mag.rb
|
43
|
-
- lib/jap_mag/version.rb
|
44
46
|
homepage: https://github.com/felixding/JapMag
|
45
47
|
licenses: []
|
46
48
|
post_install_message:
|
@@ -1,28 +0,0 @@
|
|
1
|
-
@mixin rounded($radius: 5px) {
|
2
|
-
border-radius: $radius;
|
3
|
-
-moz-border-radius: $radius;
|
4
|
-
-webkit-border-radius: $radius;
|
5
|
-
}
|
6
|
-
|
7
|
-
|
8
|
-
@mixin box-shadow($effect: 1px 0px 5px black) {
|
9
|
-
box-shadow: $effect;
|
10
|
-
-moz-box-shadow: $effect;
|
11
|
-
-webkit-box-shadow: $effect;
|
12
|
-
}
|
13
|
-
|
14
|
-
@mixin iphone($base_width) {
|
15
|
-
html {
|
16
|
-
-webkit-text-size-adjust: none;
|
17
|
-
}
|
18
|
-
|
19
|
-
#body {
|
20
|
-
width: $base_width;
|
21
|
-
}
|
22
|
-
|
23
|
-
form.basic {
|
24
|
-
input[type=text], input[type=email], input[type=password], textarea {
|
25
|
-
width: 95%;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
data/lib/jap_mag/version.rb
DELETED
File without changes
|
File without changes
|