From f48278dac6ac89fcf9d1ab7526ec3029dd1a4d8e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Jan 2012 18:40:17 -0800 Subject: [PATCH] updated accordion and carousel; accordion still needs work --- bootstrap.css | 76 +++++++++++++++++++-------- bootstrap.min.css | 15 ++++-- docs/javascript.html | 64 +++++++++++------------ lib/accordion.less | 21 ++++++++ lib/bootstrap.less | 1 + lib/carousel.less | 119 +++++++++++++++++++++++++++++++------------ 6 files changed, 206 insertions(+), 90 deletions(-) create mode 100644 lib/accordion.less diff --git a/bootstrap.css b/bootstrap.css index aabc868d2e..8192b24c8a 100644 --- a/bootstrap.css +++ b/bootstrap.css @@ -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: Sun Jan 15 16:27:00 PST 2012 + * Date: Sun Jan 15 18:32:40 PST 2012 */ html, body { margin: 0; @@ -2936,10 +2936,29 @@ a.thumbnail:hover { background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } +.accordion { + padding: 0; +} +.accordion-heading { + padding: 5px 10px; + border: 1px solid #ddd; +} +.accordion-body { + padding: 10px; + margin-left: 0; + margin-bottom: 9px; + border: 1px solid #ddd; + border-top: 0; + display: none; +} +.accordion .in { + display: block; +} .carousel { position: relative; + line-height: 1; } -.carousel .carousel-inner { +.carousel-inner { overflow: hidden; width: 100%; position: relative; @@ -2971,7 +2990,7 @@ a.thumbnail:hover { left: -100%; } .carousel .next.left, .carousel .prev.right { - left: 0%; + left: 0; } .carousel .active.left { left: -100%; @@ -2979,30 +2998,45 @@ a.thumbnail:hover { .carousel .active.right { left: 100%; } -.carousel .nav { - width: auto; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - height: 50px; +.carousel-control { position: absolute; - top: 50%; - margin: -25px 0 0; - cursor: pointer; - background: rgba(0, 0, 0, 0.7); - color: white; - font-size: 42px; - left: 5px; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; font-weight: 100; - padding: 0 15px; + line-height: 30px; + color: #ccc; + text-align: center; + background: #999; + background: rgba(0, 0, 0, 0.5); + -webkit-border-radius: 20px; + -moz-border-radius: 20px; + border-radius: 20px; } -.carousel .nav.right { - right: 5px; +.carousel-control.right { left: auto; + right: 15px; } -.carousel .nav:hover { +.carousel-control:hover { + color: #fff; text-decoration: none; - background: rgba(0, 0, 0, 0.8); + background: #333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 10px 15px 5px; + background: #333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption h4, .carousel-caption p { + color: #fff; } .pull-right { float: right; diff --git a/bootstrap.min.css b/bootstrap.min.css index 91c6553f6c..6e348c597a 100644 --- a/bootstrap.min.css +++ b/bootstrap.min.css @@ -513,18 +513,25 @@ a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, .progress.success.striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} .progress.info .bar{background-color:#339bb9;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);} .progress.info.striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} -.carousel{position:relative;}.carousel .carousel-inner{overflow:hidden;width:100%;position:relative;} +.accordion{padding:0;} +.accordion-heading{padding:5px 10px;border:1px solid #ddd;} +.accordion-body{padding:10px;margin-left:0;margin-bottom:9px;border:1px solid #ddd;border-top:0;display:none;} +.accordion .in{display:block;} +.carousel{position:relative;line-height:1;} +.carousel-inner{overflow:hidden;width:100%;position:relative;} .carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} .carousel .active,.carousel .next,.carousel .prev{display:block;} .carousel .active{left:0;} .carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} .carousel .next{left:100%;} .carousel .prev{left:-100%;} -.carousel .next.left,.carousel .prev.right{left:0%;} +.carousel .next.left,.carousel .prev.right{left:0;} .carousel .active.left{left:-100%;} .carousel .active.right{left:100%;} -.carousel .nav{width:auto;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;height:50px;position:absolute;top:50%;margin:-25px 0 0;cursor:pointer;background:rgba(0, 0, 0, 0.7);color:white;font-size:42px;left:5px;font-weight:100;padding:0 15px;}.carousel .nav.right{right:5px;left:auto;} -.carousel .nav:hover{text-decoration:none;background:rgba(0, 0, 0, 0.8);} +.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ccc;text-align:center;background:#999;background:rgba(0, 0, 0, 0.5);-webkit-border-radius:20px;-moz-border-radius:20px;border-radius:20px;}.carousel-control.right{left:auto;right:15px;} +.carousel-control:hover{color:#fff;text-decoration:none;background:#333;background:rgba(0, 0, 0, 0.75);} +.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333;background:rgba(0, 0, 0, 0.75);} +.carousel-caption h4,.carousel-caption p{color:#fff;} .pull-right{float:right;} .pull-left{float:left;} .hide{display:none;} diff --git a/docs/javascript.html b/docs/javascript.html index 015f451428..1a6565c399 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1079,33 +1079,33 @@ $('#my-alert').bind('closed', function () {

Example accordion

Using the collapse plugin, we built a simple accordion style widget:

-
-
+
+
Collapsible Group Item #1
-
+

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.

-
+
Collapsible Group Item #2
-
+

Blog +1 eiusmod, williamsburg chambray craft beer brooklyn. Trust fund squid whatever, sunt hoodie skateboard mustache 3 wolf moon art party wes anderson ad leggings officia. Skateboard keytar incididunt gluten-free retro sartorial, single-origin coffee et viral. Art party blog sunt, readymade fugiat 8-bit aesthetic ex echo park fanny pack keytar. Thundercats sustainable labore, mustache adipisicing tattooed dolore aute occaecat velit 8-bit raw denim letterpress. In occaecat freegan, next level single-origin coffee chambray excepteur nihil duis exercitation adipisicing ex sartorial twee squid. You probably haven't heard of them fugiat ea retro eiusmod quis cosby sweater, +1 fap sapiente biodiesel banksy.

-
+
Collapsible Group Item #3
-
+

Tempor gentrify pariatur nihil salvia, irony synth incididunt odio commodo brunch aute. Four loko est vice echo park wes anderson jean shorts, tempor ea vero locavore. Seitan DIY dolore readymade williamsburg viral. Dolor fap master cleanse delectus, ad butcher labore duis vice mollit cillum exercitation eu banh mi. Austin banksy 3 wolf moon locavore sed, helvetica next level VHS you probably haven't heard of them ethical odio. Incididunt locavore minim, do seitan consequat qui thundercats labore before they sold out retro laborum. Esse twee readymade laboris fap vice, voluptate DIY.

@@ -1220,32 +1220,32 @@ $('#myCollapsible').on('hidden', function () {

Example carousel

Watch the slideshow below.

-