cupboard 0.2.0
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.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Dockerfile +19 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/app/assets/images/category-cover.png +0 -0
- data/app/assets/images/category-default.jpg +0 -0
- data/app/assets/images/default-avatar.png +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/icook-logo.png +0 -0
- data/app/assets/images/icook-logo.svg +26 -0
- data/app/assets/images/logo-2x.png +0 -0
- data/app/assets/images/no-result.png +0 -0
- data/app/assets/images/recipe-default.png +0 -0
- data/app/assets/images/section_bg.jpg +0 -0
- data/app/assets/images/setting-pr.jpg +0 -0
- data/app/assets/images/step-placeholder.jpg +0 -0
- data/app/assets/images/vip-icon.svg +1 -0
- data/app/assets/pages/atomic.md +56 -0
- data/app/assets/pages/index.md +101 -0
- data/app/assets/stylesheets/_base.scss +4 -0
- data/app/assets/stylesheets/_basic.scss +22 -0
- data/app/assets/stylesheets/_components.scss +95 -0
- data/app/assets/stylesheets/_forms.scss +159 -0
- data/app/assets/stylesheets/_global.scss +40 -0
- data/app/assets/stylesheets/_images.scss +125 -0
- data/app/assets/stylesheets/_layouts.scss +4 -0
- data/app/assets/stylesheets/_lists.scss +203 -0
- data/app/assets/stylesheets/_mixins.scss +6 -0
- data/app/assets/stylesheets/_tables.scss +244 -0
- data/app/assets/stylesheets/_typography.scss +292 -0
- data/app/assets/stylesheets/_variables.scss +1 -0
- data/app/assets/stylesheets/_widgets.scss +50 -0
- data/app/assets/stylesheets/base/_badge.scss +89 -0
- data/app/assets/stylesheets/base/_buttons.scss +217 -0
- data/app/assets/stylesheets/components/_accordion.scss +69 -0
- data/app/assets/stylesheets/components/_breadcrumbs.scss +46 -0
- data/app/assets/stylesheets/components/_cards.scss +12 -0
- data/app/assets/stylesheets/components/_grid.scss +45 -0
- data/app/assets/stylesheets/components/_navigations.scss +12 -0
- data/app/assets/stylesheets/components/_pagination.scss +166 -0
- data/app/assets/stylesheets/components/_search-form.scss +56 -0
- data/app/assets/stylesheets/components/_sorting-cards.scss +76 -0
- data/app/assets/stylesheets/components/_text.scss +166 -0
- data/app/assets/stylesheets/components/alerts/_alert-global.scss +137 -0
- data/app/assets/stylesheets/components/alerts/_alert-market.scss +129 -0
- data/app/assets/stylesheets/components/cards/_dish-card.scss +244 -0
- data/app/assets/stylesheets/components/cards/_list-card.scss +168 -0
- data/app/assets/stylesheets/components/cards/_photo-card.scss +244 -0
- data/app/assets/stylesheets/components/cards/_product-card.scss +104 -0
- data/app/assets/stylesheets/components/cards/_recipe-card.scss +96 -0
- data/app/assets/stylesheets/components/cards/_video-card.scss +206 -0
- data/app/assets/stylesheets/components/comments/_comment-form.scss +222 -0
- data/app/assets/stylesheets/components/medias/_blog-feeds.scss +28 -0
- data/app/assets/stylesheets/components/medias/_brand-cover.scss +127 -0
- data/app/assets/stylesheets/components/medias/_brand-product.scss +35 -0
- data/app/assets/stylesheets/components/medias/_business-kitchen.scss +66 -0
- data/app/assets/stylesheets/components/medias/_categories-cover.scss +79 -0
- data/app/assets/stylesheets/components/medias/_hot-categories.scss +36 -0
- data/app/assets/stylesheets/components/medias/_popular-categories.scss +89 -0
- data/app/assets/stylesheets/components/medias/_popular-recipes.scss +38 -0
- data/app/assets/stylesheets/components/medias/_pr-lists.scss +53 -0
- data/app/assets/stylesheets/components/medias/_recipe-reference.scss +45 -0
- data/app/assets/stylesheets/components/medias/_user-recipes.scss +46 -0
- data/app/assets/stylesheets/components/navigations/_blog-nav.scss +120 -0
- data/app/assets/stylesheets/components/navigations/_brand-tabs-nav.scss +187 -0
- data/app/assets/stylesheets/components/navigations/_categories-nav-responsive.scss +131 -0
- data/app/assets/stylesheets/components/navigations/_categories-nav.scss +307 -0
- data/app/assets/stylesheets/components/navigations/_recipe-nav.scss +112 -0
- data/app/assets/stylesheets/components/navigations/_tv-nav.scss +283 -0
- data/app/assets/stylesheets/components/recipes/_ingredients.scss +223 -0
- data/app/assets/stylesheets/components/recipes/_notes.scss +60 -0
- data/app/assets/stylesheets/components/recipes/_steps.scss +153 -0
- data/app/assets/stylesheets/components/single_comment/_single-comment.scss +251 -0
- data/app/assets/stylesheets/layouts/_footer-nav.scss +151 -0
- data/app/assets/stylesheets/layouts/_footer.scss +48 -0
- data/app/assets/stylesheets/layouts/_footers.scss +12 -0
- data/app/assets/stylesheets/layouts/_global-navbar.scss +261 -0
- data/app/assets/stylesheets/layouts/_headers.scss +11 -0
- data/app/assets/stylesheets/layouts/_sub-header-market.scss +138 -0
- data/app/assets/stylesheets/mixins/_mixin-alert.scss +27 -0
- data/app/assets/stylesheets/mixins/_mixin-animation.scss +10 -0
- data/app/assets/stylesheets/mixins/_mixin-badge.scss +21 -0
- data/app/assets/stylesheets/mixins/_mixin-buttons.scss +21 -0
- data/app/assets/stylesheets/mixins/_mixin-icons.scss +32 -0
- data/app/assets/stylesheets/mixins/_mixin-type.scss +7 -0
- data/app/assets/stylesheets/variables/_color-palette.scss +222 -0
- data/app/assets/stylesheets/widgets/_brand-sidebar-widgets.scss +11 -0
- data/app/assets/stylesheets/widgets/_recipe-mark.scss +55 -0
- data/app/assets/stylesheets/widgets/_sidebar-widgets.scss +11 -0
- data/app/assets/stylesheets/widgets/_tv-sidebar-widgets.scss +11 -0
- data/app/assets/stylesheets/widgets/_user-sidebar-widgets.scss +11 -0
- data/app/assets/stylesheets/widgets/_widgets.scss +11 -0
- data/app/assets/stylesheets/widgets/brands/_pr-ingredients.scss +154 -0
- data/app/assets/stylesheets/widgets/brands/_pr-latest.scss +62 -0
- data/app/assets/stylesheets/widgets/brands/_pr-popular-recipe-lists.scss +51 -0
- data/app/assets/stylesheets/widgets/brands/_pr-recent.scss +59 -0
- data/app/assets/stylesheets/widgets/brands/_pr-video.scss +34 -0
- data/app/assets/stylesheets/widgets/features/_feature-events.scss +119 -0
- data/app/assets/stylesheets/widgets/features/_feature-slides.scss +144 -0
- data/app/assets/stylesheets/widgets/feeds/_blog-feeds.scss +144 -0
- data/app/assets/stylesheets/widgets/feeds/_tv-feeds.scss +143 -0
- data/app/assets/stylesheets/widgets/modal/_modal-reset.scss +40 -0
- data/app/assets/stylesheets/widgets/modal/_recipe-list-modal.scss +111 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_business-kitchen.scss +134 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_icook-video.scss +109 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_popular-recipe-lists.scss +232 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_popular-recipes.scss +105 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_popular-search.scss +317 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_recipes-collect.scss +45 -0
- data/app/assets/stylesheets/widgets/sidebar-widgets/_sidebar-widget.scss +62 -0
- data/app/assets/stylesheets/widgets/tv/_tv-more-recipes.scss +93 -0
- data/app/assets/stylesheets/widgets/tv/_tv-popular-tags.scss +78 -0
- data/app/assets/stylesheets/widgets/users/_fav-list.scss +197 -0
- data/app/assets/stylesheets/widgets/users/_user-stats.scss +330 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/config/initializers/assets.rb +5 -0
- data/cupboard.gemspec +40 -0
- data/example/.gitignore +19 -0
- data/lib/cupboard.rb +12 -0
- data/lib/cupboard/engine.rb +6 -0
- data/lib/cupboard/version.rb +3 -0
- metadata +298 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// --------------------------------
|
|
2
|
+
// Alert
|
|
3
|
+
// --------------------------------
|
|
4
|
+
|
|
5
|
+
/*doc
|
|
6
|
+
---
|
|
7
|
+
title: Alert
|
|
8
|
+
name: 04_Alert
|
|
9
|
+
category: UI components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Basic Alert
|
|
13
|
+
<p>basic alert</p>
|
|
14
|
+
|
|
15
|
+
```html_example
|
|
16
|
+
<div class="alert alert-error">Error</div>
|
|
17
|
+
<div class="alert alert-warning">warning</div>
|
|
18
|
+
<div class="alert alert-success">Success</div>
|
|
19
|
+
<div class="alert alert-info">Info</div>
|
|
20
|
+
<div class="alert alert-failed">Failed</div>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Alert with icon
|
|
24
|
+
<p><small>simply add `.alert-icon` class</small></p>
|
|
25
|
+
|
|
26
|
+
```html_example
|
|
27
|
+
<div class="alert alert-error alert-icon">Error</div>
|
|
28
|
+
<div class="alert alert-warning alert-icon">warning</div>
|
|
29
|
+
<div class="alert alert-success alert-icon">Success</div>
|
|
30
|
+
<div class="alert alert-info alert-icon">Info</div>
|
|
31
|
+
<div class="alert alert-failed alert-icon">Failed</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Dismissible alert
|
|
35
|
+
<p><small>alert can be closed by add `.alert-icon` class and `<a>` tag with `.close` class</small></p>
|
|
36
|
+
|
|
37
|
+
```html_example
|
|
38
|
+
<div class="alert alert-error alert-icon alert-dismissible">
|
|
39
|
+
<a href="#" class="close">x</a>Error
|
|
40
|
+
</div>
|
|
41
|
+
<div class="alert alert-warning alert-icon alert-dismissible">
|
|
42
|
+
<a href="#" class="close">x</a>Warning
|
|
43
|
+
</div>
|
|
44
|
+
<div class="alert alert-success alert-icon alert-dismissible">
|
|
45
|
+
<a href="#" class="close">x</a>Success
|
|
46
|
+
</div>
|
|
47
|
+
<div class="alert alert-info alert-icon alert-dismissible">
|
|
48
|
+
<a href="#" class="close">x</a>Info
|
|
49
|
+
</div>
|
|
50
|
+
<div class="alert alert-failed alert-icon alert-dismissible">
|
|
51
|
+
<a href="#" class="close">x</a>Failed
|
|
52
|
+
</div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## link in alert
|
|
56
|
+
<p><small>simply add `.alert-link` class to `<a>` tag in alert </small></p>
|
|
57
|
+
|
|
58
|
+
```html_example
|
|
59
|
+
<div class="alert alert-error alert-icon alert-dismissible">
|
|
60
|
+
<a href="#" class="close">x</a>Error. This is a <a href="#" class="alert-link">link to somewhere</a>.
|
|
61
|
+
</div>
|
|
62
|
+
<div class="alert alert-warning alert-icon alert-dismissible">
|
|
63
|
+
<a href="#" class="close">x</a>Warning. This is a <a href="#" class="alert-link">link to somewhere</a>.
|
|
64
|
+
</div>
|
|
65
|
+
<div class="alert alert-success alert-icon alert-dismissible">
|
|
66
|
+
<a href="#" class="close">x</a>Success. This is a <a href="#" class="alert-link">link to somewhere</a>.
|
|
67
|
+
</div>
|
|
68
|
+
<div class="alert alert-info alert-icon alert-dismissible">
|
|
69
|
+
<a href="#" class="close">x</a>Info. This is a <a href="#" class="alert-link">link to somewhere</a>.
|
|
70
|
+
</div>
|
|
71
|
+
<div class="alert alert-failed alert-icon alert-dismissible">
|
|
72
|
+
<a href="#" class="close">x</a>Failed. This is a <a href="#" class="alert-link">link to somewhere</a>.
|
|
73
|
+
</div>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
$alerts: (error: $ic-alert-error, warning: $ic-alert-warning, success: $ic-alert-success, info: $ic-alert-info, failed: $ic-alert-failed);
|
|
79
|
+
$aler-save: (success, info);
|
|
80
|
+
|
|
81
|
+
@each $type, $color in $alerts {
|
|
82
|
+
.alert-#{$type} {
|
|
83
|
+
@include alert-variant($color);
|
|
84
|
+
|
|
85
|
+
position: relative;
|
|
86
|
+
|
|
87
|
+
&.alert-icon {
|
|
88
|
+
padding-left: 59px;
|
|
89
|
+
position: relative;
|
|
90
|
+
|
|
91
|
+
@if ($type == "success") or ($type == "info") {
|
|
92
|
+
@include icon("\f06a");
|
|
93
|
+
} @else {
|
|
94
|
+
@include icon("\f071");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&::before {
|
|
98
|
+
background-color: $color;
|
|
99
|
+
color: $white;
|
|
100
|
+
height: 100%;
|
|
101
|
+
left: 0;
|
|
102
|
+
line-height: inherit;
|
|
103
|
+
margin-right: 0;
|
|
104
|
+
padding: 15px;
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 0;
|
|
107
|
+
width: 44px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.alert-dismissible {
|
|
112
|
+
padding-right: 15px; // override bootstrap
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.alert-link {
|
|
116
|
+
color: $color;
|
|
117
|
+
font-weight: normal; // override bootstrap
|
|
118
|
+
text-decoration: underline;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.close { background-color: $color;
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
color: $white;
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
font-weight: normal;
|
|
126
|
+
height: 18px;
|
|
127
|
+
line-height: 1.2;
|
|
128
|
+
opacity: 1; // override bootstrap
|
|
129
|
+
right: 0;
|
|
130
|
+
text-align: center;
|
|
131
|
+
text-shadow: none;
|
|
132
|
+
top: 0;
|
|
133
|
+
width: 18px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// --------------------------------
|
|
2
|
+
// Status messaging
|
|
3
|
+
// --------------------------------
|
|
4
|
+
|
|
5
|
+
/*doc
|
|
6
|
+
---
|
|
7
|
+
title: Status
|
|
8
|
+
name: 05_status
|
|
9
|
+
category: UI components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
### Market status notice
|
|
13
|
+
<p>link in notice</p>
|
|
14
|
+
|
|
15
|
+
```html_example
|
|
16
|
+
<div class="notice notice-unfinished">
|
|
17
|
+
請於下單 10 日內(含例假日)完成匯款交易,逾期將自動取消訂單。<br/>
|
|
18
|
+
若有任何問題請<a href="#">點此聯絡我們</a>。
|
|
19
|
+
</div>
|
|
20
|
+
<div class="notice notice-done">
|
|
21
|
+
訂單已匯款、出貨完成。<br/>
|
|
22
|
+
若有任何問題請<a href="#">點此聯絡我們</a>。
|
|
23
|
+
</div>
|
|
24
|
+
<div class="notice notice-preparing">
|
|
25
|
+
出貨處理中。<br/>
|
|
26
|
+
若有任何問題請<a href="#">點此聯絡我們</a>。
|
|
27
|
+
</div>
|
|
28
|
+
<div class="notice notice-expired">
|
|
29
|
+
繳費已逾期,請重新下單。<br/>
|
|
30
|
+
若有任何問題請<a href="#">點此聯絡我們</a>。
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<hr/>
|
|
35
|
+
<p>list in notice</p>
|
|
36
|
+
|
|
37
|
+
```html_example
|
|
38
|
+
<div class="notice notice-unfinished">
|
|
39
|
+
請於下單24小時內完成匯款交易,逾期將自動取消訂單。
|
|
40
|
+
<ul>
|
|
41
|
+
<li>匯款銀行代碼: 807</li>
|
|
42
|
+
<li>匯款帳號: 123456789</li>
|
|
43
|
+
<li>匯款金額: 9000 元</li>
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
<hr/>
|
|
49
|
+
### No result status
|
|
50
|
+
<div class="ic-no-result"><p>no recipes/dishes</p></div>
|
|
51
|
+
|
|
52
|
+
```html_example
|
|
53
|
+
<div class="no-result">
|
|
54
|
+
<p>目前沒有任何新的食譜或料理喔,趕快去 <a href="#">發表新食譜</a> 吧!</p>
|
|
55
|
+
<img src="/images/no-result.png" alt="No result">
|
|
56
|
+
</div>
|
|
57
|
+
```
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
// notice
|
|
61
|
+
$notice-unfinished-text: $orange !default;
|
|
62
|
+
$notice-unfinished-bg: #ffeae5 !default;
|
|
63
|
+
$notice-done-text: #a0bd4b !default;
|
|
64
|
+
$notice-done-bg: #eeffe5 !default;
|
|
65
|
+
$notice-preparing-text: #666 !default;
|
|
66
|
+
$notice-preparing-bg: $white !default;
|
|
67
|
+
$notice-expired-text: $black !default;
|
|
68
|
+
$notice-expired-bg: #e6e6e6 !default;
|
|
69
|
+
$notice-list-item-text: #888 !default;
|
|
70
|
+
// no-result
|
|
71
|
+
$no-result-bg: #f9f8f6 !default;
|
|
72
|
+
$no-result-text: #999 !default;
|
|
73
|
+
|
|
74
|
+
@each $type, $text-color, $bg-color in
|
|
75
|
+
(unfinished, $notice-unfinished-text, $notice-unfinished-bg),
|
|
76
|
+
(done, $notice-done-text, $notice-done-bg),
|
|
77
|
+
(preparing, $notice-preparing-text, $notice-preparing-bg),
|
|
78
|
+
(expired, $notice-expired-text, $notice-expired-bg) {
|
|
79
|
+
.notice-#{$type} {
|
|
80
|
+
@include notice-variant($text-color, $bg-color);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.notice {
|
|
85
|
+
margin-bottom: 20px;
|
|
86
|
+
padding: 10px;
|
|
87
|
+
|
|
88
|
+
a {
|
|
89
|
+
color: $orange;
|
|
90
|
+
text-decoration: underline;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ul {
|
|
94
|
+
margin-bottom: 0;
|
|
95
|
+
margin-top: 5px;
|
|
96
|
+
padding-left: 0;
|
|
97
|
+
|
|
98
|
+
li {
|
|
99
|
+
color: $notice-list-item-text;
|
|
100
|
+
list-style-type: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// no result
|
|
106
|
+
.no-result {
|
|
107
|
+
background-color: $no-result-bg;
|
|
108
|
+
border-radius: 4px;
|
|
109
|
+
color: $no-result-text;
|
|
110
|
+
margin: 50px auto;
|
|
111
|
+
padding: 20px;
|
|
112
|
+
position: relative;
|
|
113
|
+
|
|
114
|
+
a {
|
|
115
|
+
color: $no-result-text;
|
|
116
|
+
text-decoration: underline;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
p {
|
|
120
|
+
margin-bottom: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
img {
|
|
124
|
+
bottom: 20px;
|
|
125
|
+
position: absolute;
|
|
126
|
+
right: 20px;
|
|
127
|
+
width: 90px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// --------------------------------
|
|
2
|
+
// Cards - dish card
|
|
3
|
+
// --------------------------------
|
|
4
|
+
|
|
5
|
+
/*doc
|
|
6
|
+
---
|
|
7
|
+
parent: 17_cards
|
|
8
|
+
name: dish_card
|
|
9
|
+
title: Dish card
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<div class="row">
|
|
13
|
+
<div class="col-xs-12 col-sm-4">
|
|
14
|
+
<p>dish-card in recipes/show</p>
|
|
15
|
+
<div class="dish-card">
|
|
16
|
+
<a class="card-img" href="#">
|
|
17
|
+
<img class="img-responsive" src="/images/recipe-default.png">
|
|
18
|
+
</a>
|
|
19
|
+
<div class="card-info clearfix">
|
|
20
|
+
<div class="name">
|
|
21
|
+
<span>iCook 愛料理</span>
|
|
22
|
+
</div>
|
|
23
|
+
<p>簡單方便,吃的清爽又安心</p>
|
|
24
|
+
<div class="time">2016/05/04</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="refer-to">
|
|
27
|
+
<a href="#">沁涼豆花_電鍋料理 20分鐘</a>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="col-xs-12 col-sm-4">
|
|
32
|
+
<p>dish-card with reply notice</p>
|
|
33
|
+
<div class="dish-card has-reply">
|
|
34
|
+
<a class="card-img" href="#">
|
|
35
|
+
<img class="img-responsive" src="/images/recipe-default.png">
|
|
36
|
+
</a>
|
|
37
|
+
<div class="card-info clearfix">
|
|
38
|
+
<div class="name">
|
|
39
|
+
<span>iCook 愛料理</span>
|
|
40
|
+
</div>
|
|
41
|
+
<p>簡單方便,吃的清爽又安心</p>
|
|
42
|
+
<div class="time">2016/05/04</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="refer-to">
|
|
45
|
+
<a href="#">沁涼豆花_電鍋料理 20分鐘</a>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="col-xs-12 col-sm-4 cook-a-dish">
|
|
50
|
+
<p>in users/dishes</p>
|
|
51
|
+
<div class="dish-card">
|
|
52
|
+
<a class="card-img" href="#">
|
|
53
|
+
<img class="img-responsive" src="/images/recipe-default.png">
|
|
54
|
+
</a>
|
|
55
|
+
<div class="card-info clearfix">
|
|
56
|
+
<div class="name">
|
|
57
|
+
<span>iCook 愛料理</span>
|
|
58
|
+
</div>
|
|
59
|
+
<p>簡單方便,吃的清爽又安心</p>
|
|
60
|
+
<div class="time">2016/05/04</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="refer-to">
|
|
63
|
+
<a href="#">沁涼豆花_電鍋料理 20分鐘</a>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
@import "compass/typography/text/ellipsis";
|
|
73
|
+
|
|
74
|
+
$dish-card-border: #f0f0f0 !default;
|
|
75
|
+
$dish-card-info: #777 !default;
|
|
76
|
+
$dish-card-name: $ic-brown !default;
|
|
77
|
+
$dish-card-time: #aaa !default;
|
|
78
|
+
$dish-card-refer-bg: rgba(#efede8, 0.6) !default;
|
|
79
|
+
$dish-card-refer-text: #878c83 !default;
|
|
80
|
+
$dish-card-refer-bg-hover: #efede8 !default;
|
|
81
|
+
$dish-card-refer-bg-text: #777 !default;
|
|
82
|
+
$dish-card-has-reply: $orange !default;
|
|
83
|
+
$dish-card-upload: #eeede8 !default;
|
|
84
|
+
$dish-card-upload-icon: #777 !default;
|
|
85
|
+
$dish-card-upload-info: #aaa !default;
|
|
86
|
+
|
|
87
|
+
.dish-card {
|
|
88
|
+
border: 1px solid $dish-card-border;
|
|
89
|
+
border-radius: 2px;
|
|
90
|
+
display: inline-block;
|
|
91
|
+
// float: left;
|
|
92
|
+
max-width: 172px;
|
|
93
|
+
position: relative;
|
|
94
|
+
|
|
95
|
+
a:hover,
|
|
96
|
+
a:active {
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
img {
|
|
101
|
+
max-height: 150px;
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.card-img {
|
|
106
|
+
display: block;
|
|
107
|
+
padding: 10px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.card-info {
|
|
111
|
+
color: $dish-card-info;
|
|
112
|
+
height: 46px;
|
|
113
|
+
padding: 0 10px 10px;
|
|
114
|
+
|
|
115
|
+
p {
|
|
116
|
+
@include ellipsis;
|
|
117
|
+
|
|
118
|
+
line-height: 15px;
|
|
119
|
+
margin-bottom: 0;
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.name span {
|
|
125
|
+
@include ellipsis;
|
|
126
|
+
|
|
127
|
+
color: $dish-card-name;
|
|
128
|
+
display: inline-block;
|
|
129
|
+
line-height: 16px;
|
|
130
|
+
width: 85%;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.time {
|
|
134
|
+
color: $dish-card-time;
|
|
135
|
+
display: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.refer-to {
|
|
139
|
+
display: none;
|
|
140
|
+
height: 40px;
|
|
141
|
+
|
|
142
|
+
a {
|
|
143
|
+
@include ellipsis;
|
|
144
|
+
@include icon("\f064");
|
|
145
|
+
|
|
146
|
+
background-color: $dish-card-refer-bg;
|
|
147
|
+
color: $dish-card-refer-text;
|
|
148
|
+
display: block;
|
|
149
|
+
line-height: 16px;
|
|
150
|
+
padding: 12px 10px;
|
|
151
|
+
|
|
152
|
+
&:hover,
|
|
153
|
+
&:active {
|
|
154
|
+
background-color: $dish-card-refer-bg-hover;
|
|
155
|
+
color: $dish-card-refer-bg-text;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// in users/dishes and brands/dishes
|
|
161
|
+
.cook-a-dish & {
|
|
162
|
+
.card-info {
|
|
163
|
+
height: 30px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.name,
|
|
167
|
+
p {
|
|
168
|
+
display: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.time,
|
|
172
|
+
.refer-to {
|
|
173
|
+
display: block;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// in recipes/dishes/index
|
|
178
|
+
.dishes-entry & {
|
|
179
|
+
min-height: 100%;
|
|
180
|
+
|
|
181
|
+
.time,
|
|
182
|
+
.refer-to {
|
|
183
|
+
display: none;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&.has-reply {
|
|
188
|
+
.name,
|
|
189
|
+
.time {
|
|
190
|
+
@include icon-b("\e809");
|
|
191
|
+
|
|
192
|
+
&::after {
|
|
193
|
+
color: $dish-card-has-reply;
|
|
194
|
+
display: inline-block;
|
|
195
|
+
float: right;
|
|
196
|
+
font-family: "icookfont";
|
|
197
|
+
height: 14px;
|
|
198
|
+
margin-left: 0;
|
|
199
|
+
position: relative;
|
|
200
|
+
right: 0;
|
|
201
|
+
top: 1px;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.upload {
|
|
207
|
+
padding: 10px 10px 0;
|
|
208
|
+
text-align: center;
|
|
209
|
+
|
|
210
|
+
> div:first-child {
|
|
211
|
+
background-color: $dish-card-upload;
|
|
212
|
+
position: relative;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:hover,
|
|
216
|
+
&:active {
|
|
217
|
+
text-decoration: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
img {
|
|
221
|
+
opacity: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
i {
|
|
225
|
+
color: $dish-card-upload-icon;
|
|
226
|
+
|
|
227
|
+
font-size: 20px;
|
|
228
|
+
height: auto;
|
|
229
|
+
left: 43%;
|
|
230
|
+
position: absolute;
|
|
231
|
+
top: 40%;
|
|
232
|
+
width: 24px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.card-info {
|
|
236
|
+
color: $dish-card-upload-info;
|
|
237
|
+
font-size: 18px;
|
|
238
|
+
line-height: 36px;
|
|
239
|
+
margin-top: 10px;
|
|
240
|
+
padding-bottom: 14px;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|