Permalink
Browse files

Merge branch '2.0-wip' of https://github.com/twitter/bootstrap into 2…

….0-wip

Conflicts:
	bootstrap.css
  • Loading branch information...
2 parents 80cb760 + 069ef6a commit a5a98a8a984512011dac1216b432b86c6eff96a4 @fat fat committed Dec 21, 2011
Showing with 364 additions and 129 deletions.
  1. +21 −14 bootstrap.css
  2. +9 −6 bootstrap.min.css
  3. +2 −2 docs/assets/css/docs.css
  4. +115 −64 docs/components.html
  5. +1 −1 docs/javascript.html
  6. +31 −20 docs/scaffolding.html
  7. +152 −0 docs/upgrading.html
  8. +5 −1 lib/forms.less
  9. +28 −21 lib/media-grids.less
View
@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
- * Date: Tue Dec 20 22:11:42 PST 2011
+ * Date: Wed Dec 21 13:29:41 PST 2011
*/
html, body {
margin: 0;
@@ -600,9 +600,11 @@ select, input[type=file] {
line-height: 27px;
}
+select {
+ background-color: #ffffff;
+}
select[multiple] {
height: inherit;
- background-color: #ffffff;
}
input[type=image] {
-webkit-box-shadow: none;
@@ -2516,27 +2518,28 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
.popover .content p, .popover .content ul, .popover .content ol {
margin-bottom: 0;
}
-.media-grid {
+.thumbnails {
margin-left: -20px;
margin-bottom: 0;
+ list-style: none;
zoom: 1;
}
-.media-grid:before, .media-grid:after {
+.thumbnails:before, .thumbnails:after {
display: table;
*display: inline;
content: "";
zoom: 1;
}
-.media-grid:after {
+.thumbnails:after {
clear: both;
}
-.media-grid li {
- display: inline;
-}
-.media-grid a {
+.thumbnails > li {
float: left;
- padding: 4px;
margin: 0 0 20px 20px;
+}
+.thumbnail {
+ display: block;
+ line-height: 1;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
@@ -2545,15 +2548,19 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
}
-.media-grid a img {
- display: block;
-}
-.media-grid a:hover {
+a.thumbnail:hover {
border-color: #0069d6;
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
}
+.thumbnail > img {
+ display: block;
+ margin: 4px;
+}
+.thumbnail .caption {
+ padding: 9px;
+}
.hidden {
display: none;
visibility: hidden;
View
Oops, something went wrong.
@@ -25,7 +25,7 @@ body > .navbar-fixed .brand {
float: right;
font-weight: bold;
color: #000;
- text-shadow: 0 1px 0 rgba(255,255,255,.1);
+ text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125);
}
body > .navbar-fixed .brand:hover {
text-decoration: none;
@@ -455,7 +455,7 @@ h2 + table {
/* Provide enough space on right-hand side for benefits list */
.jumbotron h1,
.jumbotron p {
- margin-right: 20%;
+ margin-right: 40%;
}
}
View
@@ -58,94 +58,145 @@
================================================== -->
<section id="media">
<div class="page-header">
- <h1>Media <small>Displaying images and videos</small></h1>
+ <h1>Thumbnails <small>Grids of images, videos, text, and more</small></h1>
</div>
- <!-- Table structure -->
+
<div class="row">
- <div class="span3">
- <h2>Media grid</h2>
- <p>Display thumbnails of varying sizes on pages with a low HTML footprint and minimal styles.</p>
- </div>
- <div class="span9">
- <h3>Example thumbnails</h3>
- <p>Thumbnails in the <code>.media-grid</code> can be any size, but they work best when mapped directly to the built-in Bootstrap grid system. Image widths like 90, 210, and 330 combine with a few pixels of padding to equal the <code>.span2</code>, <code>.span4</code>, and <code>.span6</code> column sizes.</p>
- <h4>Large</h4>
- <ul class="media-grid">
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/330x230" alt="">
+ <div class="span6">
+ <h2>Default thumbnails</h2>
+ <p>By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.</p>
+ <ul class="thumbnails">
+ <li class="span3">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/210x150" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/330x230" alt="">
+ <li class="span3">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/210x150" alt="">
</a>
</li>
- </ul>
- <h4>Medium</h4>
- <ul class="media-grid">
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/210x150" alt="">
+ <li class="span3">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/210x150" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/210x150" alt="">
+ <li class="span3">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/210x150" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/210x150" alt="">
+ </ul>
+ </div>
+ <div class="span6">
+ <h2>Highly customizable</h2>
+ <p>With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.</p>
+ <ul class="thumbnails">
+ <li class="span3">
+ <div class="thumbnail">
+ <img src="http://placehold.it/210x150" alt="">
+ <div class="caption">
+ <h5>Thumbnail label</h5>
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
+ <p><a href="#" class="btn primary">Action</a> <a href="#" class="btn">Action</a></p>
+ </div>
+ </div>
+ </li>
+ <li class="span3">
+ <div class="thumbnail">
+ <img src="http://placehold.it/210x150" alt="">
+ <div class="caption">
+ <h5>Thumbnail label</h5>
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
+ <p><a href="#" class="btn primary">Action</a> <a href="#" class="btn">Action</a></p>
+ </div>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="span4">
+ <h3>Why use thumbnails</h3>
+ <p>Thumbnails (previously <code>.media-grid</code> up until v1.4) are great for grids of photos or videos, image search results, retail products, portfolios, and much more. They can be links or static content.</p>
+ </div>
+ <div class="span4">
+ <h3>Simple, flexible markup</h3>
+ <p>Thumbnail markup is simple&mdash;a <code>ul</code> with any number of <code>li</code> elements is all that is required. It's also super flexible, allowing for any type of content with just a bit more markup to wrap your contents.</p>
+ </div>
+ <div class="span4">
+ <h3>Uses grid column sizes</h3>
+ <p>Lastly, the thumbnails component uses existing grid system classes&mdash;like <code>.span2</code> or <code>.span3</code>&mdash;for control of thumbnail dimensions.</p>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="span6">
+ <h2>The markup</h2>
+ <p>As mentioned previously, the required markup for thumbnails is light and straightforward. Here's a look at the default setup <strong>for linked images</strong>:</p>
+<pre class="prettyprint linenums">
+&lt;ul class="thumbnails"&gt;
+ &lt;li class="span3"&gt;
+ &lt;a href="#" class="thumbnail"&gt;
+ &lt;img src="http://placehold.it/210x150" alt=""&gt;
+ &lt;/a&gt;
+ &lt;/li&gt;
+ ...
+&lt;/ul&gt;
+</pre>
+ <p>For custom HTML content in thumbnails, the markup changes slightly. To allow block level content anywhere, we swap the <code>&lt;a&gt;</code> for a <code>&lt;div&gt;</code> like so:</p>
+<pre class="prettyprint linenums">
+&lt;ul class="thumbnails"&gt;
+ &lt;li class="span3"&gt;
+ &lt;div class="thumbnail"&gt;
+ &lt;img src="http://placehold.it/210x150" alt=""&gt;
+ &lt;h5&gt;Thumbnail label&lt;/h5&gt;
+ &lt;p&gt;Thumbnail caption right here...&lt;/p&gt;
+ &lt;/div&gt;
+ &lt;/li&gt;
+ ...
+&lt;/ul&gt;
+</pre>
+ </div>
+ <div class="span6">
+ <h2>More examples</h2>
+ <p>Explore all your options with the various grid classes available to you. You can also mix and match different sizes.</p>
+ <ul class="thumbnails">
+ <li class="span4">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/290x230" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/210x150" alt="">
+ <li class="span2">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/130x100" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/210x150" alt="">
+ <li class="span2">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/130x100" alt="">
</a>
</li>
- </ul>
- <h4>Small</h4>
- <ul class="media-grid">
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/90x90" alt="">
+ <li class="span2">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/130x100" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/90x90" alt="">
+ <li class="span2">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/130x100" alt="">
</a>
</li>
- <li>
- <a href="#">
- <img class="thumbnail" src="http://placehold.it/90x90" alt="">
+ <li class="span2">
+ <a href="#" class="thumbnail">
+ <img src="http://placehold.it/130x100" alt="">
</a>
</li>
</ul>
- <h4>Coding them</h4>
- <p>Media grids are easy to use and rather simple on the markup side. Their dimensions are purely based on the size of the images included.</p>
-<pre class="prettyprint linenums">
-&lt;ul class="media-grid"&gt;
- &lt;li&gt;
- &lt;a href="#"&gt;
- &lt;img class="thumbnail" src="http://placehold.it/330x230" alt=""&gt;
- &lt;/a&gt;
- &lt;/li&gt;
- &lt;li&gt;
- &lt;a href="#"&gt;
- &lt;img class="thumbnail" src="http://placehold.it/330x230" alt=""&gt;
- &lt;/a&gt;
- &lt;/li&gt;
-&lt;/ul&gt;
-</pre>
</div>
- </div><!-- /row -->
+ </div>
+
</section>
@@ -829,7 +829,7 @@ <h4 id="three">three</h4>
<pre class="prettyprint linenums">&lt;button class="btn" data-complete-text="finished!" &gt;...&lt;/button&gt;
&lt;script&gt;
$('.btn').button('complete')
-&lt;/scrip&gt;</pre>
+&lt;/script&gt;</pre>
<h3>Demo</h3>
<table class="bordered-table striped-table">
<tbody>
Oops, something went wrong.

0 comments on commit a5a98a8

Please sign in to comment.