Skip to content

Commit c263401

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 99e6681 commit c263401

File tree

6 files changed

+202
-8
lines changed

6 files changed

+202
-8
lines changed

docs-aspnet/redirects.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ rewrite ^/{{ site.platform }}/{{ directory.path }}/?$
106106
##
107107
# Remove HTML extension
108108
##
109-
rewrite ^(/.*)\.html(\?.*)?$
109+
rewrite ^(/{{ site.platform }}/.*)\.html(\?.*)?$
110110
$1$2
111111
permanent;

docs/redirects.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,6 @@ rewrite ^/kendo-ui/{{ directory.path }}/?$
455455
##
456456
# Remove HTML extension
457457
##
458-
rewrite ^(/.*)\.html(\?.*)?$
458+
rewrite ^(/kendo-ui/.*)\.html(\?.*)?$
459459
$1$2
460460
permanent;

docs/styles-and-layout/cards.md

Lines changed: 165 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ The Card can accommodate the following elements:
2828

2929
* [Header](#header)
3030
* [Body](#body)
31+
* [Footer](#footer)
3132
* [Actions](#actions)
32-
* [Images](#images)
33+
* [Media](#media)
3334
* [Separators](#separators)
3435

3536
### Header
@@ -81,6 +82,18 @@ The main content of a card is the body which can be defined through the `.k-card
8182
</div>
8283
```
8384

85+
### Footer
86+
87+
The main content of a card is the body which can be defined through the `.k-card-body` class.
88+
89+
```dojo
90+
<div class="k-card" style="width: 300px;">
91+
<div class="k-card-footer">
92+
<span>Card Footer</span>
93+
</div>
94+
</div>
95+
```
96+
8497
### Actions
8598

8699
You can add a list of actions to a Card by using the `.k-card-actions` class.
@@ -120,7 +133,7 @@ To achieve a consistent styling, each action can be wrapped in a `.k-card-action
120133
</div>
121134
```
122135

123-
The actions can be stretched to take the entire container by adding the `.k-card-actions-stretched`.
136+
The actions can be stretched to take the entire container by adding the `.k-card-actions-stretched` class.
124137

125138
```dojo
126139
<div class="k-card" style="width: 300px;">
@@ -140,6 +153,66 @@ The actions can be stretched to take the entire container by adding the `.k-card
140153
</div>
141154
```
142155

156+
The actions can be centered inside the container by adding the `.k-card-actions-center` class:
157+
158+
```dojo
159+
<div class="k-card" style="width: 300px;">
160+
<div class="k-card-body">
161+
<h5 class="k-card-title">Card Title</h5>
162+
<h6 class="k-card-subtitle">Card Subtitle</h6>
163+
<p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
164+
</div>
165+
<div class="k-card-actions k-card-actions-center">
166+
<span class="k-card-action">
167+
<span class="k-button k-flat k-primary">Action 1</span>
168+
</span>
169+
<span class="k-card-action">
170+
<span class="k-button k-flat k-primary">Action 2</span>
171+
</span>
172+
</div>
173+
</div>
174+
```
175+
176+
The actions can be aligned at the start of the container with the `.k-card-actions-start` class:
177+
178+
```dojo
179+
<div class="k-card" style="width: 300px;">
180+
<div class="k-card-body">
181+
<h5 class="k-card-title">Card Title</h5>
182+
<h6 class="k-card-subtitle">Card Subtitle</h6>
183+
<p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
184+
</div>
185+
<div class="k-card-actions k-card-actions-start">
186+
<span class="k-card-action">
187+
<span class="k-button k-flat k-primary">Action 1</span>
188+
</span>
189+
<span class="k-card-action">
190+
<span class="k-button k-flat k-primary">Action 2</span>
191+
</span>
192+
</div>
193+
</div>
194+
```
195+
196+
The actions can be aligned at the end of the container with the `.k-card-actions-end` class:
197+
198+
```dojo
199+
<div class="k-card" style="width: 300px;">
200+
<div class="k-card-body">
201+
<h5 class="k-card-title">Card Title</h5>
202+
<h6 class="k-card-subtitle">Card Subtitle</h6>
203+
<p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
204+
</div>
205+
<div class="k-card-actions k-card-actions-end">
206+
<span class="k-card-action">
207+
<span class="k-button k-flat k-primary">Action 1</span>
208+
</span>
209+
<span class="k-card-action">
210+
<span class="k-button k-flat k-primary">Action 2</span>
211+
</span>
212+
</div>
213+
</div>
214+
```
215+
143216
The actions can also be forced to display vertically through the `.k-card-actions-vertical` class.
144217

145218
```dojo
@@ -156,9 +229,11 @@ The actions can also be forced to display vertically through the `.k-card-action
156229
</div>
157230
```
158231

159-
### Images
232+
### Media
160233

161-
Cards support images through the `.k-card-image` class.
234+
The Cards allows you to display an image or video within its content.
235+
236+
Images can be added through the `.k-card-image` class.
162237

163238
```
164239
<div class="k-card" style="width: 300px;">
@@ -172,9 +247,29 @@ Cards support images through the `.k-card-image` class.
172247
</div>
173248
```
174249

250+
Videos can be added through the `.k-card-media` class.
251+
252+
```
253+
<div class="k-card k-card-vertical">
254+
<div class="k-card-header k-display-flex k-align-items-center ">
255+
<h5 class="k-card-title">DevReach</h5>
256+
</div>
257+
<iframe height="267" src="https://www.youtube.com/embed/00EMMRFocNs" class="k-card-media"></iframe>
258+
<div class="k-card-body">
259+
<p><strong>DevReach 2019 Day 2 Morning Keynote:</strong> Technical Leadership: Lessons Learned at NASA with Jody Davis</p>
260+
</div>
261+
<span class="k-card-separator"></span>
262+
<div class="k-card-actions">
263+
<span class="k-button k-flat k-button-icon"><span class="k-icon k-i-heart-outline"></span></span>
264+
<span class="k-button k-flat k-button-icon"><span class="k-icon k-i-comment"></span></span>
265+
<span class="k-button k-flat k-button-icon"><span class="k-icon k-i-share"></span></span>
266+
</div>
267+
</div>
268+
```
269+
175270
### Separators
176271

177-
To include Card separators, use the `.k-hr` class.
272+
To include Card separators, use the `.k-card-separator` class.
178273

179274
```dojo
180275
<div class="k-card" style="width: 300px;">
@@ -184,7 +279,7 @@ To include Card separators, use the `.k-hr` class.
184279
<h6 class="k-card-subtitle">Card Subtitle</h6>
185280
<p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
186281
</div>
187-
<hr class="k-hr" />
282+
<hr class="k-card-separator" />
188283
<div class="k-card-body">
189284
<h5 class="k-card-title">Card Title</h5>
190285
<h6 class="k-card-subtitle">Card Subtitle</h6>
@@ -194,6 +289,8 @@ To include Card separators, use the `.k-hr` class.
194289
</div>
195290
```
196291

292+
To specify a vertical orientation for the separator add the `.k-card-separator-vertical` class to the separator element.
293+
197294
## Layout
198295

199296
Cards expose additional classes that are used for laying out series of cards.
@@ -324,6 +421,68 @@ To render Cards that are detached from one another on a single row, use the `.k-
324421
</div>
325422
```
326423

424+
### Custom layout
425+
426+
Positioning a horizontal flex container element inside the card could be achieved with the `.k-hbox` class:
427+
428+
```
429+
<div class="k-card k-card-horizontal">
430+
<div class="k-card-header">
431+
<h5 class="k-card-title">Card Title</h5>
432+
<h6 class="k-card-subtitle">Card Subtitle</h6>
433+
</div>
434+
<div class="k-hbox">
435+
<div class="k-card-body">
436+
<p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
437+
</div>
438+
<div class="k-card-actions k-card-actions-stretched k-card-actions-horizontal">
439+
<span class="k-button k-flat">Action 1</span>
440+
<span class="k-button k-flat k-primary">Action 2</span>
441+
</div>
442+
</div>
443+
</div>
444+
```
445+
446+
Positioning a vertical flex container element inside the card could be achieved with the `.k-vbox` class:
447+
448+
```
449+
<div class="k-card k-card-horizontal">
450+
<div class="k-vbox">
451+
<div class="k-card-header">
452+
<h5 class="k-card-title">Card Title</h5>
453+
<h6 class="k-card-subtitle">Card Subtitle</h6>
454+
</div>
455+
<div class="k-card-body">
456+
<p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
457+
</div>
458+
<div class="k-card-actions k-card-actions-stretched k-card-actions-horizontal">
459+
<span class="k-button k-flat">Action 1</span>
460+
<span class="k-button k-flat k-primary">Action 2</span>
461+
</div>
462+
</div>
463+
</div>
464+
```
465+
466+
### Orientation
467+
468+
The Card content can be arranged vertically or horizontally through the `.k-card-vertical` and `.k-card-horizontal` classes:
469+
470+
```
471+
<div class="k-card k-card-vertical k-text-center">
472+
<div class="k-card-header">
473+
<h5 class="k-card-title">Sofia</h5>
474+
<h6 class="k-card-subtitle">Sunny</h6>
475+
</div>
476+
<div class="k-card-body">
477+
<div>2&ordm;C</div>
478+
</div>
479+
<div class="k-card-actions k-card-actions-stretched k-card-actions-horizontal">
480+
<button class="k-button k-flat">Action 1</button>
481+
<button class="k-button k-primary k-flat">Action 2</button>
482+
</div>
483+
</div>
484+
```
485+
327486
## Styles
328487

329488
Cards provide predefined state classes that you can use to change the Card appearance.

styles/web/common/all.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import "mixins.less";
22
@import "flex.less";
3+
@import "flex-containers.less";
34
@import "base.less";
45
@import "button.less";
56
@import "responsivepanel.less";

styles/web/common/base.less

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,3 +650,24 @@ div.k-window-content
650650
.k-flip-h { transform: scaleX(-1); }
651651
.k-flip-v { transform: scaleY(-1); }
652652
.k-flip-h.k-flip-v { transform: scale(-1, -1); }
653+
654+
// Text align
655+
.k-text-align-left,
656+
.k-text-left {
657+
text-align: left;
658+
}
659+
660+
.k-text-align-center,
661+
.k-text-center {
662+
text-align: center;
663+
}
664+
665+
.k-text-align-right,
666+
.k-text-right {
667+
text-align: right;
668+
}
669+
670+
.k-text-align-justify,
671+
.k-text-justify {
672+
text-align: justify;
673+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Horizonatal and vertical boxes
2+
.k-hbox, .k-vbox { display: flex; }
3+
.k-ihbox, .k-ivbox { display: inline-flex; }
4+
5+
.k-hbox, .k-ihbox { flex-direction: row; }
6+
.k-vbox, .k-ivbox { flex-direction: column; }
7+
8+
9+
// Columns
10+
.k-column {
11+
flex-grow: 1;
12+
flex-basis: 0;
13+
}

0 commit comments

Comments
 (0)