Title bar
+Title bars are full width and docked to the top of the viewport.
+ +Title
+<header class="bar bar-nav">
+ <h1 class="title">Title</h1>
+</header>
+
diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 9ecc6ff..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -exclude: ["node_modules"] diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..fbb23f7 --- /dev/null +++ b/about/index.html @@ -0,0 +1,193 @@ + + +
+ + +Learn about the project's history and meet the maintaining team.
+The idea for Ratchet was developed by @connors, @dhg, and @fat in mid-2012. Before it became a full fledged framework, Ratchet began as a series of HTML/CSS prototypes of the Twitter for iPhone app. These prototypes became invaluable to the process of testing new feature designs that ended up being shipped as part of the native mobile app.
+As it became clear that this was the quickest and most effective way to design mobile apps, components were abstracted from these prototypes and became the framework you know today.
+Released in November 2012, Ratchet quickly became one of the most popular prototyping tools on GitHub. Following that initial launch, we released v2 – a complete rewrite. With v2 we've abstracted the platform specific styles into their own theme CSS files, added an icon set called Ratchicons, and offically became part of the Bootstrap family.
+Ratchet is maintained by one of its creators, a couple of core contributors, and its awesome community.
+ +Get involved with Ratchet development by opening an issue or submitting a pull request. Read our contributing guidelines for information on how we develop.
+Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.
+ Download Ratchet +Currently v2.0.1
+Design patterns that serve as basic building blocks.
+Title bars are full width and docked to the top of the viewport.
+ +<header class="bar bar-nav">
+ <h1 class="title">Title</h1>
+</header>
+
Buttons in a title bar are left or right aligned and should be used for actions. Use the .pull-right
or .pull-left
utility classes to float the buttons. Also, be sure to place any floated elements before the title.
<header class="bar bar-nav">
+ <button class="btn pull-left">
+ Left
+ </button>
+ <button class="btn pull-right">
+ Right
+ </button>
+ <h1 class="title">Title</h1>
+</header>
+
Icons can also be used for actions in toolbars. Again, be sure to use utility classes to float the icons into position.
+ + + +<header class="bar bar-nav">
+ <a class="icon icon-left-nav pull-left"></a>
+ <a class="icon icon-compose pull-right"></a>
+ <h1 class="title">Title</h1>
+</header>
+
Link buttons can be used in tool bars to remove the outline. Use these in conjuction with icons to recreate the nav feel from iOS7. Note the use of .btn-nav
to bring the buttons a little bit closer to the edge of the viewport.
<header class="bar bar-nav">
+ <button class="btn btn-link btn-nav pull-left">
+ <span class="icon icon-left-nav"></span>
+ Left
+ </button>
+ <button class="btn btn-link btn-nav pull-right">
+ Right
+ <span class="icon icon-right-nav"></span>
+ </button>
+ <h1 class="title">Title</h1>
+</header>
+
Title bars can also house segmented controls. Feel free to add accompanying buttons too. The control will automatically layout itself out correctly.
+ + + +<header class="bar bar-nav">
+ <button class="btn pull-left">
+ Left
+ </button>
+ <button class="btn pull-right">
+ Right
+ </button>
+ <div class="segmented-control">
+ <a class="control-item active">One</a>
+ <a class="control-item">Two</a>
+ <a class="control-item">Three</a>
+ </div>
+</header>
+
Use Ratchicons in the .tab-bar
to represent different sections of your app.
<nav class="bar bar-tab">
+ <a class="tab-item active" href="#">
+ <span class="icon icon-home"></span>
+ <span class="tab-label">Home</span>
+ </a>
+ <a class="tab-item" href="#">
+ <span class="icon icon-person"></span>
+ <span class="tab-label">Profile</span>
+ </a>
+ <a class="tab-item" href="#">
+ <span class="icon icon-star-filled"></span>
+ <span class="tab-label">Favorites</span>
+ </a>
+ <a class="tab-item" href="#">
+ <span class="icon icon-search"></span>
+ <span class="tab-label">Search</span>
+ </a>
+ <a class="tab-item" href="#">
+ <span class="icon icon-gear"></span>
+ <span class="tab-label">Settings</span>
+ </a>
+</nav>
+
Note: Use push.js to actually change content.
+If you don't want to use icons, that's okay too. The text will appear larger to use the additional space.
+ +<nav class="bar bar-tab">
+ <a class="tab-item active" href="#">
+ Label
+ </a>
+ <a class="tab-item" href="#">
+ Label
+ </a>
+ <a class="tab-item" href="#">
+ Label
+ </a>
+</nav>
+
Note: Use push.js to actually change content.
+Standard bars are basic fixed elements that can be positioned in four places. These can be used to house buttons, icons, or segmented controls (see following examples).
+ +<!-- Segmented control in standard bar fixed to top -->
+<nav class="bar bar-standard">
+ <div class="segmented-control">
+ <a class="control-item active">Thing one</a>
+ <a class="control-item">Thing two</a>
+ <a class="control-item">Thing three</a>
+ </div>
+</nav>
+
+<!-- Block button in standard bar fixed below top bar -->
+<div class="bar bar-standard bar-header-secondary">
+ <button class="btn btn-block">Block level button</button>
+</div>
+
+<!-- Block button in standard bar fixed above the footer -->
+<div class="bar bar-standard bar-footer-secondary">
+ <button class="btn btn-block">Block level button</button>
+</div>
+
+<!-- Icons in standard bar fixed to the bottom of the screen -->
+<div class="bar bar-standard bar-footer">
+ <a class="icon icon-compose pull-left"></a>
+ <a class="icon icon-gear pull-right"></a>
+</div>
+
Use headings and paragraphs to title and describe sections of your app. Apply or wrap elements with .content-padded
to give the content space around the screen.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco.
+<div class="content-padded">
+ <h1>h1. Heading</h1>
+ <h2>h2. Heading</h2>
+ <h3>h3. Heading</h3>
+ <h4>h4. Heading</h4>
+ <h5>h5. Heading</h5>
+ <h6>h6. Heading</h6>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco.</p>
+</div>
+
Table views can be used for organizing data, showing collections of links, or a series of controls.
+ +<ul class="table-view">
+ <li class="table-view-cell">Item 1</li>
+ <li class="table-view-cell table-view-cell">Item 2</li>
+ <li class="table-view-divider">Divider</li>
+ <li class="table-view-cell">Item 3</li>
+</ul>
+
Chevrons should be used to indicate that the item is linked. Just apply the classes .navigate-right
or .navigate-left
to use a chevron.
<ul class="table-view">
+ <li class="table-view-cell">
+ <a class="navigate-right">
+ Item 1
+ </a>
+ </li>
+ <li class="table-view-cell">
+ <a class="navigate-right">
+ Item 2
+ </a>
+ </li>
+ <li class="table-view-cell">
+ <a class="navigate-right">
+ Item 3
+ </a>
+ </li>
+</ul>
+
Note: Table views with the Android theme don't have chevrons to comply with Android Design guidelines. More information can be found here.
+Badges are a great way of showing data.
+ +<ul class="table-view">
+ <li class="table-view-cell">Item 1 <span class="badge">4</span></li>
+ <li class="table-view-cell">Item 2 <span class="badge">1</span></li>
+ <li class="table-view-cell">Item 3 <span class="badge">5</span></li>
+</ul>
+
Feel free to use chevrons and badges together. They'll automatically positon themselves correctly.
+ +<ul class="table-view">
+ <li class="table-view-cell">
+ <a class="navigate-right">
+ <span class="badge">5</span>
+ Item 1
+ </a>
+ </li>
+ <li class="table-view-cell">
+ <a class="navigate-right">
+ <span class="badge">5</span>
+ Item 2
+ </a>
+ </li>
+ <li class="table-view-cell">
+ <a class="navigate-right">
+ <span class="badge">5</span>
+ Item 3
+ </a>
+ </li>
+</ul>
+
Showing media inside table views is easy. This component to perfect for images and text.
+ +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.
+<ul class="table-view">
+ <li class="table-view-cell media">
+ <a class="navigate-right">
+ <img class="media-object pull-left" src="http://placehold.it/42x42">
+ <div class="media-body">
+ Item 1
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.</p>
+ </div>
+ </a>
+ </li>
+ <li class="table-view-cell media">
+ <a class="navigate-right">
+ <img class="media-object pull-left" src="http://placehold.it/42x42">
+ <div class="media-body">
+ Item 1
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.</p>
+ </div>
+ </a>
+ </li>
+ <li class="table-view-cell media">
+ <a class="navigate-right">
+ <img class="media-object pull-left" src="http://placehold.it/42x42">
+ <div class="media-body">
+ Item 1
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.</p>
+ </div>
+ </a>
+ </li>
+</ul>
+
Ratchicons can also used instead of images.
+ +<ul class="table-view">
+ <li class="table-view-cell media">
+ <a class="navigate-right">
+ <span class="media-object pull-left icon icon-trash"></span>
+ <div class="media-body">
+ Item 1
+ </div>
+ </a>
+ </li>
+ <li class="table-view-cell media">
+ <a class="navigate-right">
+ <span class="media-object pull-left icon icon-gear"></span>
+ <div class="media-body">
+ Item 2
+ </div>
+ </a>
+ </li>
+ <li class="table-view-cell media">
+ <a class="navigate-right">
+ <span class="media-object pull-left icon icon-pages"></span>
+ <div class="media-body">
+ Item 3
+ </div>
+ </a>
+ </li>
+</ul>
+
<ul class="table-view">
+ <li class="table-view-cell">Item 1 <button class="btn">Button</button></li>
+ <li class="table-view-cell">Item 2 <button class="btn btn-primary">Button</button></li>
+ <li class="table-view-cell">Item 3 <button class="btn btn-positive">Button</button></li>
+ <li class="table-view-cell">Item 4 <button class="btn btn-negative">Button</button></li>
+</ul>
+
<ul class="table-view">
+ <li class="table-view-cell">
+ Item 1
+ <div class="toggle">
+ <div class="toggle-handle"></div>
+ </div>
+ </li>
+ <li class="table-view-cell">
+ Item 2
+ <div class="toggle active">
+ <div class="toggle-handle"></div>
+ </div>
+ </li>
+ <li class="table-view-cell">
+ Item 3
+ <div class="toggle">
+ <div class="toggle-handle"></div>
+ </div>
+ </li>
+</ul>
+
Use .card
to wrap any content in a padded element.
<div class="card">
+ <ul class="table-view">
+ <li class="table-view-cell">Item 1</li>
+ <li class="table-view-cell">Item 2</li>
+ <li class="table-view-cell table-view-divider">Divider</li>
+ <li class="table-view-cell">Item 3</li>
+ <li class="table-view-cell">Item 4</li>
+ </ul>
+</div>
+
Buttons come in many flavors and should be used for user actions.
+ +<button class="btn">Button</button>
+<button class="btn btn-primary">Button</button>
+<button class="btn btn-positive">Button</button>
+<button class="btn btn-negative">Button</button>
+<button class="btn btn-link">Button</button>
+
+<button class="btn btn-outlined">Button</button>
+<button class="btn btn-primary btn-outlined">Button</button>
+<button class="btn btn-positive btn-outlined">Button</button>
+<button class="btn btn-negative btn-outlined">Button</button>
+
Ratchicons work inside buttons too.
+ +<button class="btn">
+ <span class="icon icon-search"></span>
+ Button
+</button>
+<button class="btn btn-primary">
+ <span class="icon icon-search"></span>
+ Button
+</button>
+<button class="btn btn-positive">
+ <span class="icon icon-search"></span>
+ Button
+</button>
+<button class="btn btn-negative">
+ <span class="icon icon-search"></span>
+ Button
+</button>
+<button class="btn btn-link">
+ <span class="icon icon-left"></span>
+ Button
+</button>
+
<button class="btn">Badge button <span class="badge">1</span></button>
+<button class="btn btn-primary">Badge button <span class="badge badge-primary">1</span></button>
+<button class="btn btn-positive">Badge button <span class="badge badge-positive">1</span></button>
+<button class="btn btn-negative">Badge button <span class="badge badge-negative">1</span></button>
+
+<button class="btn btn-outlined">Badge button <span class="badge badge-inverted">1</span></button>
+<button class="btn btn-outlined btn-primary">Badge button <span class="badge badge-primary badge-inverted">1</span></button>
+<button class="btn btn-outlined btn-positive">Badge button <span class="badge badge-positive badge-inverted">1</span></button>
+<button class="btn btn-outlined btn-negative">Badge button <span class="badge badge-negative badge-inverted">1</span></button>
+
<button class="btn btn-block">Block button</button>
+<button class="btn btn-primary btn-block">Block button</button>
+<button class="btn btn-positive btn-block">Block button</button>
+<button class="btn btn-negative btn-block">Block button</button>
+
+<button class="btn btn-block btn-outlined">Block button</button>
+<button class="btn btn-primary btn-block btn-outlined">Block button</button>
+<button class="btn btn-positive btn-block btn-outlined">Block button</button>
+<button class="btn btn-negative btn-block btn-outlined">Block button</button>
+
Content sections that are to be swapped in and out by the controller should all be siblings and have the class .control-content
. Then, just give each content section an id and point the link in the segmented control to that id.
<div class="segmented-control">
+ <a class="control-item active" href="#item1mobile">
+ Thing one
+ </a>
+ <a class="control-item" href="#item2mobile">
+ Thing two
+ </a>
+ <a class="control-item" href="#item3mobile">
+ Thing three
+ </a>
+</div>
+<div class="card">
+ <span id="item1mobile" class="control-content active">Item 1</span>
+ <span id="item2mobile" class="control-content">Item 2</span>
+ <span id="item3mobile" class="control-content">Item 3</span>
+</div>
+
Badges come in four flavors and should be used to indicate "how many" of something there are. Adding the a class of .badge-inverted
will remove the badges background color.
<span class="badge">1</span>
+<span class="badge badge-primary">2</span>
+<span class="badge badge-positive">3</span>
+<span class="badge badge-negative">4</span>
+
+<span class="badge badge-inverted">1</span>
+<span class="badge badge-primary badge-inverted">2</span>
+<span class="badge badge-positive badge-inverted">3</span>
+<span class="badge badge-negative badge-inverted">4</span>
+
<form>
+ <input type="text" placeholder="Full name">
+ <input type="search" placeholder="Search">
+ <textarea rows="5"></textarea>
+ <button class="btn btn-positive btn-block">Choose existing</button>
+</form>
+
<form class="input-group">
+ <input type="text" placeholder="Full name">
+ <input type="email" placeholder="Email">
+ <input type="text" placeholder="Username">
+</form>
+
<form class="input-group">
+ <div class="input-row">
+ <label>Full name</label>
+ <input type="text" placeholder="Mister Ratchet">
+ </div>
+ <div class="input-row">
+ <label>Email</label>
+ <input type="email" placeholder="ratchetframework@gmail.com">
+ </div>
+ <div class="input-row">
+ <label>Username</label>
+ <input type="text" placeholder="goRatchet">
+ </div>
+</form>
+
Toggles can be used by sliding or tapping the control.
+ +<div class="toggle active">
+ <div class="toggle-handle"></div>
+</div>
+<div class="toggle">
+ <div class="toggle-handle"></div>
+</div>
+
Toggles.js binds an event to the document that returns a detail object and can be used to fire a callback.
+ +// Only needed if you want to fire a callback
+document
+.querySelector('#myToggle')
+.addEventListener('toggle', myFunction)
+
<div id="popover" class="popover">
+ <header class="bar bar-nav">
+ <h1 class="title">Popover title</h1>
+ </header>
+ <ul class="table-view">
+ <li class="table-view-cell">Item1</li>
+ <li class="table-view-cell">Item2</li>
+ <li class="table-view-cell">Item3</li>
+ <li class="table-view-cell">Item4</li>
+ <li class="table-view-cell">Item5</li>
+ <li class="table-view-cell">Item6</li>
+ <li class="table-view-cell">Item7</li>
+ <li class="table-view-cell">Item8</li>
+ </ul>
+</div>
+
Popovers are designed to only fire from title bars. Set the value of the title href to the id of a popover, like so:
+ +<header class="bar bar-nav">
+ <a href="#myPopover">
+ <h1 class="title">
+ Tap title
+ <span class="icon icon-caret"></span>
+ </h1>
+ </a>
+</header>
+
<a href="#myModalexample" class="btn">Open modal</a>
+<div id="myModalexample" class="modal">
+ <header class="bar bar-nav">
+ <a class="icon icon-close pull-right" href="#myModalexample"></a>
+ <h1 class="title">Modal</h1>
+ </header>
+
+ <div class="content">
+ <p class="content-padded">The contents of my modal go here. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.</p>
+ </div>
+</div>
+
Modals are designed to only fire from links. Set the value of the toggle links href to the id of a modal.
+ +Can be used with any number of slides with any type of content.
+ +<div class="slider" id="mySlider">
+ <div class="slide-group">
+ <div class="slide">
+ <img src="/assets/img/slide-1.jpg">
+ <span class="slide-text">
+ <span class="icon icon-left-nav"></span>
+ Slide me
+ </span>
+ </div>
+ <div class="slide">
+ <img src="/assets/img/slide-2.jpg">
+ </div>
+ <div class="slide">
+ <img src="/assets/img/slide-3.jpg">
+ </div>
+ </div>
+</div>
+
Sliders.js binds an event to the document that returns a detail object and can be used to fire a callback.
+ +// Only needed if you want to fire a callback
+document
+.querySelector('#mySlider')
+.addEventListener('slide', myFunction)
+
Push.js is the engine that connects Ratchet pages together with AJAX and the history api. Push.js is listening to all clicks on a page, so just make sure it's included and link something in your Ratchet project up.
+ +<!-- A one.html link -->
+<a href="two.html">Two</a>
+
This will use push to replace everything in the .content div with the .content of two.html. Also, it will either update or remove .bar-nav and .bar-tab according to their presences in two.html.
+ +Now that pages are being loaded through push, it's easy to specify transitions for animations between pages. There are three different transitions to chose from: fade
, slide-in
, or slide-out
.
<!-- An one.html link that animates to two.html -->
+<a href="two.html" data-transition="fade">Two</a>
+
A working version of push:
+ +<header class="bar bar-nav">
+ <h1 class="title">Push</h1>
+</header>
+<div class="content">
+ <div class="card">
+ <ul class="table-view">
+ <li class="table-view-cell">
+ <a class="navigate-right" href="../two.html" data-transition="slide-in">
+ Load new page with push
+ </a>
+ </li>
+ </ul>
+ </div>
+</div>
+
Have a link you don't want to intercepted by push? Try this:
+ +<!-- Use data-ignore="push" to prevent the push.js interception -->
+<a href="http://www.google.com" data-ignore="push">Google<a>
+
Push.js binds an event to the document that returns a detail object and can be used to fire a callback.
+ +// Only needed if you want to fire a callback
+window.addEventListener('push', myFunction);
+
Use Ratchicons in your application to help inform interactions.
+ +<div class="content-padded">
+ <span class="icon icon-home"></span>
+ <span class="icon icon-person"></span>
+ <span class="icon icon-bars"></span>
+ <span class="icon icon-caret"></span>
+ <span class="icon icon-check"></span>
+ <span class="icon icon-close"></span>
+ <span class="icon icon-code"></span>
+ <span class="icon icon-compose"></span>
+ <span class="icon icon-edit"></span>
+ <span class="icon icon-gear"></span>
+ <span class="icon icon-info"></span>
+ <span class="icon icon-list"></span>
+ <span class="icon icon-more"></span>
+ <span class="icon icon-more-vertical"></span>
+ <span class="icon icon-pages"></span>
+ <span class="icon icon-play"></span>
+ <span class="icon icon-pause"></span>
+ <span class="icon icon-stop"></span>
+ <span class="icon icon-back"></span>
+ <span class="icon icon-forward"></span>
+ <span class="icon icon-plus"></span>
+ <span class="icon icon-refresh"></span>
+ <span class="icon icon-search"></span>
+ <span class="icon icon-download"></span>
+ <span class="icon icon-share"></span>
+ <span class="icon icon-sound"></span>
+ <span class="icon icon-sound2"></span>
+ <span class="icon icon-sound3"></span>
+ <span class="icon icon-sound4"></span>
+ <span class="icon icon-star-filled"></span>
+ <span class="icon icon-star"></span>
+ <span class="icon icon-trash"></span>
+ <span class="icon icon-down-nav"></span>
+ <span class="icon icon-down"></span>
+ <span class="icon icon-left-nav"></span>
+ <span class="icon icon-left"></span>
+ <span class="icon icon-right-nav"></span>
+ <span class="icon icon-right"></span>
+ <span class="icon icon-up-nav"></span>
+ <span class="icon icon-up"></span>
+</div>
+
]*>([\s\S.]*)<\/head>/i)[0],d.innerHTML=f.match(/]*>([\s\S.]*)<\/body>/i)[0]):(c=d=document.createElement("div"),c.innerHTML=f),e.title=c.querySelector("title"),e.title=e.title&&e.title.innerText.trim(),b.transition?e=v(e,".content",d):e.contents=d,e):e};window.addEventListener("touchstart",function(){a=!1}),window.addEventListener("touchmove",function(){a=!0}),window.addEventListener("touchend",m),window.addEventListener("click",function(a){l(a)&&a.preventDefault()}),window.addEventListener("popstate",n),window.PUSH=o}(),!function(){"use strict";var a=function(a){for(var b,c=document.querySelectorAll(".segmented-control .control-item");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchend",function(b){var c,d,e,f=a(b.target),g="active",h="."+g;if(f&&(c=f.parentNode.querySelector(h),c&&c.classList.remove(g),f.classList.add(g),f.hash&&(e=document.querySelector(f.hash)))){d=e.parentNode.querySelectorAll(h);for(var i=0;i.slide-group");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},o=function(){var a=c.style.webkitTransform.match(/translate3d\(([^,]*)/),b=a?a[1]:0;return parseInt(b,10)},p=function(a){var b=a?0>d?"ceil":"floor":"round";k=Math[b](o()/(m/c.children.length)),k+=a,k=Math.min(k,0),k=Math.max(-(c.children.length-1),k)},q=function(f){if(c=n(f.target)){var k=c.querySelector(".slide");m=k.offsetWidth*c.children.length,l=void 0,j=c.offsetWidth,i=1,g=-(c.children.length-1),h=+new Date,a=f.touches[0].pageX,b=f.touches[0].pageY,d=0,e=0,p(0),c.style["-webkit-transition-duration"]=0}},r=function(h){h.touches.length>1||!c||(d=h.touches[0].pageX-a,e=h.touches[0].pageY-b,a=h.touches[0].pageX,b=h.touches[0].pageY,"undefined"==typeof l&&(l=Math.abs(e)>Math.abs(d)),l||(f=d/i+o(),h.preventDefault(),i=0===k&&d>0?a/j+1.25:k===g&&0>d?Math.abs(a)/j+1.25:1,c.style.webkitTransform="translate3d("+f+"px,0,0)"))},s=function(a){c&&!l&&(p(+new Date-h<1e3&&Math.abs(d)>15?0>d?-1:1:0),f=k*j,c.style["-webkit-transition-duration"]=".2s",c.style.webkitTransform="translate3d("+f+"px,0,0)",a=new CustomEvent("slide",{detail:{slideNumber:Math.abs(k)},bubbles:!0,cancelable:!0}),c.parentNode.dispatchEvent(a))};window.addEventListener("touchstart",q),window.addEventListener("touchmove",r),window.addEventListener("touchend",s)}(),!function(){"use strict";var a={},b=!1,c=!1,d=!1,e=function(a){for(var b,c=document.querySelectorAll(".toggle");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a};window.addEventListener("touchstart",function(c){if(c=c.originalEvent||c,d=e(c.target)){var f=d.querySelector(".toggle-handle"),g=d.clientWidth,h=f.clientWidth,i=d.classList.contains("active")?g-h:0;a={pageX:c.touches[0].pageX-i,pageY:c.touches[0].pageY},b=!1}}),window.addEventListener("touchmove",function(e){if(e=e.originalEvent||e,!(e.touches.length>1)&&d){var f=d.querySelector(".toggle-handle"),g=e.touches[0],h=d.clientWidth,i=f.clientWidth,j=h-i;if(b=!0,c=g.pageX-a.pageX,!(Math.abs(c) c)return f.style.webkitTransform="translate3d(0,0,0)";if(c>j)return f.style.webkitTransform="translate3d("+j+"px,0,0)";f.style.webkitTransform="translate3d("+c+"px,0,0)",d.classList[c>h/2-i/2?"add":"remove"]("active")}}}),window.addEventListener("touchend",function(a){if(d){var e=d.querySelector(".toggle-handle"),f=d.clientWidth,g=e.clientWidth,h=f-g,i=!b&&!d.classList.contains("active")||b&&c>f/2-g/2;e.style.webkitTransform=i?"translate3d("+h+"px,0,0)":"translate3d(0,0,0)",d.classList[i?"add":"remove"]("active"),a=new CustomEvent("toggle",{detail:{isActive:i},bubbles:!0,cancelable:!0}),d.dispatchEvent(a),b=!1,d=!1}})}(); \ No newline at end of file diff --git a/examples/app-android-notes/css/app.css b/examples/app-android-notes/css/app.css new file mode 100644 index 0000000..fd8cd5d --- /dev/null +++ b/examples/app-android-notes/css/app.css @@ -0,0 +1,5 @@ +.slider, +.slider img { + margin-bottom: 0; + height: 150px; +} diff --git a/examples/app-android-notes/index.html b/examples/app-android-notes/index.html new file mode 100644 index 0000000..7d6473e --- /dev/null +++ b/examples/app-android-notes/index.html @@ -0,0 +1,146 @@ + + + + + Notes + + + + + + + + + + + + + ++ + + + ++ + Notes + +
+ ++ ++ + + + + + + + diff --git a/examples/app-ios-mail/css/app.css b/examples/app-ios-mail/css/app.css new file mode 100644 index 0000000..dc7532a --- /dev/null +++ b/examples/app-ios-mail/css/app.css @@ -0,0 +1,12 @@ +.updated-text { + position: absolute; + left: 0; + right: 0; + padding: 10px 0; + font-size: 11px; + text-align: center; +} + +.table-view-cell .icon { + color: #007aff; +} diff --git a/examples/app-ios-mail/inbox.html b/examples/app-ios-mail/inbox.html new file mode 100644 index 0000000..bae2bfa --- /dev/null +++ b/examples/app-ios-mail/inbox.html @@ -0,0 +1,118 @@ + + + + ++
+- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ +- + + Note title goes here +
+Lorem ipsum dolor sit amet...
+ ++ + + + +All inboxes
++ ++ + diff --git a/examples/app-ios-mail/index.html b/examples/app-ios-mail/index.html new file mode 100644 index 0000000..f6f5252 --- /dev/null +++ b/examples/app-ios-mail/index.html @@ -0,0 +1,98 @@ + + + + ++
+- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ +- + + Email subject line here +
+Lorem ipsum dolor sit amet...
+ ++ + + + + +Mailboxes
++ ++ + ++
+ +- + + +
++ All inboxes ++ +- + + +
++ Personal email ++ +- + + +
++ Starred ++ +- + + +
++ Trash ++ +Other accounts
++
+- + + +
++ Misc ++ +++ + diff --git a/examples/app-movies/choose-theater.html b/examples/app-movies/choose-theater.html new file mode 100644 index 0000000..f6a943a --- /dev/null +++ b/examples/app-movies/choose-theater.html @@ -0,0 +1,85 @@ + + + + ++ + Send + + + Cancel + + + +New message
++ ++Movie finder + + + + + + + + + ++ + + Back + + + + + +Argo
+++ + diff --git a/examples/app-movies/css/app.css b/examples/app-movies/css/app.css new file mode 100644 index 0000000..a505979 --- /dev/null +++ b/examples/app-movies/css/app.css @@ -0,0 +1,10 @@ +.slider { + margin-bottom: 0; +} +.slider img { + width: auto; + height: 150px; +} +.content-padded { + margin: 30px 15px 15px; +} diff --git a/examples/app-movies/img/argo.png b/examples/app-movies/img/argo.png new file mode 100644 index 0000000..fca956f Binary files /dev/null and b/examples/app-movies/img/argo.png differ diff --git a/examples/app-movies/img/ralph.png b/examples/app-movies/img/ralph.png new file mode 100644 index 0000000..a7bb34b Binary files /dev/null and b/examples/app-movies/img/ralph.png differ diff --git a/examples/app-movies/img/skyfall.png b/examples/app-movies/img/skyfall.png new file mode 100644 index 0000000..60b90ea Binary files /dev/null and b/examples/app-movies/img/skyfall.png differ diff --git a/examples/app-movies/index.html b/examples/app-movies/index.html new file mode 100644 index 0000000..0f459fe --- /dev/null +++ b/examples/app-movies/index.html @@ -0,0 +1,170 @@ + + + + ++
+- Theaters nearby
+- + Metreon 16 +
+1.3 miles away
+ Buy Tickets +- + AMC 5 +
+3.5 miles away
+ Buy Tickets +- + Regal 42 +
+7.3 miles away
+ Buy Tickets +- + Shorline theater +
+12.5 miles away
+ Buy Tickets +- + AMC 16 +
+12.2 miles away
+ Buy Tickets +- + BW3 16 +
+13.4 miles away
+ Buy Tickets +- + MC Hammer 16 +
+14.1 miles away
+ Buy Tickets +- + AMC 3 +
+14.3 miles away
+ Buy Tickets +- + AMC 2 +
+14.7 miles away
+ Buy Tickets +- + AMC 10 +
+15 miles away
+ Buy Tickets +Movie finder + + + + + + + + + ++ + + + + +Movie finder
++ ++ + + + ++
+- Recommended movies
+- + + +
++ Argo ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Skyfall: 007 ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Wreck-it Ralph ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Argo ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Skyfall: 007 ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Wreck-it Ralph ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Argo ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Skyfall: 007 ++ +Lorem ipsum dolor sit amet, consectetur.
+- + + +
++ Wreck-it Ralph ++ +Lorem ipsum dolor sit amet, consectetur.
+++ + diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..5d76d92 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,176 @@ + + + + + ++ + + +Settings
++ + ++App settings
+ ++
+- + +
++ Enable sounds +++ ++- + +
++ Parental controls +++ +++ ++Examples · Ratchet + + + + + + + + + + + + + + + + + + + + + +++ ++ + ++++++ Ratchet +
+ +++++Examples
+Take a look at some of these example apps built on Ratchet.
++ +++ + + diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..6777ee1 Binary files /dev/null and b/favicon.ico differ diff --git a/getting-started/index.html b/getting-started/index.html new file mode 100644 index 0000000..9d9d4fa --- /dev/null +++ b/getting-started/index.html @@ -0,0 +1,304 @@ + + + + + +++ ++ ++ +Checkout out the examples on a desktop browser or visit on your mobile device see the apps as intended.
+ + +++++ + + +Ratchet
+Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.
+ Download Ratchet +Currently v2.0.1
++ ++ + + + + + + + + +Getting started · Ratchet + + + + + + + + + + + + + + + + + + + + + +++ ++ + ++++++ Ratchet +
+ +++++Getting started
+Once you've downloaded Ratchet, here's what to do next.
++ +++ + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..aeeab42 --- /dev/null +++ b/index.html @@ -0,0 +1,122 @@ + + + + + +++ +++ +++ +Quick start
+Quickly get up and running with a Ratchet app.
+ +1. Create your pages
+Use the documentation as a reference for all the available components and piece together the pages of your app. Be sure to look at the basic page template and example applications. Make sure to add
+ +ratchet-theme-ios.css
orratchet-theme-android.css
to your app's<head>
if you have a specific platform in mind.2. Connect pages with push.js
+Read about push.js then start connecting your pages. Push.js allows you to create a app that feels like a real app when you save it to your phone. (Need to have a server running).
+ +3. Save the app to your phone
+There are a few ways to do this, but the simplest is to run a local server on your computer, point Safari on your iPhone to your computer, then click the button and "Add to Home Screen". For Android, check out this guide.
+++ + + +What's included
+Ratchet is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.
+ +Precompiled Ratchet
+Once downloaded, unzip the compressed folder to see the structure of (the compiled) Ratchet. You'll see something like this:
+ ++ +ratchet/ +├── css/ +│ ├── ratchet.css +│ ├── ratchet.min.css +│ ├── ratchet-theme-android.css +│ ├── ratchet-theme-android.min.css +│ ├── ratchet-theme-ios.css +│ ├── ratchet-theme-ios.min.css +├── js/ +│ ├── ratchet.js +│ └── ratchet.min.js +└── fonts/ + ├── ratchicons.eot + ├── ratchicons.svg + ├── ratchicons.ttf + └── ratchicons.woff +
This is the most basic form of Ratchet: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (
+ +ratchet.*
), as well as compiled and minified CSS and JS (ratchet.min.*
). The Ratchicon fonts are included, as are the Android and iOS platform themes.Ratchet source code
+The Ratchet source code download includes the precompiled CSS, JavaScript, and font assets, along with source Sass, JavaScript, and documentation. More specifically, it includes the following and more:
++ +ratchet/ +├── sass/ +├── js/ +├── fonts/ +├── dist/ +│ ├── css/ +│ ├── js/ +│ └── fonts/ +└── docs/ + └── examples/ +
The
+sass/
,js/
, andfonts/
are the source code for our CSS, JS, and icon fonts (respectively). Thedist/
folder includes everything listed in the precompiled download section above. Thedocs/
folder includes the source code for our documentation, andexamples/
of Ratchet usage. Beyond that, any other included file provides support for packages, license information, and development.++ + + +Page setup
+Three simple rules for structuring your Ratchet pages
+1. Fixed bars come first
+All fixed bars (
+ +.bar
) should always be the first thing in the<body>
of the page. This is really important!2. Everything else goes in
+.content
Anything that's not a
+ +.bar
should be put in a div with the class.content
. Put this div after the bars in the<body>
tag. The.content
div is what actually scrolls in a Ratchet prototype.3. Don't forget your meta tags
+They're included in the template.html page included in the download, but make sure they stay in the page. They are important to Ratchet working just right.
+++ + + +Basic template
+Use this basic template to get your app started.
++<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Ratchet template page</title> + + <!-- Sets initial viewport load and disables zooming --> + <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> + + <!-- Makes your prototype chrome-less once bookmarked to your phone's home screen --> + <meta name="apple-mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-status-bar-style" content="black"> + + <!-- Include the compiled Ratchet CSS --> + <link href="ratchet.css" rel="stylesheet"> + + <!-- Include the compiled Ratchet JS --> + <script src="ratchet.js"></script> + </head> + <body> + + <!-- Make sure all your bars are the first things in your <body> --> + <header class="bar bar-nav"> + <h1 class="title">Ratchet</h1> + </header> + + <!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) --> + <div class="content"> + <p class="content-padded">Thanks for downloading Ratchet. This is an example HTML page that's linked up to compiled Ratchet CSS and JS, has the proper meta tags and the HTML structure. Need some more help before you start filling this with your own content? Check out some Ratchet resources:</p> + <div class="card"> + <ul class="table-view"> + <li class="table-view-cell"> + <a class="push-right" href="http://goratchet.com"> + <strong>Ratchet documentation</strong> + </a> + </li> + <li class="table-view-cell"> + <a class="push-right" href="https://github.com/twbs/ratchet/"> + <strong>Ratchet on Github</strong> + </a> + </li> + <li class="table-view-cell"> + <a class="push-right" href="https://groups.google.com/forum/#!forum/goratchet"> + <strong>Ratchet Google group</strong> + </a> + </li> + <li class="table-view-cell"> + <a class="push-right" href="https://twitter.com/goratchet"> + <strong>Ratchet on Twitter</strong> + </a> + </li> + </ul> + </div> + </div> + + </body> +</html> +
++Community
+Stay up to date on the development of Ratchet and reach out to the community with these helpful resources.
++
+- +
+Read and subscribe to The Official Bootstrap Blog (which includes Ratchet releases and news).
+- +
+For help using Ratchet, ask on StackOverflow using the tag
+ratchet-2
.- +
+Start a discussion on the Ratchet Google group.
+You can also follow @goratchet on Twitter for the latest news.
+++++ + + +Ratchet
+Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.
+ Download Ratchet +Currently v2.0.1
++ ++ + + + + + + + + +Ratchet + + + + + + + + + + + + + + + + + + + + + +++ + + diff --git a/one.html b/one.html new file mode 100644 index 0000000..cc009e5 --- /dev/null +++ b/one.html @@ -0,0 +1,32 @@ + + + + ++ + ++++++ Ratchet +
+ +++ +Build mobile apps with simple HTML‚ CSS‚ and JS components.
+ Download Ratchet +Currently v2.0.1
++++ + + + + + + + + + +Ratchet + + + + + + + + + + + ++ +Push
+++ + diff --git a/template.html b/template.html new file mode 100644 index 0000000..6f854ce --- /dev/null +++ b/template.html @@ -0,0 +1,68 @@ + + + + ++++
+- + + Load new page with push + +
+Ratchet template page + + + + + + + + + + + + + + + + + + + + + ++ + + +Ratchet
+++ + + + + diff --git a/two.html b/two.html new file mode 100644 index 0000000..bed58ea --- /dev/null +++ b/two.html @@ -0,0 +1,31 @@ + + + + +Thanks for downloading Ratchet. This is an example HTML page that's linked up to compiled Ratchet CSS and JS, has the proper meta tags and the HTML structure. Need some more help before you start filling this with your own content? Check out some Ratchet resources:
++++
+- + + Ratchet documentation + +
+- + + Ratchet on Github + +
+- + + Ratchet Google group + +
+- + + Ratchet on Twitter + +
+Ratchet + + + + + + + + + + + ++ + + + +Page two
+