forked from syncfusion/ej2-aspnetcore-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHorizontalCard.cshtml
220 lines (194 loc) · 9.31 KB
/
HorizontalCard.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
@using Syncfusion.EJ2
@section ControlsSection{
<div class="control-section card-control-section horizontal_card_layout">
<div class="e-card-resize-container">
<div>
<div class="row card-layout">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<!-- Horizontal Card Layout for iphone-X Product -->
<div tabindex="0" class="e-card e-card-horizontal e-product" style="height:420px" id="horizontal_phone_product">
<div class="e-card-stacked">
<div class="e-card-header">
<div class="e-card-header-caption">
<div class="e-card-header-title"> iPhone X</div>
<div class="e-card-sub-title">Marketed by Apple Inc</div>
</div>
</div>
<div class="e-card-content">
The iPhone X has a 5.8-inch diagonal OLED color-accurate screen, has two cameras on the rear. One is a 12-megapixel with
support for face detection. It is capable of capturing 4K video at 24, 30 or 60 frames per
second. It supports Qi-standard wireless charging.
</div>
<div class="e-card-actions" style="justify-content:center">
<button class="e-btn e-outline e-primary">
<div class="e-size">64GB </div>
</button>
<button class="e-btn e-outline e-primary">
<div class="e-size">256GB </div>
</button>
</div>
</div>
<img src="../css/card/iphone.png" alt="iPhone X" height="415px" style="width:50%">
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div id="vertical_Sample">
<!-- Horizontal Card Layout for Philips Trimmer Product -->
<div tabindex="0" class="e-card e-card-horizontal" id="horizontal_product">
<div class='e-card-stacked'>
<div class="e-card-header">
<div class="e-card-header-caption">
<div class="e-card-header-title">Philips Trimmer</div>
</div>
</div>
<div class="e-card-content" style="height: 146px">
Philips trimmers are designed to last longer than 4 ordinary trimmers and DuraPower Technology which optimizes power.
</div>
</div>
<img src='../css/card/Trimmer.png' />
</div>
<!-- Horizontal Card Layout for Canon Product -->
<div tabindex="0" class="e-card e-card-horizontal" id="horizontal_product">
<img src='../css/card/Camera.png' style="height:214px" />
<div class='e-card-stacked'>
<div class="e-card-header">
<div class="e-card-header-caption">
<div class="e-card-header-title">Canon 135mm</div>
</div>
</div>
<div class="e-card-content" style="height: 146px">
The fastest 135mm telephoto lens in its class. Two UD-glass elements correct secondary spectrum for outstanding sharpness and color.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id='source_link'>
Source
<table>
<tr>
<td>
<a href="https://www.philips.co.in/c-m-pe/face-stylers-and-grooming-kits/trimmers" target='_blank'>https://www.philips.co.in/c-m-pe/face-stylers-and-grooming-kits/trimmers</a>
</td>
</tr>
<tr>
<td>
<a href="https://en.wikipedia.org/wiki/IPhone_X" target='_blank'>https://en.wikipedia.org/wiki/IPhone_X</a>
</td>
</tr>
<tr>
<td>
<a href="https://en.wikipedia.org/wiki/Canon_EF_135mm_lens" target='_blank'>https://en.wikipedia.org/wiki/Canon_EF_135mm_lens</a>
</td>
</tr>
</table>
</div>
</div>
}
@section ActionDescription{
<p>
This sample demonstrates <code>card</code> rendering with horizontal layout. Based on the horizontal structure, product card is shown with detailed information.
</p>
}
@section Description{
<p>
By default, card elements are stacked one after another vertically. You can customize the card with specific direction by adding <b>e-card-horizontal</b> to align elements horizontally. Using <b>e-card-stacked</b> class, you can split the horizontal layout with a stacked element on left or right of the card.
</p>
<p>
More information about Card can be found in this <a target="_blank" href="https://ej2.syncfusion.com/aspnetcore/documentation/card/getting-started-asp-core/">documentation</a> section.
</p>
<br />
}
@section Meta{
<meta name="description" content="The sample demonstrates how to design product card with icon and its specification using horizontal layout in card component in ASP.NET Core platform." />
}
<style>
/* Horizontal Card Layout Customization */
.card-control-section.horizontal_card_layout #horizontal_phone_product .e-card-stacked {
justify-content: flex-start;
}
.card-control-section.horizontal_card_layout #horizontal_phone_product .e-card-actions button:last-child {
margin-left: 20px;
}
.card-control-section.horizontal_card_layout .e-card.e-card-horizontal.e-product .e-card-stacked> :first-child,
.card-control-section.horizontal_card_layout #vertical_Sample .e-card.e-card-horizontal .e-card-stacked> :first-child,
.card-control-section.horizontal_card_layout #vertical_Sample .e-card.e-card-horizontal .e-card-stacked> :first-child {
flex-grow: initial;
}
.card-control-section.horizontal_card_layout #vertical_Sample {
height: inherit;
}
.card-control-section.horizontal_card_layout #vertical_Sample .e-card img {
height: 188px;
}
.card-control-section.horizontal_card_layout #vertical_Sample .e-card {
height: 50%;
}
.card-control-section.horizontal_card_layout #vertical_Sample .e-card:first-child {
margin-bottom: 10px;
}
.card-control-section.horizontal_card_layout #vertical_Sample .e-card>* {
width: 50%;
justify-content: flex-start;
}
.card-control-section.horizontal_card_layout #horizontal_product .e-card-header {
width: 100%;
}
#source_link {
float: right;
margin-right: 10px;
}
@@media screen and (max-width: 768px) {
#source_link {
margin-top: -10px;
margin-right: 0px;
}
}
.card-control-section.horizontal_card_layout .e-card-resize-container {
margin-bottom: 50px;
}
.card-control-section.horizontal_card_layout .col-xs-6.col-sm-6.col-lg-6.col-md-6 {
width: 100%;
padding: 10px;
margin: auto;
}
.card-control-section.horizontal_card_layout .card-layout {
margin: auto;
max-width: 870px;
}
@@media (min-width: 912px) {
.card-control-section.horizontal_card_layout .col-xs-6.col-sm-6.col-lg-6.col-md-6 {
width: 50%;
}
.card-control-section.horizontal_card_layout .card-layout {
max-width: 800px;
}
}
@@media (max-width: 600px) {
.card-control-section.horizontal_card_layout .card-layout {
max-width: 400px !important;
}
}
@@media (max-width: 912px) {
.card-control-section.horizontal_card_layout .row.card-layout {
display: flex;
flex-direction: column;
}
.card-control-section.horizontal_card_layout .card-layout {
max-width: 640px;
}
}
@@media (min-width: 700px) and (max-width: 912px) {
.card-control-section.horizontal_card_layout .col-xs-6.col-sm-6.col-lg-6.col-md-6 {
width: 70%;
}
}
@@media (min-width: 600px) and (max-width: 700px) {
.card-control-section.horizontal_card_layout .col-xs-6.col-sm-6.col-lg-6.col-md-6 {
width: 80%;
}
}
</style>