mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Merge branch 'wpbrains-media-component' into 2.1.2-wip
This commit is contained in:
commit
26ca131a95
10
docs/assets/css/bootstrap-responsive.css
vendored
10
docs/assets/css/bootstrap-responsive.css
vendored
@ -904,6 +904,16 @@
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.media .pull-left,
|
||||
.media .pull-right {
|
||||
display: block;
|
||||
float: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.media-object {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
.modal {
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
|
37
docs/assets/css/bootstrap.css
vendored
37
docs/assets/css/bootstrap.css
vendored
@ -5285,6 +5285,43 @@ a.thumbnail:hover {
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.media,
|
||||
.media-body {
|
||||
overflow: hidden;
|
||||
*overflow: visible;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.media,
|
||||
.media .media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.media:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.media-object {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.media-heading {
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
|
||||
.media .pull-left {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.media .pull-right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.media-list {
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.label,
|
||||
.badge {
|
||||
font-size: 11.844px;
|
||||
|
@ -98,6 +98,7 @@
|
||||
<li><a href="#thumbnails"><i class="icon-chevron-right"></i> Thumbnails</a></li>
|
||||
<li><a href="#alerts"><i class="icon-chevron-right"></i> Alerts</a></li>
|
||||
<li><a href="#progress"><i class="icon-chevron-right"></i> Progress bars</a></li>
|
||||
<li><a href="#media"><i class="icon-chevron-right"></i> Media object</a></li>
|
||||
<li><a href="#misc"><i class="icon-chevron-right"></i> Misc</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -1945,6 +1946,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Alerts
|
||||
================================================== -->
|
||||
<section id="alerts">
|
||||
@ -2047,6 +2049,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Progress bars
|
||||
================================================== -->
|
||||
<section id="progress">
|
||||
@ -2193,6 +2196,144 @@
|
||||
|
||||
|
||||
|
||||
<!-- Media object
|
||||
================================================== -->
|
||||
<section id="media">
|
||||
<div class="page-header">
|
||||
<h1>Media object</h1>
|
||||
</div>
|
||||
<p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p>
|
||||
|
||||
<h2>Default example</h2>
|
||||
<p>The default media allow to float a media object (images, video, audio) to the left or right of a content block.</p>
|
||||
<div class="bs-docs-example">
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
...
|
||||
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
|
||||
<hr class="bs-docs-separator">
|
||||
|
||||
|
||||
<h2>Media list</h2>
|
||||
<p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).</p>
|
||||
<div class="bs-docs-example">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Nested media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<a class="pull-right" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">Media heading</h4>
|
||||
...
|
||||
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</pre>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Miscellaneous
|
||||
================================================== -->
|
||||
|
141
docs/templates/pages/components.mustache
vendored
141
docs/templates/pages/components.mustache
vendored
@ -27,6 +27,7 @@
|
||||
<li><a href="#thumbnails"><i class="icon-chevron-right"></i> {{_i}}Thumbnails{{/i}}</a></li>
|
||||
<li><a href="#alerts"><i class="icon-chevron-right"></i> {{_i}}Alerts{{/i}}</a></li>
|
||||
<li><a href="#progress"><i class="icon-chevron-right"></i> {{_i}}Progress bars{{/i}}</a></li>
|
||||
<li><a href="#media"><i class="icon-chevron-right"></i> {{_i}}Media object{{/i}}</a></li>
|
||||
<li><a href="#misc"><i class="icon-chevron-right"></i> {{_i}}Misc{{/i}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -1874,6 +1875,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Alerts
|
||||
================================================== -->
|
||||
<section id="alerts">
|
||||
@ -1976,6 +1978,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Progress bars
|
||||
================================================== -->
|
||||
<section id="progress">
|
||||
@ -2122,6 +2125,144 @@
|
||||
|
||||
|
||||
|
||||
<!-- Media object
|
||||
================================================== -->
|
||||
<section id="media">
|
||||
<div class="page-header">
|
||||
<h1>{{_i}}Media object{{/i}}</h1>
|
||||
</div>
|
||||
<p class="lead">{{_i}}Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.{{/i}}</p>
|
||||
|
||||
<h2>{{_i}}Default example{{/i}}</h2>
|
||||
<p>{{_i}}The default media allow to float a media object (images, video, audio) to the left or right of a content block.{{/i}}</p>
|
||||
<div class="bs-docs-example">
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>{{! /.bs-docs-example }}
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
...
|
||||
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
|
||||
<hr class="bs-docs-separator">
|
||||
|
||||
|
||||
<h2>{{_i}}Media list{{/i}}</h2>
|
||||
<p>{{_i}}With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).{{/i}}</p>
|
||||
<div class="bs-docs-example">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Nested media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Nested media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Nested media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
<a class="pull-right" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="http://placehold.it/64x64">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{_i}}Media heading{{/i}}</h4>
|
||||
...
|
||||
|
||||
<!-- Nested media object -->
|
||||
<div class="media">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</pre>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Miscellaneous
|
||||
================================================== -->
|
||||
|
1
less/bootstrap.less
vendored
1
less/bootstrap.less
vendored
@ -52,6 +52,7 @@
|
||||
|
||||
// Components: Misc
|
||||
@import "thumbnails.less";
|
||||
@import "media.less";
|
||||
@import "labels-badges.less";
|
||||
@import "progress-bars.less";
|
||||
@import "accordion.less";
|
||||
|
55
less/media.less
Normal file
55
less/media.less
Normal file
@ -0,0 +1,55 @@
|
||||
// Media objects
|
||||
// Source: http://stubbornella.org/content/?p=497
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Common styles
|
||||
// -------------------------
|
||||
|
||||
// Clear the floats
|
||||
.media,
|
||||
.media-body {
|
||||
overflow: hidden;
|
||||
*overflow: visible;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
// Proper spacing between instances of .media
|
||||
.media,
|
||||
.media .media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.media:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// For images and videos, set to block
|
||||
.media-object {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Reset margins on headings for tighter default spacing
|
||||
.media-heading {
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
|
||||
|
||||
// Media image alignment
|
||||
// -------------------------
|
||||
|
||||
.media .pull-left {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.media .pull-right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
// Media list variation
|
||||
// -------------------------
|
||||
|
||||
// Undo default ul/ol styles
|
||||
.media-list {
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
}
|
@ -158,6 +158,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Medias
|
||||
// Reset float and spacing to stack
|
||||
.media .pull-left,
|
||||
.media .pull-right {
|
||||
float: none;
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
// Remove side margins since we stack instead of indent
|
||||
.media-object {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
// Modals
|
||||
.modal {
|
||||
top: 10px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user