unison/site/components.html
2014-03-28 14:32:07 -04:00

1376 lines
50 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Components &middot; Flat UI Free</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Loading Bootstrap -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="bootstrap/css/prettify.css" rel="stylesheet">
<!-- Loading Flat UI -->
<link href="css/flat-ui.css" rel="stylesheet">
<link href="css/docs.css" rel="stylesheet">
<link rel="shortcut icon" href="images/favicon.ico">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<ul class="demo-sidebar hide-on-tablets">
<li><a href="#fui-button">Buttons</a></li>
<li><a href="#fui-checkbox">Checkboxes</a></li>
<li><a href="#fui-radio">Radio buttons</a></li>
<li><a href="#fui-dropdown">Dropdown</a></li>
<li><a href="#fui-input">Input</a></li>
<li><a href="#fui-navbar">Navbar</a></li>
<li><a href="#fui-pager">Pager</a></li>
<li><a href="#fui-pagination">Pagination</a></li>
<li><a href="#fui-progress">Progress</a></li>
<li><a href="#fui-select">Select</a></li>
<li><a href="#fui-switch">Switch</a></li>
<li><a href="#fui-tagsinput">Tags Input</a></li>
<li><a href="#fui-tooltip">Tooltip</a></li>
<li><a href="#fui-slider">Slider</a></li>
<li><a href="#fui-typeahead">Typeahead</a></li>
</ul> <!-- /nav -->
<h1 class="demo-headline">Components</h1>
<div class="container">
<div id="fui-button" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Buttons</h3>
</div>
<div class="demo-content">
<p>
After restyling the <a href="http://getbootstrap.com/css/#buttons">Bootstrap buttons</a>, we have decided to add a new size: <code>btn-hg</code> which will be used for the main call to action buttons on the page:
</p>
<p class="mbl">
<button class="btn btn-hg btn-primary">Huge Button</button>
</p>
<pre class="prettyprint">
&lt;button class="btn btn-hg btn-primary"&gt;
Boss Button
&lt;/button&gt;
</pre>
<p class="ptl">
In addition, we have added <code>btn-embossed</code> to make buttons look more realistic, but we still prefer them flat.
</p>
<p class="mbl">
<button class="btn btn-embossed btn-primary">Embossed Button</button>
</p>
<pre class="prettyprint">
&lt;button class="btn btn-embossed btn-primary"&gt;
Embossed Button
&lt;/button&gt;
</pre>
<p class="ptl">
In some cases buttons need to become wider. Yes, we have taken care of that as well:
</p>
<p class="mbl">
<button class="btn btn-wide btn-primary mrm">Save</button>
<button class="btn btn-wide btn-default">Cancel</button>
</p>
<pre class="prettyprint">
&lt;button class="btn btn-default btn-wide"&gt;
Cancel
&lt;/button&gt;
</pre>
<p class="ptl">
Another new thing is <code>btn-tip</code>. Use it when you need to highlight a part of the button text:
</p>
<p class="mbl">
<button class="btn btn-primary">
Save
<span class="btn-tip">$300</span>
</button>
</p>
<pre class="prettyprint">
&lt;button class="btn btn-primary"&gt;
Save
&lt;span class="btn-tip"&gt;$300&lt;/span&gt;
&lt;/button&gt;
</pre>
<p class="ptl">
As usual you can set different colors:
</p>
<p>
<button class="btn btn-default mrs">Default</button>
<button class="btn btn-primary mrs">Primary</button>
<button class="btn btn-info mrs">Info</button>
<button class="btn btn-danger mrs">Danger</button>
</p>
<p class="mbl">
<button class="btn btn-success mrs">Success</button>
<button class="btn btn-warning mrs">Warning</button>
<button class="btn btn-inverse mrs">Inverse</button>
</p>
<pre class="prettyprint">
&lt;button class="btn btn-default"&gt;Default&lt;/button&gt;
&lt;button class="btn btn-primary"&gt;Primary&lt;/button&gt;
&lt;button class="btn btn-info"&gt;Info&lt;/button&gt;
&lt;button class="btn btn-danger"&gt;Danger&lt;/button&gt;
&lt;button class="btn btn-success"&gt;Success&lt;/button&gt;
&lt;button class="btn btn-warning"&gt;Warning&lt;/button&gt;
&lt;button class="btn btn-inverse"&gt;Inverse&lt;/button&gt;
</pre>
<p>
Button groups, toolbars, and disabled state also work as expected.
</p>
</div>
</div><!-- /.demo-row -->
<div id="fui-checkbox" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Checkboxes</h3>
</div>
<div class="demo-content">
<p>
Using flat style checkboxes requires a JS plugin which creates all the custom markup for us. Let's take a look:
</p>
<label class="checkbox" for="checkbox1">
<input type="checkbox" value="" id="checkbox1" data-toggle="checkbox">
Checkbox
</label>
<label class="checkbox" for="checkbox2">
<input type="checkbox" value="" id="checkbox2" checked="checked" data-toggle="checkbox">
Checkbox
</label>
<label class="checkbox" for="checkbox3">
<input type="checkbox" value="" id="checkbox3" data-toggle="checkbox" disabled="">
Checkbox
</label>
<label class="checkbox" for="checkbox4">
<input type="checkbox" value="" id="checkbox4" checked="checked" data-toggle="checkbox" disabled="">
Checkbox
</label>
<h6 class="ptl">The Data Attributes:</h6>
<pre class="prettyprint">
&lt;label class="checkbox" for="checkbox1"&gt;
&lt;input type="checkbox" value="" id="checkbox1" data-toggle="checkbox"&gt;
Checkbox
&lt;/label&gt;
</pre>
<h6 class="ptl">Usage via JS:</h6>
<pre class="prettyprint">
$(':checkbox').checkbox();
</pre>
<div class="pvm">
<h6>Methods:</h6>
</div>
<p class="mbl">
<strong>.checkbox('toggle')</strong>
<br/>
toggles the checkbox state from <span class="text-info">checked</span>
to <span class="text-info">unchecked</span> and back.
</p>
<p class="mbl">
<strong>.checkbox('check')</strong>
<br/>
sets the checkbox state to <span class="text-info">checked</span>.
</p>
<p class="mbl">
<strong>.checkbox('uncheck')</strong>
<br/>
sets the checkbox state to <span class="text-info">unchecked</span>.
</p>
<pre class="prettyprint">
$(':checkbox').checkbox('check');
</pre>
<div class="pbm ptl">
<h6>Events:</h6>
</div>
<p class="mbl">
<strong>.on('toggle')</strong>
<br/>
Fired when the checkbox state changes between
<span class="text-info">checked</span> and
<span class="text-info">unchecked</span>.
</p>
<p class="mbl">
<strong>.on('change')</strong>
<br/>
Same as <span class="text-info">toggle</span>.
</p>
<pre class="prettyprint">
$(':checkbox').on('toggle', function() {
// Do something
});
</pre>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-radio" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Radio buttons</h3>
</div>
<div class="demo-content">
<p>
Styling radio buttons also requires using a JS plugin. We have tried making things easy so you won't have to spend a huge amount of time playing around with custom&nbsp;components.
</p>
<label class="radio">
<input type="radio" name="group1" value="1" data-toggle="radio">
Radio is off
</label>
<label class="radio">
<input type="radio" name="group1" value="2" data-toggle="radio" checked>
Radio is on
</label>
<label class="radio">
<input type="radio" name="group2" value="1" data-toggle="radio" disabled>
Radio is off
</label>
<label class="radio">
<input type="radio" name="group2" value="2" data-toggle="radio" disabled checked>
Radio is on
</label>
<h6 class="ptl">The Data Attributes:</h6>
<pre class="prettyprint">
&lt;label class="radio"&gt;
&lt;input type="radio" name="group1" value="1" data-toggle="radio"&gt;
Radio is off
&lt;/label&gt;
&lt;label class="radio"&gt;
&lt;input type="radio" name="group1" value="2" data-toggle="radio" checked&gt;
Radio is on
&lt;/label&gt;
</pre>
<h6 class="ptl">The JS:</h6>
<pre class="prettyprint">
$(':radio').radio();
</pre>
<div class="pvm">
<h6>Methods:</h6>
</div>
<p class="mbl">
<strong>.radio('check')</strong>
<br/>
sets the radio button state to <span class="text-info">checked</span>.
</p>
<p class="mbl">
<strong>.radio('uncheck')</strong>
<br/>
sets the radio state to <span class="text-info">unchecked</span>.
</p>
<pre class="prettyprint">
$(':radio').radio('check');
</pre>
<div class="pbm ptl">
<h6>Events:</h6>
</div>
<p class="mbl">
<strong>.on('toggle')</strong>
<br/>
Fired when the radio button state changes between
<span class="text-info">checked</span> and
<span class="text-info">unchecked</span>.
</p>
<p class="mbl">
<strong>.on('change')</strong>
<br/>
Same as <span class="text-info">toggle</span> with just one difference &mdash; the event is fired for each radio button that gets a state change.
</p>
<pre class="prettyprint">
$(':radio').on('toggle', function() {
// Do something
});
</pre>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
</div><!-- /.container -->
<div class="container ptl">
<div id="fui-dropdown" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Dropdown</h3>
</div>
<div class="demo-content">
<p class="mbl">
The same <a href="http://getbootstrap.com/components/#dropdowns">Bootstrap dropdown</a> is used as a part of the <code>select</code>, <code>btn-group</code>, <code>nav-tabs</code> and eventually other components to present information as a menu.
</p>
<p class="mbl">
Notice <code>dropdown-arrow</code>, which is needed when you want to add a small triangle that visually connects the clickable element with the dropdown menu.
</p>
<select name="info" class="mbn">
<optgroup label="Profile">
<option value="0">My Profile</option>
<option value="1">My Friends</option>
</optgroup>
<optgroup label="System">
<option value="2">Messages</option>
<option value="3">My Settings</option>
<option value="4" class="highlighted">Logout</option>
</optgroup>
</select>
<hr/>
<div class="row">
<div class="col-md-3">
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Dropdown<span class="caret"></span></button>
<span class="dropdown-arrow dropdown-arrow-inverse"></span>
<ul class="dropdown-menu dropdown-inverse">
<li><a href="#fakelink">Sub Menu Element</a></li>
<li><a href="#fakelink">Sub Menu Element</a></li>
<li><a href="#fakelink">Sub Menu Element</a></li>
</ul>
</div>
</div>
</div>
<div class="pvl">
<pre class="prettyprint">
&lt;!-- Default look --&gt;
&lt;div class="dropdown"&gt;
&lt;button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Dropdown&lt;span class="caret"&gt;&lt;/span&gt;&lt;/button&gt;
&lt;span class="dropdown-arrow"&gt;&lt;/span&gt;
&lt;ul class="dropdown-menu"&gt;
&lt;li&gt;&lt;a href="#fakelink">Sub Menu Element&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fakelink">Sub Menu Element&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fakelink">Sub Menu Element&lt;/a&gt;&lt;/li&gt;
&lt;/u&gt;
&lt;/div&gt;
&lt;!-- Inverse look --&gt;
&lt;div class="dropdown"&gt;
&lt;button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Dropdown&lt;span class="caret"&gt;&lt;/span&gt;&lt;/button&gt;
&lt;span class="dropdown-arrow dropdown-arrow-inverse"&gt;&lt;/span&gt;
&lt;ul class="dropdown-menu dropdown-inverse"&gt;
&lt;li&gt;&lt;a href="#fakelink">Sub Menu Element&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fakelink">Sub Menu Element&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fakelink">Sub Menu Element&lt;/a&gt;&lt;/li&gt;
&lt;/u&gt;
&lt;/div&gt;
</pre>
</div>
<p>
To highlight the information we added 2 additional states for the dropdown-menu items: <code>selected</code> and <code>highlighted</code>:
</p>
<pre class="prettyprint">
&lt;ul class="dropdown-menu"&gt;
&lt;li class="selected"&gt;
&lt;a href="#"&gt;Item&lt;/a&gt;
&lt;/li&gt;
&lt;li class="highlighted"&gt;
&lt;a href="#"&gt;Item&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
</pre>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-input" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Input</h3>
</div>
<div class="demo-content">
<p class="mbl">
The restyled <a href="http://getbootstrap.com/css/#forms">Bootstrap input</a>. Add <span class="text-info">flat</span> as an additional class to completely remove the borders:
</p>
<div class="row">
<div class="col-lg-5">
<input type="text" value="" placeholder="Enter something" class="form-control" />
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-5">
<input type="text" value="" placeholder="Enter something" class="form-control flat" />
</div>
</div>
<pre class="prettyprint mtl">
&lt;!-- Default input --&gt;
&lt;input type="text" placeholder="Enter something" class="form-control" /&gt;
&lt;!-- Without borders --&gt;
&lt;input type="text" placeholder="Enter something" class="form-control flat" /&gt;
</pre>
<p class="ptl">And few sizes:</p>
<div class="row">
<div class="col-lg-5">
<input type="text" value="" placeholder="Huge" class="form-control input-hg" />
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-5">
<input type="text" value="" placeholder="Large" class="form-control input-lg" />
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-5">
<input type="text" value="" placeholder="Default" class="form-control" />
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-5">
<input type="text" value="" placeholder="Small" class="form-control input-sm" />
</div>
</div>
<pre class="prettyprint mtl">
&lt;input type="text" class="form-control input-hg" placeholder="Huge" /&gt;
&lt;input type="text" class="form-control input-lg" placeholder="Large" /&gt;
&lt;input type="text" class="form-control" placeholder="Default" /&gt;
&lt;input type="text" class="form-control input-sm" placeholder="Small" /&gt;
</pre>
<p class="ptl">You can have an icon inside:</p>
<div class="row">
<div class="col-lg-5">
<div class="form-group">
<input type="text" value="" placeholder="With icon" class="form-control" />
<span class="input-icon fui-check-inverted"></span>
</div>
</div>
</div>
<pre class="prettyprint mtm">
&lt;div class="form-group"&gt;
&lt;input type="text" class="form-control" placeholder="With icon" /&gt;
&lt;span class="input-icon fui-check-inverted"&gt;&lt;/span&gt;
&lt;/div&gt;
</pre>
<p class="ptl">You can have the input with append/prepend options:</p>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">@</span>
<input class="form-control" type="text" placeholder="Prepend" />
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<div class="input-group">
<input class="form-control" type="text" placeholder="Append" />
<span class="input-group-addon">@</span>
</div>
</div>
</div>
</div>
<pre class="prettyprint mtm">
&lt;!-- Prepend --&gt;
&lt;div class="form-group"&gt;
&lt;div class="input-group"&gt;
&lt;span class="input-group-addon"&gt;@&lt;/span&gt;
&lt;input type="text" class="form-control" placeholder="Prepend" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- Append --&gt;
&lt;div class="form-group"&gt;
&lt;div class="input-group"&gt;
&lt;input type="text" class="form-control" placeholder="Append" /&gt;
&lt;span class="input-group-addon"&gt;@&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
</pre>
<p class="ptl">
The different color styles and the disabled state work as expected:
<div class="row">
<div class="col-lg-6">
<div class="form-group has-error">
<input class="form-control" type="text" placeholder="Error" />
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group has-warning">
<input class="form-control" type="text" placeholder="Warning" />
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group has-success">
<input class="form-control" type="text" placeholder="Success" />
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<input class="form-control" type="text" placeholder="Disabled" disabled />
</div>
</div>
</div>
</p>
<p class="ptl mtl">
The search form doesn't have any background color set to append/prepend:
</p>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<div class="input-group input-group-hg input-group-rounded">
<span class="input-group-btn">
<button type="submit" class="btn"><span class="fui-search"></span></button>
</span>
<input type="text" class="form-control" placeholder="Search" id="search-query-2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" id="search-query-3">
<span class="input-group-btn">
<button type="submit" class="btn"><span class="fui-search"></span></button>
</span>
</div>
</div>
</div>
</div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-navbar" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Navbar</h3>
</div>
<div class="demo-content">
<p class="mbl">
The restyled <a href="http://getbootstrap.com/components/#navbar">Bootstrap navbar</a>.
</p>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-01">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Flat UI</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-01">
<ul class="nav navbar-nav">
<li class="active"><a href="#fakelink">Products</a></li>
<li><a href="#fakelink">Features</a></li>
</ul>
<form class="navbar-form navbar-right" action="#" role="search" style="width: 250px">
<div class="form-group">
<div class="input-group">
<input class="form-control" id="navbarInput-01" type="search" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn"><span class="fui-search"></span></button>
</span>
</div>
</div>
</form>
</div><!-- /.navbar-collapse -->
</nav><!-- /navbar -->
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-default" role="navigation"&gt;
&lt;div class="navbar-header"&gt;
&lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-01"&gt;
&lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
&lt;/button&gt;
&lt;a class="navbar-brand" href="#"&gt;Flat UI&lt;/a&gt;
&lt;/div&gt;
&lt;div class="collapse navbar-collapse" id="navbar-collapse-01"&gt;
&lt;ul class="nav navbar-nav"&gt;
&lt;li class="active"&gt;&lt;a href="#fakelink"&gt;Products&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fakelink"&gt;Features&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;form class="navbar-form navbar-right" action="#" role="search"&gt;
&lt;div class="form-group"&gt;
&lt;div class="input-group"&gt;
&lt;input class="form-control" id="navbarInput-01" type="search" placeholder="Search"&gt;
&lt;span class="input-group-btn"&gt;
&lt;button type="submit" class="btn"&gt;&lt;span class="fui-search"&gt;&lt;/span&gt;&lt;/button&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/div>&lt;!-- /.navbar-collapse --&gt;
&lt;/nav>&lt;!-- /navbar --&gt;
</pre>
<p class="ptl">Inverted navbar:</p>
<nav class="navbar navbar-inverse" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-02">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Flat UI</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-02">
<ul class="nav navbar-nav">
<li class="active"><a href="#fakelink">Products</a></li>
<li><a href="#fakelink">Features</a></li>
</ul>
<form class="navbar-form navbar-right" action="#" role="search" style="width: 250px">
<div class="form-group">
<div class="input-group">
<input class="form-control" id="navbarInput-01" type="search" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn"><span class="fui-search"></span></button>
</span>
</div>
</div>
</form>
</div><!-- /.navbar-collapse -->
</nav><!-- /navbar -->
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-inverse" role="navigation"&gt;
&lt;!-- Navbar content --&gt;
&lt;/nav&gt;
</pre>
<p class="ptl">Embossed navbar:</p>
<nav class="navbar navbar-inverse navbar-embossed" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-02">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Flat UI</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-02">
<ul class="nav navbar-nav">
<li class="active"><a href="#fakelink">Products</a></li>
<li><a href="#fakelink">Features</a></li>
</ul>
<form class="navbar-form navbar-right" action="#" role="search" style="width: 250px">
<div class="form-group">
<div class="input-group">
<input class="form-control" id="navbarInput-01" type="search" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn"><span class="fui-search"></span></button>
</span>
</div>
</div>
</form>
</div><!-- /.navbar-collapse -->
</nav><!-- /navbar -->
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-inverse navbar-embossed" role="navigation"&gt;
&lt;!-- Navbar content --&gt;
&lt;/nav&gt;
</pre>
<p class="ptl">Large navbar:</p>
<nav class="navbar navbar-default navbar-lg" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-03">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Flat UI</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-03">
<ul class="nav navbar-nav">
<li class="active"><a href="#fakelink">Products</a></li>
<li><a href="#fakelink">Features</a></li>
</ul>
<form class="navbar-form navbar-right" action="#" role="search" style="width: 250px">
<div class="form-group">
<div class="input-group">
<input class="form-control" id="navbarInput-01" type="search" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn"><span class="fui-search"></span></button>
</span>
</div>
</div>
</form>
</div><!-- /.navbar-collapse -->
</nav><!-- /navbar -->
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-default navbar-lg" role="navigation"&gt;
&lt;!-- Navbar content --&gt;
&lt;/nav&gt;
</pre>
<p class="ptl">Inline forms:</p>
<nav role="navigation" class="navbar navbar-inverse navbar-embossed">
<div class="navbar-header">
<button data-target="#navbar-collapse-04" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="sr-only">Toggle navigation</span>
</button>
<a href="#" class="navbar-brand">Flat UI</a>
</div>
<div id="navbar-collapse-04" class="collapse navbar-collapse">
<form role="search" class="navbar-form navbar-left">
<div class="form-group">
<input type="text" placeholder="Search" class="form-control">
</div>
<button class="btn btn-default" type="submit">Submit</button>
</form>
</div>
</nav>
<pre class="prettyprint mvl">
&lt;form role="search" class="navbar-form navbar-left"&gt;
&lt;div class="form-group"&gt;
&lt;input type="text" placeholder="Search" class="form-control"&gt;
&lt;/div&gt;
&lt;button class="btn btn-default" type="submit"&gt;Submit&lt;/button&gt;
&lt;/form&gt;
</pre>
<p class="ptl">Buttons:</p>
<nav role="navigation" class="navbar navbar-inverse navbar-embossed">
<div class="navbar-header">
<button data-target="#navbar-collapse-05" data-toggle="collapse" class="navbar-toggle" type="button">
</button>
<a href="#" class="navbar-brand">Flat UI</a>
</div>
<div id="navbar-collapse-05" class="collapse navbar-collapse">
<button class="btn btn-default navbar-btn" type="button">Sign in</button>
<button class="btn btn-default navbar-btn btn-sm" type="button">Sign in</button>
<button class="btn btn-default navbar-btn btn-xs" type="button">Sign in</button>
</div>
</nav>
<pre class="prettyprint mvl">
&lt;!-- Default Navbar Button --&gt;
&lt;button class="btn btn-default navbar-btn" type="button"&gt;Sign in&lt;/button&gt;
&lt;!-- Small Navbar Button --&gt;
&lt;button class="btn btn-default navbar-btn btn-sm" type="button"&gt;Sign in&lt;/button&gt;
&lt;!-- Extra Small Navbar Button --&gt;
&lt;button class="btn btn-default navbar-btn btn-xs" type="button"&gt;Sign in&lt;/button&gt;
</pre>
<p class="ptl">Text:</p>
<nav role="navigation" class="navbar navbar-inverse navbar-embossed">
<div class="navbar-header">
<button data-target="#navbar-collapse-06" data-toggle="collapse" class="navbar-toggle" type="button">
</button>
<a href="#" class="navbar-brand">Flat UI</a>
</div>
<div id="navbar-collapse-06" class="collapse navbar-collapse">
<p class="navbar-text">Signed in as Mark Otto</p>
</div>
</nav>
<pre class="prettyprint mvl">
&lt;p class="navbar-text"&gt;Signed in as Mark Otto&lt;/p&gt;
</pre>
<p class="ptl">Non-nav links:</p>
<nav role="navigation" class="navbar navbar-inverse navbar-embossed">
<div class="navbar-header">
<button data-target="#navbar-collapse-07" data-toggle="collapse" class="navbar-toggle" type="button">
</button>
<a href="#" class="navbar-brand">Flat UI</a>
</div>
<div id="navbar-collapse-07" class="collapse navbar-collapse">
<p class="navbar-text navbar-right">Signed in as <a class="navbar-link" href="#">Mark Otto</a></p>
</div>
</nav>
<pre class="prettyprint mvl">
&lt;p class="navbar-text navbar-right"&gt;Signed in as &lt;a class="navbar-link" href="#"&gt;Mark Otto&lt;/a&gt;&lt;/p&gt;
</pre>
<p class="ptl">New and Unread indicators:</p>
<nav class="navbar navbar-inverse navbar-embossed" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-02">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Flat UI</a>
</div>
<div class="collapse navbar-collapse" id="#navbar-collapse-02">
<ul class="nav navbar-nav">
<li><a href="#">Messages<span class="navbar-unread">1</span></a></li>
<li><a href="#">About Us<span class="navbar-new">1</span></a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav><!-- /navbar -->
<pre class="prettyprint mvl">
&lt;!-- ... --&gt;
&lt;ul class="nav navbar-nav"&gt;
&lt;li&gt;
&lt;a href="#"&gt;
Menu item
&lt;!-- Indicator with number --&gt;
&lt;span class="navbar-new"&gt;2&lt;/span&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- ... --&gt;
</pre>
<pre class="prettyprint mvl">
&lt;!-- ... --&gt;
&lt;ul class="nav navbar-nav"&gt;
&lt;li&gt;
&lt;a href="#"&gt;
Menu item
&lt;!-- Indicator without number --&gt;
&lt;span class="navbar-unread"&gt;&lt;/span&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- ... --&gt;
</pre>
<p class="ptl">Fixed to top:</p>
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-default navbar-fixed-top" role="navigation"&gt;
&lt;!-- Navbar content --&gt;
&lt;/nav&gt;
</pre>
<p class="ptl">Fixed to bottom:</p>
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-default navbar-fixed-bottom" role="navigation"&gt;
&lt;!-- Navbar content --&gt;
&lt;/nav&gt;
</pre>
<p class="ptl">Static top:</p>
<pre class="prettyprint mvl">
&lt;nav class="navbar navbar-default navbar-static-top" role="navigation"&gt;
&lt;!-- Navbar content --&gt;
&lt;/nav&gt;
</pre>
<div id="fui-pager"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-pager" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Pager</h3>
</div>
<div class="demo-content">
<p>
Short pagination where links have a button look. Used for navigating to the next/prev item.
</p>
<ul class="pager">
<li class="previous">
<a href="#fakelink">
<i class="fui-arrow-left"></i>
<span>All messages</span>
</a>
</li>
<li class="next">
<a href="#fakelink">
<i class="fui-arrow-right"></i>
</a>
</li>
</ul>
<pre class="prettyprint mvl">
&lt;ul class="pager"&gt;
&lt;li class="previous"&gt;
&lt;a href="#"&gt;
&lt;span&gt;
&lt;i class="fui-arrow-left"&gt;&lt;/i&gt;
All messages
&lt;/span&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li class="next"&gt;
&lt;a href="#"&gt;
&lt;i class="fui-arrow-right"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
</pre>
<div id="fui-pagination"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-pagination" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Pagination</h3>
</div>
<div class="demo-content">
<p>
The restyled <a href="http://getbootstrap.com/components/#pagination">Bootstrap pagination</a>. We have added a dropdown navigation, a minimalistic look and a text-only look. We have also added a few color schemes with an alternative layout.
</p>
<div class="pagination">
<ul>
<li class="previous"><a href="#fakelink" class="fui-arrow-left"></a></li>
<li class="active"><a href="#fakelink">1</a></li>
<li><a href="#fakelink">2</a></li>
<li><a href="#fakelink">3</a></li>
<li><a href="#fakelink">4</a></li>
<li><a href="#fakelink">5</a></li>
<li><a href="#fakelink">6</a></li>
<li><a href="#fakelink">7</a></li>
<li><a href="#fakelink">8</a></li>
<li><a href="#fakelink">9</a></li>
<li><a href="#fakelink">10</a></li>
<li class="next"><a href="#fakelink" class="fui-arrow-right"></a></li>
</ul>
</div>
<pre class="prettyprint mvl">
&lt;div class="pagination"&gt;
&lt;ul&gt;
&lt;li class="previous"&gt;
&lt;a href="#" class="fui-arrow-left"&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li class="active"&gt;&lt;a href="#fakelink"&gt;1&lt;/a&gt;&lt;/li&gt;
...
&lt;li&gt;&lt;a href="#fakelink"&gt;10&lt;/a&gt;&lt;/li&gt;
&lt;li class="next"&gt;
&lt;a href="#" class="fui-arrow-right"&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-progress" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Progress</h3>
</div>
<div class="demo-content">
<p>
The restyled <a href="http://getbootstrap.com/components/#progress">Bootstrap progress</a>.
</p>
<div class="progress">
<div class="progress-bar" style="width: 45%;"></div>
</div>
<div class="progress">
<div class="progress-bar" style="width: 40%;"></div>
<div class="progress-bar progress-bar-warning" style="width: 10%;"></div>
<div class="progress-bar progress-bar-danger" style="width: 10%;"></div>
<div class="progress-bar progress-bar-success" style="width: 10%;"></div>
<div class="progress-bar progress-bar-info" style="width: 10%;"></div>
</div>
<pre class="prettyprint mvl">
&lt;div class="progress"&gt;
&lt;div class="progress-bar" style="width: 40%;"&gt;&lt;/div&gt;
&lt;div class="progress-bar progress-bar-warning" style="width: 10%;"&gt;&lt;/div&gt;
&lt;div class="progress-bar progress-bar-danger" style="width: 10%;"&gt;&lt;/div&gt;
&lt;div class="progress-bar progress-bar-success" style="width: 10%;"&gt;&lt;/div&gt;
&lt;div class="progress-bar progress-bar-info" style="width: 10%;"&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<div id="fui-select"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-select" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Select</h3>
</div>
<div class="demo-content">
<p class="mbl">
We have made a custom select due to the inability of styling the system one. It is based on the <a href="https://github.com/silviomoreto/bootstrap-select">Selectpicker</a> plug-in with the source slightly modified to meet Bootstrap naming convention.
</p>
<p class="mbl">
The component inherits its entire style from the button so you can use all its colors and sizes without any problems. We have also supported the <span class="text-info">multiple</span> select state as well as the <span class="text-info">block</span> mode where it takes all the available space.
</p>
<p class="mbl pbl">
Grids are supported here as&nbsp;well. For more technical details read the <a href="https://github.com/silviomoreto/bootstrap-select#usage">original&nbsp;documentation</a>.
</p>
<select name="huge" class="select-block mbl">
<optgroup label="Profile">
<option value="0">My Profile</option>
<option value="1">My Friends</option>
</optgroup>
<optgroup label="System">
<option value="2">Messages</option>
<option value="3">My Settings</option>
<option value="4" class="highlighted">Logout</option>
</optgroup>
</select>
<select multiple="multiple" name="huge" class="select-block mbl">
<option value="0">1</option>
<option value="1" selected>2</option>
<option value="2" selected>3</option>
<option value="3" selected>4</option>
<option value="4">5</option>
</select>
<p class="mvl">
You can write the markup as you would usually do, without any difference:
</p>
<pre class="prettyprint mvl">
&lt;select&gt;
&lt;option value="0"&gt;My Profile&lt;/option&gt;
&lt;option value="1"&gt;My Friends&lt;/option&gt;
&lt;/select&gt;
&lt;select multiple="multiple"&gt;
&lt;option value="0"&gt;My Profile&lt;/option&gt;
&lt;option value="1" selected&gt;My Friends&lt;/option&gt;
&lt;option value="2" selected&gt;My Books&lt;/option&gt;
&lt;option value="3"&gt;My CDs&lt;/option&gt;
&lt;/select&gt;
</pre>
<p class="mvl ptl">
Then transform all the system selects into custom ones with JS:
</p>
<pre class="prettyprint mvl">
$("select").selectpicker({style: 'btn-hg btn-primary', menuStyle: 'dropdown-inverse'});
// style: select toggle class name (which is .btn)
// menuStyle: dropdown class name
// You can always select by any other attribute, not just tag name.
// Also you can leave selectpicker arguments blank to apply defaults.
</pre>
<div id="fui-switch"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-switch" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Switch</h3>
</div>
<div class="demo-content">
<p class="mbl">
You can use a custom switch instead of a checkbox. It can have 2 styles: <span class="text-info">circle</span> (default) and <span class="text-info">square</span>. Drag functionality is also supported.
</p>
<p class="mbl pbl">
For more technical details read the <a href="http://www.larentis.eu/switch">original documentation</a>.
</p>
<span class="mrl">
<input type="checkbox" checked data-toggle="switch" />
</span>
<input type="checkbox" data-toggle="switch" />
<hr/>
<div class="switch switch-square mrl"
data-on-label="<i class='fui-check'></i>"
data-off-label="<i class='fui-cross'></i>">
<input type="checkbox" />
</div>
<div class="switch switch-square"
data-on-label="<i class='fui-check'></i>"
data-off-label="<i class='fui-cross'></i>">
<input type="checkbox" checked />
</div>
<pre class="prettyprint mvl">
&lt;!-- Default switch --&gt;
&lt;input type="checkbox" checked data-toggle="switch" /&gt;
&lt;!-- Square switch --&gt;
&lt;div class="switch switch-square"&gt;
&lt;input type="checkbox" checked data-toggle="switch" /&gt;
&lt;/div&gt;
&lt;!-- Switch with customized icons --&gt;
&lt;div class="switch switch-square"
data-on-label="&lt;i class='fui-check'&gt;&lt;/i&gt;"
data-off-label="&lt;i class='fui-cross'&gt;&lt;/i&gt;"&gt;
&lt;input type="checkbox" /&gt;
&lt;/div&gt;
</pre>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-tagsinput" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Tags input</h3>
</div>
<div class="demo-content">
<p class="mbl">
Used for managing multiple tags with the ability of adding a new one and removing or validating an existing one. It is available in 2 color schemes: grey(default) and primary.
</p>
<p class="mbl pbl">
This component is based on the <a href="http://xoxco.com/projects/code/tagsinput">Tags Input Plugin</a>. For more technical details read the <a href="https://github.com/xoxco/jQuery-Tags-Input#instructions">official plug-in&nbsp;documentation</a>.
</p>
<input name="tagsinput" class="tagsinput" value="Clean,Fresh,Modern,Unique" />
<p class="ptl">The markup:</p>
<pre class="prettyprint mvl">
&lt;input name="tagsinput" class="tagsinput" value="Clean,Fresh,Modern,Unique" /&gt;
</pre>
<p class="ptl">JS:</p>
<pre class="prettyprint mvl">
$(".tagsinput").tagsInput();
</pre>
<div id="fui-tooltip"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-tooltip" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Tooltip</h3>
</div>
<div class="demo-content">
<p class="mbl">
Restyled <a href="http://getbootstrap.com/javascript/#tooltips">Bootstrap tooltip</a>.
</p>
<div style="width: 40%; padding-left: 10px; height: 60px;">
<div class="demo-tooltips">
<p data-toggle="tooltip" title="Here is a sample of a long dark tooltip. Hell yeah."></p>
</div>
</div> <!-- /tooltips -->
<pre class="prettyprint mvl">
&lt;p data-toggle="tooltip" title="Tooltip copy"&gt;&lt;/p&gt;
</pre>
<div id="fui-slider"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div id="fui-slider" class="pbl"></div>
<div class="demo-row">
<div class="demo-title">
<h3>Slider</h3>
</div>
<div class="demo-content">
<p class="mbl">
The restyled <a href="http://jqueryui.com/slider">jQuery UI slider</a> with added slider segments.
</p>
<div id="slider" class="ui-slider"></div>
<p class="ptl">The markup:</p>
<pre class="prettyprint mvl">
&lt;div id="slider" class="ui-slider"&gt;&lt;/div&gt;
</pre>
<p class="ptl">JS:</p>
<pre class="prettyprint mvl">
var $slider = $("#slider");
if ($slider.length > 0) {
$slider.slider({
min: 1,
max: 5,
value: 3,
orientation: "horizontal",
range: "min"
}).addSliderSegments($slider.slider("option").max);
}
</pre>
<p class="pvl">How does <span class="text-info">addSliderSegments()</span> work?</p>
<p>This is an extended jQuery method placed in the <code>application.js</code> file. It calculates how many segments to append to the slider by looking at a <span class="text-info">slider("option").max</span> which shows a maximum slider value.</p>
<pre class="prettyprint mvl">
// Add segments to a slider
$.fn.addSliderSegments = function (amount, orientation) {
return this.each(function () {
if (orientation == "vertical") {
var output = ''
, i;
for (i = 1; i &lt;= amount - 2; i++) {
output += '&lt;div class="ui-slider-segment" style="top:' + 100 / (amount - 1) * i + '%;"&gt;&lt;/div&gt;';
};
$(this).prepend(output);
} else {
var segmentGap = 100 / (amount - 1) + "%"
, segment = '&lt;div class="ui-slider-segment" style="margin-left: ' + segmentGap + ';"&gt;&lt;/div&gt;';
$(this).prepend(segment.repeat(amount - 2));
}
});
};
</pre>
<p class="pvl">Vertical slider:</p>
<div class="pbl">
<div id="vertical-slider" style="height: 200px;"></div>
</div>
<p class="ptl">The markup:</p>
<pre class="prettyprint mvl">
&lt;div id="vertical-slider" style="height: 200px;"&gt;&lt;/div&gt;
</pre>
<p class="ptl">The JS:</p>
<pre class="prettyprint mvl">
var $verticalSlider = $("#vertical-slider");
if ($verticalSlider.length) {
$verticalSlider.slider({
min: 1,
max: 5,
value: 3,
orientation: "vertical",
range: "min"
}).addSliderSegments($verticalSlider.slider("option").max, "vertical");
}
</pre>
<p class="pvl">Custom slider values:</p>
<div class="pbl">
<div id="slider3">
<span class="ui-slider-value first"></span>
<span class="ui-slider-value last"></span>
</div>
</div>
<p class="ptl">The markup:</p>
<pre class="prettyprint mvl">
&lt;div id="slider3"&gt;
&lt;span class="ui-slider-value first"&gt;&lt;/span&gt;
&lt;span class="ui-slider-value last"&gt;&lt;/span&gt;
&lt;/div&gt;
</pre>
<p class="ptl">The JS:</p>
<pre class="prettyprint mvl">
var $slider3 = $("#slider3")
, slider3ValueMultiplier = 100
, slider3Options;
if ($slider3.length > 0) {
$slider3.slider({
min: 1,
max: 5,
values: [3, 4],
orientation: "horizontal",
range: true,
slide: function(event, ui) {
$slider3.find(".ui-slider-value:first")
.text("$" + ui.values[0] * slider3ValueMultiplier)
.end()
.find(".ui-slider-value:last")
.text("$" + ui.values[1] * slider3ValueMultiplier);
}
});
slider3Options = $slider3.slider("option");
$slider3.addSliderSegments(slider3Options.max)
.find(".ui-slider-value:first")
.text("$" + slider3Options.values[0] * slider3ValueMultiplier)
.end()
.find(".ui-slider-value:last")
.text("$" + slider3Options.values[1] * slider3ValueMultiplier);
}
</pre>
<div id="fui-typeahead"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
<div class="demo-row">
<div class="demo-title">
<h3>Typeahead</h3>
</div>
<div class="demo-content">
<p class="mbl">
The restyled <a href="http://twitter.github.io/typeahead.js">Twitter Typeahead</a>.
</p>
<div class="form-group">
<input class="form-control" type="text" id="typeahead-demo-01" />
</div>
<div id="fui-slider"></div>
</div> <!-- /.demo-content -->
</div> <!-- /.demo-row -->
</div><!-- /.container -->
<!-- Load JS here for greater good =============================-->
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery-ui-1.10.3.custom.min.js"></script>
<script src="js/jquery.ui.touch-punch.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-select.js"></script>
<script src="js/bootstrap-switch.js"></script>
<script src="js/flatui-checkbox.js"></script>
<script src="js/flatui-radio.js"></script>
<script src="js/jquery.tagsinput.js"></script>
<script src="js/jquery.placeholder.js"></script>
<script src="js/typeahead.js"></script>
<script src="bootstrap/js/google-code-prettify/prettify.js"></script>
<script src="js/application.js"></script>
</body>
</html>