comable-frontend-fashionable 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +28 -0
- data/Rakefile +4 -0
- data/app/assets/images/10822071_04_75_JP.gif +0 -0
- data/app/assets/images/banner_QR.gif +0 -0
- data/app/assets/images/banner_fb.gif +0 -0
- data/app/assets/images/banner_member.gif +0 -0
- data/app/assets/images/banner_mm.gif +0 -0
- data/app/assets/images/banner_specialprice.jpg +0 -0
- data/app/assets/images/banner_staffsnapblog.jpg +0 -0
- data/app/assets/images/banner_tw.gif +0 -0
- data/app/assets/images/bt_delete.png +0 -0
- data/app/assets/images/bt_icon.png +0 -0
- data/app/assets/images/bt_login.png +0 -0
- data/app/assets/images/bt_member.png +0 -0
- data/app/assets/images/cart.png +0 -0
- data/app/assets/images/forget_icon.png +0 -0
- data/app/assets/images/header_logo.gif +0 -0
- data/app/assets/images/icon.png +0 -0
- data/app/assets/images/line_bg.gif +0 -0
- data/app/assets/images/logo.gif +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/menu_arrow_down.png +0 -0
- data/app/assets/images/menu_arrow_up.png +0 -0
- data/app/assets/images/pagetop.gif +0 -0
- data/app/assets/images/ranking_01.jpg +0 -0
- data/app/assets/images/ranking_icon01.png +0 -0
- data/app/assets/images/ranking_icon02.png +0 -0
- data/app/assets/images/ranking_icon03.png +0 -0
- data/app/assets/images/search.png +0 -0
- data/app/assets/images/shoes_02.jpg +0 -0
- data/app/assets/images/shoes_04.jpg +0 -0
- data/app/assets/images/shoes_05.jpg +0 -0
- data/app/assets/images/shoppingcart.png +0 -0
- data/app/assets/images/special01.jpg +0 -0
- data/app/assets/images/special02.jpg +0 -0
- data/app/assets/images/special03.jpg +0 -0
- data/app/assets/images/step_01.gif +0 -0
- data/app/assets/images/step_01.png +0 -0
- data/app/assets/images/step_02.gif +0 -0
- data/app/assets/images/step_02.png +0 -0
- data/app/assets/images/step_03.gif +0 -0
- data/app/assets/images/step_03.png +0 -0
- data/app/assets/images/step_04.gif +0 -0
- data/app/assets/images/step_04.png +0 -0
- data/app/assets/images/top.jpg +0 -0
- data/app/assets/images/tops_01.jpg +0 -0
- data/app/assets/images/tops_02.jpg +0 -0
- data/app/assets/images/tops_04.jpg +0 -0
- data/app/assets/javascripts/comable/application.js +15 -0
- data/app/assets/javascripts/comable/base.js.coffee +24 -0
- data/app/assets/javascripts/comable/products.js.coffee +32 -0
- data/app/assets/stylesheets/comable/application.css +14 -0
- data/app/assets/stylesheets/comable/carts.scss +339 -0
- data/app/assets/stylesheets/comable/common.scss +284 -0
- data/app/assets/stylesheets/comable/customers.scss +255 -0
- data/app/assets/stylesheets/comable/detail.css +225 -0
- data/app/assets/stylesheets/comable/footer-common.css +121 -0
- data/app/assets/stylesheets/comable/home.css +1 -0
- data/app/assets/stylesheets/comable/index.css +168 -0
- data/app/assets/stylesheets/comable/orders.scss +341 -0
- data/app/assets/stylesheets/comable/passwords.scss +205 -0
- data/app/assets/stylesheets/comable/products.scss +787 -0
- data/app/assets/stylesheets/comable/registrations.scss +278 -0
- data/app/assets/stylesheets/comable/sessions.scss +287 -0
- data/app/assets/stylesheets/comable/top.scss +262 -0
- data/app/assets/stylesheets/comable/users.scss +255 -0
- data/app/controllers/comable/application_controller.rb +23 -0
- data/app/decorators/comable/product_decorator.rb +26 -0
- data/app/decorators/comable/products_controller_decorator.rb +18 -0
- data/app/views/comable/carts/show.html.slim +53 -0
- data/app/views/comable/home/show.html.slim +50 -0
- data/app/views/comable/orders/confirm.slim +82 -0
- data/app/views/comable/orders/create.slim +17 -0
- data/app/views/comable/orders/delivery.slim +52 -0
- data/app/views/comable/orders/orderer.slim +72 -0
- data/app/views/comable/orders/payment.slim +60 -0
- data/app/views/comable/orders/shipment.slim +60 -0
- data/app/views/comable/orders/signin.slim +89 -0
- data/app/views/comable/products/index.html.slim +60 -0
- data/app/views/comable/products/show.html.slim +63 -0
- data/app/views/comable/shared/_address.slim +24 -0
- data/app/views/comable/shared/_address_form.slim +60 -0
- data/app/views/comable/shared/_footer.slim +17 -0
- data/app/views/comable/shared/_header.slim +30 -0
- data/app/views/comable/shared/_sidebar.slim +20 -0
- data/app/views/comable/users/_address.slim +14 -0
- data/app/views/comable/users/addresses.slim +58 -0
- data/app/views/comable/users/show.slim +35 -0
- data/app/views/devise/passwords/edit.slim +12 -0
- data/app/views/devise/passwords/new.slim +20 -0
- data/app/views/devise/registrations/edit.html.slim +45 -0
- data/app/views/devise/registrations/new.html.slim +30 -0
- data/app/views/devise/sessions/new.slim +32 -0
- data/app/views/errors/error_404.slim +6 -0
- data/app/views/errors/error_500.slim +6 -0
- data/app/views/layouts/comable/application.slim +51 -0
- data/app/views/layouts/comable/error.slim +42 -0
- data/config/initializers/assets.rb +2 -0
- data/config/locales/fashionable_en.yml +11 -0
- data/config/locales/fashionable_ja.yml +11 -0
- data/lib/comable/frontend/fashionable/engine.rb +14 -0
- data/lib/comable/frontend/fashionable.rb +7 -0
- metadata +233 -0
@@ -0,0 +1,262 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
/* CSS top */
|
3
|
+
|
4
|
+
/* -------------------------------- */
|
5
|
+
/* 検索 */
|
6
|
+
#MainSearch {
|
7
|
+
clear: both;
|
8
|
+
background: #d7d7d7;
|
9
|
+
margin: 0 0 20px 0;
|
10
|
+
}
|
11
|
+
#MainSearch .inner {
|
12
|
+
width: 747px;
|
13
|
+
margin: 0 auto;
|
14
|
+
padding: 20px 0;
|
15
|
+
}
|
16
|
+
#MainSearch .inner input.textBox {
|
17
|
+
width: 654px;
|
18
|
+
height: 30px;
|
19
|
+
border: #616161 1px solid;
|
20
|
+
border-radius: 5px;
|
21
|
+
margin: 0;
|
22
|
+
padding: 0;
|
23
|
+
}
|
24
|
+
input.btn {
|
25
|
+
width: 82px;
|
26
|
+
height: 32px;
|
27
|
+
border-style: none;
|
28
|
+
border-radius: 5px;
|
29
|
+
background: image-url("search.png") #616161 no-repeat;
|
30
|
+
background-position: 10px 7px;
|
31
|
+
text-indent: 14px;
|
32
|
+
font-size: 15px;
|
33
|
+
color: #fff;
|
34
|
+
letter-spacing: 2px;
|
35
|
+
padding: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
/* -------------------------------- */
|
39
|
+
/* News & TOPICS */
|
40
|
+
.information {
|
41
|
+
width: 778px;
|
42
|
+
border: #747272 1px solid;
|
43
|
+
background: #fff;
|
44
|
+
}
|
45
|
+
.information p.title {
|
46
|
+
background: #747272;
|
47
|
+
font-size: 16px;
|
48
|
+
font-family: "メイリオ", Meiryo;
|
49
|
+
font-weight: bold;
|
50
|
+
color: #fff;
|
51
|
+
letter-spacing: 1px;
|
52
|
+
padding: 2px 15px;
|
53
|
+
margin: 0 0 5px 0;
|
54
|
+
}
|
55
|
+
/* 更新内容 */
|
56
|
+
.information .box {
|
57
|
+
overflow: scroll;
|
58
|
+
height: 110px;
|
59
|
+
}
|
60
|
+
.information .box p.date {
|
61
|
+
padding: 0 15px;
|
62
|
+
line-height: 16px;
|
63
|
+
}
|
64
|
+
.information .box p.date span {
|
65
|
+
display: block;
|
66
|
+
}
|
67
|
+
.information .box p.date span.red {
|
68
|
+
color: #e70505;
|
69
|
+
}
|
70
|
+
p.date a {
|
71
|
+
color: #979797;
|
72
|
+
font-weight: bold;
|
73
|
+
}
|
74
|
+
p.date a:hover {
|
75
|
+
text-decoration: underline;
|
76
|
+
}
|
77
|
+
|
78
|
+
hr.info {
|
79
|
+
width: 748px;
|
80
|
+
border: none;
|
81
|
+
border-top: #b9b9b9 1px dotted;
|
82
|
+
margin: 0 auto:;
|
83
|
+
}
|
84
|
+
|
85
|
+
/* 特集バナー */
|
86
|
+
.special {
|
87
|
+
margin: 15px 0;
|
88
|
+
overflow: hidden;
|
89
|
+
}
|
90
|
+
.special img {
|
91
|
+
float: left;
|
92
|
+
border: #dfdfdf 1px solid;
|
93
|
+
margin: 0 5px;
|
94
|
+
}
|
95
|
+
.special img:hover {
|
96
|
+
opacity: 0.8;
|
97
|
+
filter: alpha(opacity=80);
|
98
|
+
-ms-filter: "alpha( opacity=80 )";
|
99
|
+
background: #fff;
|
100
|
+
}
|
101
|
+
|
102
|
+
/* product */
|
103
|
+
/* -------------------------------- */
|
104
|
+
#product {
|
105
|
+
width: 565px;
|
106
|
+
float: left;
|
107
|
+
}
|
108
|
+
|
109
|
+
.line-bg {
|
110
|
+
clear: both;
|
111
|
+
display: block;
|
112
|
+
border: none;
|
113
|
+
height: 11px;
|
114
|
+
background: image-url("line_bg.gif") repeat;
|
115
|
+
text-indent: -9999px;
|
116
|
+
margin: 18px 0;
|
117
|
+
}
|
118
|
+
/* 入荷アイテム */
|
119
|
+
.item-box {
|
120
|
+
border-left: #dfdfdf 1px solid;
|
121
|
+
overflow: hidden;
|
122
|
+
}
|
123
|
+
/* タイトル */
|
124
|
+
.item-box p.title {
|
125
|
+
border-right: #dfdfdf 1px solid;
|
126
|
+
font-family: "メイリオ", Meiryo;
|
127
|
+
font-weight: bold;
|
128
|
+
font-size: 22px;
|
129
|
+
padding: 5px 0 2px 15px;
|
130
|
+
}
|
131
|
+
.item-box p.title span {
|
132
|
+
font-size: 14px;
|
133
|
+
margin: 0 0 0 12px;
|
134
|
+
}
|
135
|
+
/* 商品 */
|
136
|
+
.item-box .item {
|
137
|
+
width: 130px;
|
138
|
+
height: 314px;
|
139
|
+
float: left;
|
140
|
+
border-top: #dfdfdf 1px solid;
|
141
|
+
border-right: #dfdfdf 1px solid;
|
142
|
+
border-bottom: #dfdfdf 1px solid;
|
143
|
+
padding: 0 0 0 10px;
|
144
|
+
}
|
145
|
+
.item-box .item img {
|
146
|
+
width: 120px;
|
147
|
+
height: 174px;
|
148
|
+
}
|
149
|
+
/* 商品名 */
|
150
|
+
.item-box .item h2 a {
|
151
|
+
width: 120px;
|
152
|
+
color: #000;
|
153
|
+
font-size: 12px;
|
154
|
+
font-weight: normal;
|
155
|
+
line-height: 14px;
|
156
|
+
}
|
157
|
+
|
158
|
+
/* 価格 */
|
159
|
+
.item-box .item p.price {
|
160
|
+
width: 120px;
|
161
|
+
font-size: 10px;
|
162
|
+
margin: 25px 0 0 0;
|
163
|
+
}
|
164
|
+
.item p.price span {
|
165
|
+
color: #e70505;
|
166
|
+
}
|
167
|
+
/* 新着 */
|
168
|
+
.item-box .item p.new {
|
169
|
+
width: 75px;
|
170
|
+
background: #f2546a;
|
171
|
+
text-align: center;
|
172
|
+
font-weight: bold;
|
173
|
+
color: #fff;
|
174
|
+
border-radius: 3px;
|
175
|
+
margin: 7px 0 5px 0;
|
176
|
+
}
|
177
|
+
/* 再入荷 */
|
178
|
+
.item-box .item p.repeat {
|
179
|
+
width: 75px;
|
180
|
+
background: #54b1f2;
|
181
|
+
text-align: center;
|
182
|
+
font-weight: bold;
|
183
|
+
color: #fff;
|
184
|
+
border-radius: 3px;
|
185
|
+
margin: 7px 0 5px 0;
|
186
|
+
}
|
187
|
+
.item-box .item p a {
|
188
|
+
color: #000;
|
189
|
+
}
|
190
|
+
/* もっと見る */
|
191
|
+
p.more {
|
192
|
+
text-align: right;
|
193
|
+
margin: 5px 0 30px 0;
|
194
|
+
}
|
195
|
+
p.more a {
|
196
|
+
color: #000;
|
197
|
+
}
|
198
|
+
p.more a:hover {
|
199
|
+
text-decoration: underline;
|
200
|
+
}
|
201
|
+
|
202
|
+
/* ランキング */
|
203
|
+
p.ranking {
|
204
|
+
text-align: center;
|
205
|
+
font-family: "メイリオ", Meiryo;
|
206
|
+
font-weight: bold;
|
207
|
+
font-size: 22px;
|
208
|
+
border-bottom: #dfdfdf 1px solid;
|
209
|
+
padding: 10px 0;
|
210
|
+
}
|
211
|
+
.rank-box {
|
212
|
+
float: left;
|
213
|
+
width: 178px;
|
214
|
+
height: 395px;
|
215
|
+
padding: 0 0 0 10px;
|
216
|
+
}
|
217
|
+
/* icon */
|
218
|
+
.rank {
|
219
|
+
width: 34px;
|
220
|
+
margin : 20px auto 10px;
|
221
|
+
}
|
222
|
+
.rank-box img.product {
|
223
|
+
width: 168px;
|
224
|
+
height: 243px;
|
225
|
+
}
|
226
|
+
|
227
|
+
/* 商品名 */
|
228
|
+
.rank-box h2 a {
|
229
|
+
width: 168px;
|
230
|
+
color: #000;
|
231
|
+
font-size: 12px;
|
232
|
+
font-weight: normal;
|
233
|
+
}
|
234
|
+
/* 価格 */
|
235
|
+
.rank-box .price {
|
236
|
+
width: 168px;
|
237
|
+
font-size: 10px;
|
238
|
+
margin: 20px 0 0 0;
|
239
|
+
}
|
240
|
+
.rank-box .price span {
|
241
|
+
display: block;
|
242
|
+
color: #e70505;
|
243
|
+
}
|
244
|
+
.rank-box p a {
|
245
|
+
color: #000;
|
246
|
+
}
|
247
|
+
|
248
|
+
/* side-banner */
|
249
|
+
/* -------------------------------- */
|
250
|
+
#side-banner {
|
251
|
+
width: 200px;
|
252
|
+
float: right;
|
253
|
+
}
|
254
|
+
#side-banner img {
|
255
|
+
margin: 0 0 10px 0;
|
256
|
+
}
|
257
|
+
#side-banner img:hover {
|
258
|
+
opacity: 0.8;
|
259
|
+
filter: alpha(opacity=80);
|
260
|
+
-ms-filter: "alpha( opacity=80 )";
|
261
|
+
background: #fff;
|
262
|
+
}
|
@@ -0,0 +1,255 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
/* CSS mypage */
|
3
|
+
|
4
|
+
|
5
|
+
/* -------------------------------- */
|
6
|
+
/* ログイン画面 */
|
7
|
+
/* -------------------------------- */
|
8
|
+
section {
|
9
|
+
width: 850px;
|
10
|
+
margin: 10px auto;
|
11
|
+
}
|
12
|
+
|
13
|
+
p.title {
|
14
|
+
font-size: 15px;
|
15
|
+
font-weight: bold;
|
16
|
+
background: image-url("icon.png") top left no-repeat;
|
17
|
+
background-position: 0px 3px;
|
18
|
+
text-indent: 23px;
|
19
|
+
}
|
20
|
+
|
21
|
+
p.left {
|
22
|
+
text-align: left;
|
23
|
+
margin: 5px 0 20px 0;
|
24
|
+
}
|
25
|
+
|
26
|
+
/* table */
|
27
|
+
.login {
|
28
|
+
width: 850px;
|
29
|
+
margin: 5px auto 20px;
|
30
|
+
}
|
31
|
+
.login th {
|
32
|
+
width: 150px;
|
33
|
+
background: #f1f1f1;
|
34
|
+
border: #ccc 1px solid;
|
35
|
+
padding: 10px 20px;
|
36
|
+
}
|
37
|
+
.login td {
|
38
|
+
font-size: 11px;
|
39
|
+
border: #ccc 1px solid;
|
40
|
+
padding: 10px 20px;
|
41
|
+
}
|
42
|
+
.login td span a {
|
43
|
+
color: #000;
|
44
|
+
text-decoration: underline;
|
45
|
+
margin: 0 0 0 60px;
|
46
|
+
}
|
47
|
+
.login td span a:hover {
|
48
|
+
color: #747474;
|
49
|
+
text-decoration: none;
|
50
|
+
}
|
51
|
+
|
52
|
+
/* -------------------------------- */
|
53
|
+
/* my page */
|
54
|
+
/* -------------------------------- */
|
55
|
+
.my-menu {
|
56
|
+
float: left;
|
57
|
+
width: 260px;
|
58
|
+
padding: 0 0 0 20px;
|
59
|
+
}
|
60
|
+
.my-menu p {
|
61
|
+
margin: 0 0 5px 0;
|
62
|
+
}
|
63
|
+
.my-menu p a {
|
64
|
+
color: #000;
|
65
|
+
}
|
66
|
+
.my-menu p a:hover {
|
67
|
+
text-decoration: underline;
|
68
|
+
}
|
69
|
+
|
70
|
+
/* 内容 */
|
71
|
+
.my-contents {
|
72
|
+
float: left;
|
73
|
+
width: 680px;
|
74
|
+
}
|
75
|
+
|
76
|
+
/* 注文履歴 */
|
77
|
+
.history {
|
78
|
+
width: 680px;
|
79
|
+
}
|
80
|
+
.history th {
|
81
|
+
text-align: center;
|
82
|
+
border: #ccc 1px solid;
|
83
|
+
background: #f1f1f1;
|
84
|
+
padding: 5px 20px;
|
85
|
+
}
|
86
|
+
.history td {
|
87
|
+
text-align: center;
|
88
|
+
border: #ccc 1px solid;
|
89
|
+
padding: 10px 20px;
|
90
|
+
}
|
91
|
+
|
92
|
+
/* メールアドレス・パスワード変更 */
|
93
|
+
.account {
|
94
|
+
width: 680px;
|
95
|
+
margin: 0 0 15px 0;
|
96
|
+
}
|
97
|
+
.account th {
|
98
|
+
vertical-align: top;
|
99
|
+
border: #ccc 1px solid;
|
100
|
+
background: #f1f1f1;
|
101
|
+
padding: 10px;
|
102
|
+
}
|
103
|
+
.account td {
|
104
|
+
border: #ccc 1px solid;
|
105
|
+
padding: 10px;
|
106
|
+
}
|
107
|
+
.account span {
|
108
|
+
display: block;
|
109
|
+
font-size: 11px;
|
110
|
+
}
|
111
|
+
/* 住所変更 */
|
112
|
+
.address {
|
113
|
+
width: 680px;
|
114
|
+
margin: 0 0 15px 0;
|
115
|
+
}
|
116
|
+
.address th {
|
117
|
+
width: 160px;
|
118
|
+
border: #ccc 1px solid;
|
119
|
+
background: #f1f1f1;
|
120
|
+
padding: 5px 0 5px 20px;
|
121
|
+
}
|
122
|
+
.address th span {
|
123
|
+
color: #e71f19;
|
124
|
+
}
|
125
|
+
.address td {
|
126
|
+
border: #ccc 1px solid;
|
127
|
+
padding: 5px 0 5px 20px;
|
128
|
+
}
|
129
|
+
|
130
|
+
/* 変更後 */
|
131
|
+
p.center {
|
132
|
+
text-align: center;
|
133
|
+
}
|
134
|
+
p.center a {
|
135
|
+
color: #000;
|
136
|
+
text-decoration: underline;
|
137
|
+
}
|
138
|
+
p.center a:hover {
|
139
|
+
color: #000;
|
140
|
+
text-decoration: none;
|
141
|
+
}
|
142
|
+
p.center span {
|
143
|
+
display: block;
|
144
|
+
font-size: 14px;
|
145
|
+
padding: 0 0 30px 0;
|
146
|
+
}
|
147
|
+
p.center span.strong {
|
148
|
+
display: block;
|
149
|
+
font-weight: bold;
|
150
|
+
padding: 30px 0;
|
151
|
+
}
|
152
|
+
|
153
|
+
/* -------------------------------- */
|
154
|
+
/* パスワード再発行 */
|
155
|
+
/* -------------------------------- */
|
156
|
+
.forget {
|
157
|
+
width: 980px;
|
158
|
+
margin: 10px 0 15px 0;
|
159
|
+
}
|
160
|
+
.forget th {
|
161
|
+
width: 160px;
|
162
|
+
border: #ccc 1px solid;
|
163
|
+
background: #f1f1f1;
|
164
|
+
padding: 5px 0 5px 20px;
|
165
|
+
}
|
166
|
+
.forget th span {
|
167
|
+
color: #e71f19;
|
168
|
+
}
|
169
|
+
.forget td {
|
170
|
+
border: #ccc 1px solid;
|
171
|
+
padding: 5px 0 5px 20px;
|
172
|
+
}
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
/* ボタン */
|
178
|
+
.bt-box {
|
179
|
+
overflow:hidden;
|
180
|
+
background: #ccc;
|
181
|
+
text-align: center;
|
182
|
+
padding: 20px;
|
183
|
+
margin: 5px 0 40px 0;
|
184
|
+
}
|
185
|
+
|
186
|
+
/* ログインボタン */
|
187
|
+
.btn {
|
188
|
+
float:left;
|
189
|
+
font-size:14px;
|
190
|
+
font-family:Arial;
|
191
|
+
font-weight:normal;
|
192
|
+
-moz-border-radius:3px;
|
193
|
+
-webkit-border-radius:3px;
|
194
|
+
border-radius:5px;
|
195
|
+
padding:6px 18px 5px 0;
|
196
|
+
text-indent: 40px;
|
197
|
+
background: image-url("bt_icon.png") no-repeat #000;
|
198
|
+
background-position: 18px 49%;
|
199
|
+
color:#ffffff;
|
200
|
+
display:inline-block;
|
201
|
+
margin:0 10px 10px 0;
|
202
|
+
}
|
203
|
+
.btn:hover {
|
204
|
+
opacity: 0.8;
|
205
|
+
filter: alpha(opacity=80);
|
206
|
+
-ms-filter: "alpha( opacity=80 )";
|
207
|
+
}
|
208
|
+
/* 2015/06/16追加 */
|
209
|
+
.btn-center {
|
210
|
+
font-size: 14px;
|
211
|
+
font-family: Arial;
|
212
|
+
font-weight: normal;
|
213
|
+
-moz-border-radius: 3px;
|
214
|
+
-webkit-border-radius: 3px;
|
215
|
+
border-radius: 5px;
|
216
|
+
padding: 6px 18px 5px 0;
|
217
|
+
text-indent: 40px;
|
218
|
+
background: image-url("bt_icon.png") no-repeat #000;
|
219
|
+
background-position: 18px 49%;
|
220
|
+
color: #ffffff;
|
221
|
+
display: inline-block;
|
222
|
+
}
|
223
|
+
|
224
|
+
/* ページナビ */
|
225
|
+
ul.pageNav {
|
226
|
+
margin: 0 0 10px;
|
227
|
+
padding: 10px 10px 5px;
|
228
|
+
text-align: right;
|
229
|
+
}
|
230
|
+
|
231
|
+
ul.pageNav li {
|
232
|
+
display: inline;
|
233
|
+
margin: 0 2px;
|
234
|
+
padding: 0;
|
235
|
+
}
|
236
|
+
|
237
|
+
ul.pageNav li span,
|
238
|
+
ul.pageNav li a {
|
239
|
+
color: #000;
|
240
|
+
display: inline-block;
|
241
|
+
margin-bottom: 5px;
|
242
|
+
padding: 4px 10px;
|
243
|
+
text-decoration: none;
|
244
|
+
vertical-align: middle;
|
245
|
+
}
|
246
|
+
ul.pageNav li span {
|
247
|
+
background: #aaaaaa;
|
248
|
+
color: #fff;
|
249
|
+
}
|
250
|
+
|
251
|
+
ul.pageNav li a:hover {
|
252
|
+
color: #000;
|
253
|
+
background: #e6e6e6;
|
254
|
+
border-color: #00f;
|
255
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Comable
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
include Comable::ApplicationHelper
|
4
|
+
#protect_from_forgery with: :exception
|
5
|
+
rescue_from StandardError, with: :render_500
|
6
|
+
rescue_from ActiveRecord::RecordNotFound, with: :render_404
|
7
|
+
rescue_from ActionController::RoutingError, with: :render_404
|
8
|
+
def render_404(exception = nil)
|
9
|
+
if exception
|
10
|
+
logger.info "Rendering 404 with exception: #{exception.message}"
|
11
|
+
end
|
12
|
+
render template: "errors/error_404", status: 404, layout: 'comable/error'
|
13
|
+
end
|
14
|
+
|
15
|
+
def render_500(exception = nil)
|
16
|
+
if exception
|
17
|
+
logger.info "Rendering 500 with exception: #{exception.message}"
|
18
|
+
end
|
19
|
+
render template: "errors/error_500", status: 500, layout: 'comable/application'
|
20
|
+
def show; raise env["action_dispatch.exception"]; end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Comable::Product.class_eval do
|
2
|
+
extend Enumerize
|
3
|
+
|
4
|
+
attr_accessor :per_page
|
5
|
+
attr_accessor :order_by
|
6
|
+
attr_accessor :filter_by_stocks
|
7
|
+
|
8
|
+
enumerize :per_page, in: %w(
|
9
|
+
20
|
10
|
+
40
|
11
|
+
60
|
12
|
+
100
|
13
|
+
), default: 20
|
14
|
+
|
15
|
+
enumerize :order_by, in: {
|
16
|
+
newly: { id: :desc },
|
17
|
+
high_price: { price: :desc },
|
18
|
+
low_price: :price
|
19
|
+
}, default: :newly
|
20
|
+
|
21
|
+
enumerize :filter_by_stocks, in: {
|
22
|
+
all: -> { Comable::Stock.all },
|
23
|
+
in_stock: -> { Comable::Stock.stocked },
|
24
|
+
out_of_stock: -> { Comable::Stock.unstocked }
|
25
|
+
}, default: :all
|
26
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Comable::ProductsController.class_eval do
|
2
|
+
def index
|
3
|
+
@products = @products.reorder(order_by)
|
4
|
+
@products = @products.joins(:stocks).merge(filter_by_stocks)
|
5
|
+
@products = @products.page(params[:page]).per(params[:per_page])
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def order_by
|
11
|
+
Comable::Product.order_by.find_value(params[:order_by]).try(:value)
|
12
|
+
end
|
13
|
+
|
14
|
+
def filter_by_stocks
|
15
|
+
value = Comable::Product.filter_by_stocks.find_value(params[:filter_by_stocks]).try(:value)
|
16
|
+
value.call if value
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#wrap
|
2
|
+
h2 ショッピングカート
|
3
|
+
hr.line-bg
|
4
|
+
- if current_comable_user.cart.errors.any?
|
5
|
+
.errors
|
6
|
+
ul
|
7
|
+
- current_comable_user.cart.errors.full_messages.each do |message|
|
8
|
+
li = message
|
9
|
+
- if current_comable_user.cart.empty?
|
10
|
+
= Comable.t('carts.empty')
|
11
|
+
- else
|
12
|
+
table.cart
|
13
|
+
tr
|
14
|
+
th 商品画像
|
15
|
+
th 品番・品名・詳細
|
16
|
+
th 数量
|
17
|
+
th 単価(税込)
|
18
|
+
th 小計
|
19
|
+
th 削除
|
20
|
+
- current_comable_user.cart.each do |cart_item|
|
21
|
+
- stock = cart_item.stock
|
22
|
+
- product = stock.product
|
23
|
+
tr
|
24
|
+
td.center
|
25
|
+
= link_to image_tag(product.image_url, width: '100'), comable.product_path(product)
|
26
|
+
td
|
27
|
+
.code
|
28
|
+
= product.code
|
29
|
+
.name
|
30
|
+
= stock.name_with_sku
|
31
|
+
.caption
|
32
|
+
= product.caption
|
33
|
+
- if cart_item.unstocked?
|
34
|
+
.error.soldout = Comable.t('carts.soldout')
|
35
|
+
td.center
|
36
|
+
= form_tag comable.cart_path, method: :put do
|
37
|
+
.form-inline.form-group
|
38
|
+
- selected = cart_item.quantity
|
39
|
+
= select_tag :quantity, options_for_select(1.upto([10, selected].max).to_a, selected)
|
40
|
+
= hidden_field_tag :stock_id, stock.id
|
41
|
+
= submit_tag Comable.t('actions.update'), class: 'btn-default'
|
42
|
+
td.right
|
43
|
+
= number_to_currency product.price
|
44
|
+
td.right
|
45
|
+
= number_to_currency product.price*cart_item.quantity
|
46
|
+
td.center
|
47
|
+
= link_to image_tag("bt_delete.png"), comable.cart_path(stock_id: stock.id), method: :delete
|
48
|
+
.btn-inner
|
49
|
+
= form_for current_order, as: :order, url: comable.checkout_cart_path, method: :put do |f|
|
50
|
+
= f.submit "ご注文画面へすすむ", class: 'btn btn-primary btn-lg btn-block'
|
51
|
+
|
52
|
+
/! end#wrap
|
53
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#main
|
2
|
+
.information
|
3
|
+
p.title News & TOPICS
|
4
|
+
.box-info
|
5
|
+
p.date
|
6
|
+
| 2014/12/5
|
7
|
+
span.red 【重要なご連絡】エレコマデモサイト K&Bスタイルでは、 一日ごとにデータリセットを行っております。 登録された情報は一日で消去されますので、ご了承ください。
|
8
|
+
hr.info/
|
9
|
+
p.date
|
10
|
+
| 2014/12/5
|
11
|
+
span
|
12
|
+
| 一部アイテムスペシャルプライス!この機会をお見逃しなく!
|
13
|
+
a href="#" プライスダウンセール会場はこちら☆
|
14
|
+
hr.info/
|
15
|
+
p.date
|
16
|
+
| 2014/12/5
|
17
|
+
span
|
18
|
+
| 大人気!
|
19
|
+
a href="#" > ダブルボタンガーリーコート(ベージュ)再入荷☆
|
20
|
+
| 数量限定ですので、早い者勝ちです!
|
21
|
+
hr.info/
|
22
|
+
p.date
|
23
|
+
| 2014/12/5
|
24
|
+
span ウィンターセール開催中!
|
25
|
+
hr.info/
|
26
|
+
p.date
|
27
|
+
| 2014/12/5
|
28
|
+
span 冬物一部プライスダウン!本日から期間限定ですので、この機会をお見逃しなく!
|
29
|
+
/! end.information
|
30
|
+
#product
|
31
|
+
/! New arrival 新着アイテム
|
32
|
+
hr.line-bg
|
33
|
+
.item-box
|
34
|
+
p.title
|
35
|
+
| New arrival
|
36
|
+
span 新着アイテム
|
37
|
+
- @products.order("id DESC").take(4).each_slice(4) do |products|
|
38
|
+
- products.each do |product|
|
39
|
+
.item
|
40
|
+
p.new New
|
41
|
+
= link_to comable.product_path(product), class: 'thumbnail' do
|
42
|
+
= image_tag product.image_url, width: '100'
|
43
|
+
.name
|
44
|
+
= link_to product.name, comable.product_path(product)
|
45
|
+
.price
|
46
|
+
= number_to_currency product.price
|
47
|
+
p.more
|
48
|
+
= link_to ' > もっと見る', comable.root_path
|
49
|
+
/! end#product
|
50
|
+
/! end#main
|