-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
2,561 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
<!DOCTYPE html> | ||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | ||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | ||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>bootstrap-drawer documentation</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> | ||
<link rel="stylesheet" type="text/css" href="example/prettify/prettify.css"> | ||
<link rel="stylesheet" type="text/css" href="example/drawer-docs.css"> | ||
</head> | ||
<body class="has-offcanvas"> | ||
<div id="docDrawer" class="drawer dw-xs-10 dw-sm-4 dw-md-3 fold in open" aria-labelledby="docDrawer"> | ||
<div class="drawer-controls"> | ||
<a href="#docDrawer" data-toggle="drawer" href="#docDrawer" aria-foldedopen="true" aria-controls="docDrawer" class="btn btn-default"><i class="fa fa-align-justify"></i></a> | ||
</div> | ||
<div class="drawer-contents"> | ||
<div class="drawer-heading"> | ||
<h2 class="drawer-title"><strong>bootstrap-drawer</strong></h2> | ||
</div> | ||
<div class="drawer-body"> | ||
<iframe src="https://ghbtns.com/github-btn.html?user=clineamb&repo=bootstrap-drawer&type=star&count=true" frameborder="0" scrolling="0" width="100" height="20px"></iframe> | ||
<iframe src="https://ghbtns.com/github-btn.html?user=clineamb&repo=bootstrap-drawer&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="100" height="20px"></iframe> | ||
</div> | ||
<div class="drawer-heading"> | ||
<h3 class="drawer-title">Basics</h2> | ||
</div> | ||
<ul id="doc-nav" class="drawer-fullnav"> | ||
<li role="presentation"><a href="index.html#top">Home / Basic Usage</a></li> | ||
<li role="presentation"><a href="index.html#options">Position / Colors</a></li> | ||
<li role="presentation"><a href="index.html#javascript">data-toggle / Javascript</a></li> | ||
</ul> | ||
<div class="drawer-heading"> | ||
<h3 class="drawer-title">Other Links</h2> | ||
</div> | ||
<ul class="drawer-fullnav"> | ||
<li role="presentation"><a href="http://github.com/clineamb/bootstrap-drawer" target="_blank"><i class="fa fa-github-alt"></i> GitHub Repo</a></li> | ||
<li role="presentation"><a href="http://www.npmjs.com/package/bootstrap-drawer" target="_blank"><i class="fa fa-share-square"></i> npm</a></li> | ||
<li role="presentation"><a href="http://twitter.com/clineamb" target="_blank"><i class="fa fa-twitter"></i> @clineamb</a></li> | ||
<li><a name=""><iframe src="https://ghbtns.com/github-btn.html?user=clineamb&type=follow&count=true" frameborder="0" scrolling="0" width="100%" height="20px"></iframe></a></li> | ||
</ul> | ||
<div class="drawer-footer"> | ||
<small>© Caroline Amaba</small> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="drawer-docs" data-page="index.html"> | ||
<div class="jumbotron page-topper"> | ||
<div class="container"> | ||
<h1>bootstrap-drawer</h1> | ||
<h4>bootstrap-drawer is a Bootstrap add-on that gives you an off-canvas/drawer element to your page or container!</h4> | ||
</div> | ||
</div> | ||
<div class="container"> | ||
<h2><strong>Note: This documentation is still a work in progress. You can check out what's here, but also make sure you read the <a href="http://github.com/clineamb/bootstrap-drawer/blob/master/readme.md" target="_blank">Readme.md</a> in the repo! Thanks!</strong></h2> | ||
|
||
<div class="page-header"> | ||
<h2>What is it?</h2><a name="top"></a> | ||
</div> | ||
<p><a href="http://clineamb.github.io/bootstrap-drawer#">bootstrap-drawer</a> is a Bootstrap add-on/plugin that, in Bootstrap style, adds an "off-canvas" element to your pages and containers. We call it a "drawer" in these parts.*</p> | ||
<p>I've looked around for fast-and-easy ways of implementing this constantly (and consistently), and I've had to rebuild it a few times. Tired of doing this, I created this! I imagine there's a lot of people like me looking for something like this, especially one that easily works with their front-end framework of choice, <a href="http://getbootstrap.com/" target="_blank">Bootstrap.</a></p> | ||
<p><small>* Mostly because "bootstrap-offcanvas" was taken, and I've always referred to it as a mobile "drawer".</small></p> | ||
|
||
<div class="page-header"> | ||
<h2>Basic Usage <small>ie, the tl;dr <a href="http://github.com/clineamb/bootstrap-drawer/blob/master/readme.md" target="_blank">Readme.md</a></small></h2> | ||
</div> | ||
|
||
<h3>Requirements</h3> | ||
|
||
<p><a href="http://getbootstrap.com/" target="_blank">Bootstrap</a> is required for this plugin, since bootstrap-drawer built on top of the framework and, thus, <a href="http://jquery.com" target="_blank">jQuery</a> is also required.</p> | ||
|
||
<h3>Download</h3> | ||
<p> | ||
<code>bower install bootstrap-drawer</code> or | ||
<code>npm install bootstrap-drawer</code> | ||
</p> | ||
<p>You can also find all the releases on the <a href="https://github.com/clineamb/bootstrap-drawer/releases" target="_blank">Github page.</a> For your convenience, here are some links to the latest releases.</p> | ||
<p> | ||
<a href="http://github.com/clineamb/bootstrap-drawer/releases/tag/1.0.0" target="_blank" class="btn btn-lg btn-primary"><i class="fa fa-github-alt"></i> Download Version 1.0.0</a> | ||
<a href="http://github.com/clineamb/bootstrap-drawer/archive/1.0.0.zip" target="_blank" class="btn btn-lg btn-primary"><i class="fa fa-archive"></i> Get the bootstrap-drawer-1.0.0.zip</a> | ||
</p> | ||
|
||
<h3>Basic Setup</h3> | ||
|
||
<p>If you simply just want to quickly use bootstrap-drawer with Bootstrap, you just need to include <code>dist/bootstrap-drawer.css</code> after Bootstrap, and then include any other files after that.</p> | ||
|
||
<p>The accomanying <code>drawer.js</code> requires Bootstrap's core <code>transitions.js</code> at least (which all come after jQuery). Whether you're just including the separate Javascript components or the entire <code>bootstrap.js</code>, <code>drawer.js</code> needs to come after either/both.</p> | ||
<pre class="prettyprint"> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" type="text/css" href="bootstrap.min.css"> | ||
<link rel="stylesheet" type="text/css" href="bootstrap-drawer.min.css"> | ||
<link rel="stylesheet" type="text/css" href="YOUR_OTHER_STYLES.css"> | ||
</head> | ||
<body class="has-canvas"> | ||
<!-- Off Canvas & other HTML here --> | ||
<script src="jquery.min.js"></script> | ||
<script src="bootstrap.min.js"></script> | ||
<script src="drawer.min.js"></script> | ||
<script src="YOUR_CUSTOM_JS.js"></script> | ||
</body> | ||
</html> | ||
</pre> | ||
|
||
<h3>Basic Usage</h3> | ||
|
||
<p>To get a simple drawer like the one on this page:</p> | ||
<pre class="prettyprint"> | ||
<body class="has-drawer"> <!-- add this class to your body for proper sizing --> | ||
<div id="drawerExample" class="drawer dw-xs-10 dw-sm-6 dw-md-4 fold" aria-labelledby="drawerExample"> | ||
<div class="drawer-controls"> | ||
<a href="#drawerExample" data-toggle="drawer" href="#drawerExample" aria-foldedopen="false" aria-controls="drawerExample" class="btn btn-primary btn-sm">Menu</a> | ||
</div> | ||
<div class="drawer-contents"> | ||
<div class="drawer-heading"> | ||
<h2 class="drawer-title">Menu</h2> | ||
</div> | ||
<div class="drawer-body"> | ||
<p> | ||
This is a properly padded container for content in the | ||
drawer that isn't a navigation. | ||
</p> | ||
<a href="#">A Regular Link</a> | ||
</div> | ||
<ul class="drawer-nav"> | ||
<li role="presentation" class="active"><a href="#">Home</a></li> | ||
<li role="presentation"><a href="#">Profile</a></li> | ||
<li role="presentation"><a href="#">Messages</a></li> | ||
</ul> | ||
<div class="drawer-footer"> | ||
<small>© Caroline Amaba</small> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="container"> | ||
<!-- content as per usual --> | ||
</div> | ||
</body> | ||
</pre> | ||
|
||
<p>bootstrap-drawer was built with a bootstrap-minded style, based on the already built <code>.nav</code> or <code>.panel</code> classes.</p> | ||
|
||
<ul> | ||
<li> | ||
<code>.drawer</code> is the main class. It has a similar sizing system, based on the 12-column system of bootstrap, using <code>.dw-SIZE-#COLS</code>. The drawer is built mobile-first, like the rest of Bootstrap, and the size in width is based on the document's fluid width (a percentage of it, based on the columns). | ||
</li> | ||
<li> | ||
<code>.fold</code> starts the menu closed (<code>.fold.open</code> for an opened drawer). This class, as well as its <a href="#javascript">Javascript component</a> are built similarly to the <code>.collapse</code> components. It had to be named differently because bootstrap-drawer is folding horizontally and not collapsing veritcally. | ||
</li> | ||
<li> | ||
<code>.drawer-controls</code> is a special drawer column made to house a toggle button for the drawer that moves with the component. It's an optional piece, since the menu can be toggled by other buttons either using the built-in <code>data-toggle="drawer"</code> or the jQuery API (<code>$('.drawer').drawer();</code>). | ||
</li> | ||
<li> | ||
<code>.drawer-contents</code> holds the innards of your drawer menu: | ||
|
||
<ul> | ||
<li> | ||
<code>.drawer-heading</code> is the title section of the menu. | ||
</li> | ||
<li> | ||
<code>.drawer-body</code> contains non-menu/nav text that you may want to include in your drawer. | ||
</li> | ||
<li> | ||
<code>.drawer-nav</code> or <code>.drawer-fullnav</code> are built-in stacked-pill/full-width style navigations that are made to play nice with the menu. The list-styles are based on the stacked <a href="http://getbootstrap.com/components/#nav-pills" target="_blank">pills</a> nav. | ||
</li> | ||
<li> | ||
<code>.drawer-footer</code> is a good spot for any small-print type code. Add the <code>.locked</code> class to position it at the bottom of your menu. | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
||
<div class="page-header"> | ||
<h2>Position / Colors <small>and other (advanced) uses.</a></small></h2> | ||
<a name="options"></a> | ||
</div> | ||
|
||
<p>WIP</p> | ||
|
||
<div class="page-header"> | ||
<h2>data-toggle / Javascript</h2> | ||
<a name="javascript"></a> | ||
</div> | ||
|
||
<p>WIP</p> | ||
</div> | ||
</div> | ||
|
||
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script> | ||
<script src="example/prettify/prettify.js"></script> | ||
<script src="example/prettify/run_prettify.js"></script> | ||
<script src="example/bootstrap.min.js"></script> | ||
<script src="dist/js/drawer.js"></script> | ||
<script> | ||
(function($) { | ||
|
||
})(jQuery || {}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<!DOCTYPE html> | ||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | ||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | ||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>bootstrap-drawer documentation</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> | ||
<link rel="stylesheet" type="text/css" href="example/drawer-docs.css"> | ||
<link rel="stylesheet" type="text/css" href="example/github.css"> | ||
</head> | ||
<body class="has-offcanvas"> | ||
<div id="docDrawer" class="drawer dw-xs-10 dw-sm-6 dw-md-5 fold in" aria-labelledby="docDrawer"> | ||
<div class="drawer-controls"> | ||
<a href="#docDrawer" data-toggle="drawer" href="#docDrawer" aria-foldedopen="false" aria-controls="docDrawer" class="btn btn-default"><i class="fa fa-align-justify"></i></a> | ||
</div> | ||
<div class="drawer-contents"> | ||
<div class="drawer-heading"> | ||
<h2 class="drawer-title"><strong>bootstrap-drawer</strong></h2> | ||
</div> | ||
<div class="drawer-body"> | ||
<iframe src="https://ghbtns.com/github-btn.html?user=clineamb&repo=bootstrap-drawer&type=star&count=true" frameborder="0" scrolling="0" width="100" height="20px"></iframe> | ||
<iframe src="https://ghbtns.com/github-btn.html?user=clineamb&repo=bootstrap-drawer&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="100" height="20px"></iframe> | ||
</div> | ||
<div class="drawer-heading"> | ||
<h3 class="drawer-title">Basics</h2> | ||
</div> | ||
<ul id="doc-nav" class="drawer-fullnav"> | ||
<li role="presentation"><a href="index.html">Home / Basic Usage</a></li> | ||
<li role="presentation"><a href="customize.html">Position / Colors</a></li> | ||
<li role="presentation"><a href="javascript.html">data-toggle / Javascript</a></li> | ||
<li role="presentation"><a href="less.html">Using Less</a></li> | ||
</ul> | ||
<div class="drawer-heading"> | ||
<h3 class="drawer-title">Other Links</h2> | ||
</div> | ||
<ul class="drawer-fullnav"> | ||
<li role="presentation"><a href="http://github.com/clineamb/bootstrap-drawer" target="_blank"><i class="fa fa-github-alt"></i> GitHub Repo</a></li> | ||
<li role="presentation"><a href="http://www.npmjs.com/package/bootstrap-drawer" target="_blank"><i class="fa fa-share-square"></i> npm</a></li> | ||
<li role="presentation"><a href="http://twitter.com/clineamb" target="_blank"><i class="fa fa-twitter"></i> @clineamb</a></li> | ||
<li><a name=""><iframe src="https://ghbtns.com/github-btn.html?user=clineamb&type=follow&count=true" frameborder="0" scrolling="0" width="100%" height="20px"></iframe></a></li> | ||
</ul> | ||
<div class="drawer-footer"> | ||
<small>© 2015 Caroline Amaba</small> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="drawer-docs"> | ||
<div class="jumbotron page-topper"> | ||
<div class="container"> | ||
<h1>bootstrap-drawer</h1> | ||
<h4>bootstrap-drawer is a Bootstrap add-on that gives you an off-canvas/drawer element to your page or container! Check it out by clicking the toggle in the top-left corner!</h4> | ||
</div> | ||
</div> | ||
<div id="drawer-docs-content" class="container"> | ||
<h2 id="drawer-customization">Drawer Customization</h2> | ||
<p><strong>bootstrap-drawer</strong> comes with some built-in classes to customize some basics about your drawer. These utility classes are modeled after Bootstrap's Navbar components.</p> | ||
<hr> | ||
<h2 id="position">Position</h2> | ||
<p>Sometimes you might want the drawer to the right. You can do this quickly by adding <code>.drawer-right</code> to the <code>.drawer</code> container.</p> | ||
<pre><code class="lang-html"><div id="drawerExample2" class="drawer drawer-right ..."> | ||
... | ||
</div> | ||
</code></pre> | ||
<div class="panel panel-default has-inner-drawer example-container-right"> | ||
<div id="drawerExample2" class="drawer drawer-right drawer-inside dw-xs-5 fold" aria-labelledby="drawerExample2"> | ||
<div class="drawer-controls"> | ||
<a href="#drawerExample2" data-toggle="drawer" href="#drawerExample2" aria-foldedopen"false" aria-controls="drawerExample2" class="btn btn-primary btn-sm">Menu</a> | ||
</div> | ||
<div class="drawer-contents"> | ||
<div class="drawer-heading"> | ||
<strong>right menu example</strong> | ||
</div> | ||
<ul class="drawer-nav"> | ||
<li role="presentation" class="active"><a href="#">Link</a></li> | ||
<li role="presentation"><a href="#">Link</a></li> | ||
<li role="presentation"><a href="#">Link</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="panel-body"> | ||
<p>You can position the drawer to the right by adding the <code>.drawer-right</code> class. This also works on full-page drawers.</p> | ||
</div> | ||
</div> | ||
|
||
<hr> | ||
<h2 id="inverse-color">Inverse Color</h2> | ||
<p>Like the Bootstrap navbar, there is an inverse color option to the drawer. Just add <code>.drawer-inverse</code> to your <code>.drawer</code> container.</p> | ||
<pre><code class="lang-html"><div id="drawerExample2" class="drawer drawer-inverse ..."> | ||
... | ||
</div> | ||
</code></pre> | ||
<div class="panel panel-default has-inner-drawer example-container"> | ||
<div id="drawerExample3" class="drawer drawer-inverse drawer-inside dw-xs-5 fold" aria-labelledby="drawerExample3"> | ||
<div class="drawer-controls"> | ||
<a href="#drawerExample3" data-toggle="drawer" href="#drawerExample3" aria-foldedopen"false" aria-controls="drawerExample3" class="btn btn-primary btn-sm">Menu</a> | ||
</div> | ||
<div class="drawer-contents"> | ||
<div class="drawer-heading"> | ||
<strong>inverse menu example</strong> | ||
</div> | ||
<ul class="drawer-fullnav"> | ||
<li role="presentation" class="active"><a href="#">Link</a></li> | ||
<li role="presentation"><a href="#">Link</a></li> | ||
<li role="presentation"><a href="#">Link</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="panel-body"> | ||
<p>You can position the drawer to the right by adding the <code>.drawer-right</code> class. This also works on full-page drawers.</p> | ||
</div> | ||
</div> <div id="drawer-docs-footer"> | ||
<a href="#docDrawer" data-toggle="drawer" class="btn btn-lg btn-block btn-primary">Open the Drawer</a> | ||
</div> | ||
</div> | ||
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script> | ||
<script src="example/bootstrap.min.js"></script> | ||
<script src="example/highlight.pack.js"></script> | ||
<script src="dist/js/drawer.js"></script> | ||
<script src="example/docs.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.