diff options
| author | Mark Otto <[email protected]> | 2012-01-14 16:18:15 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-01-14 16:18:15 -0800 |
| commit | f587e81b7d72e47b16bf808c721c3dfe45ae1062 (patch) | |
| tree | 6ec0e55a8f05a7cbab9c30b576bd80898b11116a /docs | |
| parent | fc053ac8b27611e3dc7fae769ce28f154250d50e (diff) | |
| download | bootstrap-f587e81b7d72e47b16bf808c721c3dfe45ae1062.tar.xz bootstrap-f587e81b7d72e47b16bf808c721c3dfe45ae1062.zip | |
rewrite alert messages to use less code, combine the look of default and block messages, simplify docs
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/components.html | 131 |
1 files changed, 60 insertions, 71 deletions
diff --git a/docs/components.html b/docs/components.html index fa3dc5a20..9fc987508 100644 --- a/docs/components.html +++ b/docs/components.html @@ -1058,101 +1058,90 @@ ================================================== --> <section id="alerts"> <div class="page-header"> - <h1>Alerts & Errors <small>Styles for success, warning, and error messages or alerts</small></h1> + <h1>Alerts <small>Styles for success, warning, and error messages</small></h1> </div> - <!-- Basic alert messages --> + + <h2>Lightweight defaults</h2> <div class="row"> - <div class="span3"> - <h2>Basic alerts</h2> - <p><code>.alert-message</code></p> - <p>One-line messages for highlighting the failure, possible failure, or success of an action. Particularly useful for forms.</p> - <p><a class="btn js-btn" href="./javascript.html#alerts">Get the javascript »</a></p> + <div class="span4"> + <h3>Rewritten base class</h3> + <p>With Bootstrap 2, we've simplified the base class: <code>.alert</code> instead of <code>.alert-message</code>. We've also reduced the minimum required markup—no <code><p></code> is required by default, just the outter <code><div></code>.</p> + <h3>Single alert message</h3> + <p>For a more durable component with less code, we've removed the differentiating look for block alerts, messages that com with more padding and typically more text. The class also has changed to <code>.block-alert</code>.</p> + <hr> + <h3>Goes great with javascript</h3> + <p>Bootstrap comes with a great jQuery plugin that supports alert messages, making dismissing them quick and easy.</p> + <p><a class="btn js-btn" href="./javascript.html#alerts">Get the plugin »</a></p> </div> - <div class="span9"> - <div class="alert-message warning"> - <a class="close">×</a> - <p><strong>Holy guacamole!</strong> Best check yo self, you’re not looking too good.</p> - </div> - <div class="alert-message error"> - <a class="close">×</a> - <p><strong>Oh snap!</strong> Change this and that and try again.</p> - </div> - <div class="alert-message success"> + <div class="span8"> + <h3>Example alerts</h3> + <p>Wrap your message and an optional close icon in a div with simple class.</p> + <div class="alert"> <a class="close">×</a> - <p><strong>Well done!</strong> You successfully read this alert message.</p> + <strong>Warning!</strong> Best check yo self, you’re not looking too good. </div> - <div class="alert-message info"> +<pre class="prettyprint linenums"> +<div class="alert"> + <a class="close">×</a> + <strong>Warning!</strong> Best check yo self, you’re not looking too good. +</div> +</pre> + <p>Easily extend the standard alert message with two optional classes: <code>.block-alert</code> for more padding and text controls and <code>.alert-heading</code> for a matching heading.</p> + <div class="alert block-alert"> <a class="close">×</a> - <p><strong>Heads up!</strong> This is an alert that needs your attention, but it’s not a huge priority just yet.</p> + <h4 class="alert-heading">Warning!</h4> + <p>Best check yo self, you’re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> </div> - - <h4>Example code</h4> <pre class="prettyprint linenums"> -<div class="alert-message warning"> +<div class="alert block-alert"> <a class="close">×</a> - <p><strong>Holy guacamole!</strong> Best check yo self, you’re not looking too good.</p> + <h4 class="alert-heading">Warning!</h4> + Best check yo self, you’re not... </div> </pre> </div> - </div><!-- /row --> - - <br> + </div> - <!-- Block messages --> + <h2>Contextual alternatives <small>Add optional classes to change an alert's connotation</small></h2> <div class="row"> - <div class="span3"> - <h2>Block messages</h2> - <p><code><div class="alert-message block-message"></code></p> - <p>For messages that require a bit of explanation, we have paragraph style alerts. These are perfect for bubbling up longer error messages, warning a user of a pending action, or just presenting information for more emphasis on the page.</p> - <p><a class="btn js-btn" href="./javascript.html#alerts">Get the javascript »</a></p> - </div> - <div class="span9"> - <div class="alert-message block-message warning"> - <a class="close">×</a> - <p><strong>Holy guacamole! This is a warning!</strong> Best check yo self, you’re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> - <div class="alert-actions"> - <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> - </div> - </div> - <div class="alert-message block-message error"> + <div class="span4"> + <h3>Error or danger</h3> + <div class="alert error-alert"> <a class="close">×</a> - <p><strong>Oh snap! You got an error!</strong> Change this and that and try again.</p> - <ul> - <li>Duis mollis est non commodo luctus</li> - <li>Nisi erat porttitor ligula</li> - <li>Eget lacinia odio sem nec elit</li> - </ul> - <div class="alert-actions"> - <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> - </div> + <strong>Oh snap!</strong> Change a few things up and try submitting again. </div> - <div class="alert-message block-message success"> +<pre class="prettyprint linenums"> +<div class="alert error-alert"> + ... +</div> +</pre> + </div> + <div class="span4"> + <h3>Success</h3> + <div class="alert success-alert"> <a class="close">×</a> - <p><strong>Well done!</strong> You successfully read this alert message. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas faucibus mollis interdum.</p> - <div class="alert-actions"> - <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> - </div> + <strong>Well done!</strong> You successfully read this important alert message. </div> - <div class="alert-message block-message info"> +<pre class="prettyprint linenums"> +<div class="alert success-alert"> + ... +</div> +</pre> + </div> + <div class="span4"> + <h3>Information</h3> + <div class="alert info-alert"> <a class="close">×</a> - <p><strong>Heads up!</strong> This is an alert that needs your attention, but it’s not a huge priority just yet.</p> - <div class="alert-actions"> - <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> - </div> + <strong>Heads up!</strong> This alert needs your attention, but it’s not super important. </div> - - <h4>Example code</h4> <pre class="prettyprint linenums"> -<div class="alert-message block-message warning"> - <a class="close">×</a> - <p><strong>Holy guacamole! This is a warning!</strong> Best check yo self, you’re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> - <div class="alert-actions"> - <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> - </div> +<div class="alert info-alert"> + ... </div> </pre> </div> - </div><!-- /row --> + </div> + </section> |
