Browse Source

refactor all the things, switch to open sans

pull/359/head
Mark Otto 11 years ago
parent
commit
3ec0991776
  1. 2
      docs/_includes/header.html
  2. 120
      docs/assets/css/docs.css
  3. 18
      docs/components.html
  4. 80
      docs/getting-started.html
  5. 124
      sass/docs.scss

2
docs/_includes/header.html

@ -9,7 +9,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Google Web Fonts --> <!-- Google Web Fonts -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,500,700|Source+Sans+Pro:300,400,600,700"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,500,700|Open+Sans:300">
<link rel="stylesheet" href="/dist/ratchet.css"> <link rel="stylesheet" href="/dist/ratchet.css">
<link rel="stylesheet" href="/assets/css/docs.css"> <link rel="stylesheet" href="/assets/css/docs.css">

120
docs/assets/css/docs.css

@ -16,13 +16,43 @@ body {
body { body {
position: relative !important; position: relative !important;
font: 14px/1.5 "Source Sans Pro",sans-serif; font: 300 14px/1.5 "Open Sans", sans-serif;
color: #333; color: #333;
background-color: #fff; background-color: #fff;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
} }
.docs-content {
font-size: 14px;
}
@media screen and (min-width: 768px) {
.docs-content {
font-size: 18px;
}
}
.docs-content h1, .docs-content h2, .docs-content h3, .docs-content h4, .docs-content h5, .docs-content h6 {
font-weight: 300;
color: #222;
}
.docs-content h2 {
margin-bottom: .25em;
font-size: 2em;
}
.docs-content h3 {
margin-bottom: .5em;
font-size: 1.25em;
}
.docs-content p {
margin-bottom: 1.5em;
font-size: 1em;
color: #555;
}
.docs-content .lead {
font-size: 1.1em;
color: #777;
}
.docs-header, .docs-header,
.docs-sub-header { .docs-sub-header {
position: relative; position: relative;
@ -289,7 +319,6 @@ body {
max-width: 750px; max-width: 750px;
margin: 0 auto 20px; margin: 0 auto 20px;
font-size: 28px; font-size: 28px;
font-weight: 300;
color: #fff; color: #fff;
line-height: 38px; line-height: 38px;
} }
@ -396,82 +425,12 @@ body {
} }
} }
.docs-section { .docs-section {
padding-top: 80px; margin-bottom: 50px;
padding-bottom: 80px; padding-top: 50px;
} padding-bottom: 50px;
border-bottom: 1px solid #ddd;
.section-heading,
.section-lead {
margin-top: 0;
margin-bottom: 0;
}
.section-heading {
font-size: 22px;
font-weight: 300;
}
.section-lead {
font-size: 18px;
color: #777;
}
@media screen and (min-width: 768px) {
.section-heading {
margin-top: 50px;
margin-bottom: 10px;
font-size: 40px;
}
.section-lead {
font-size: 24px;
}
}
.docs-steps {
margin-top: 20px;
padding: 0;
list-style: none;
}
.step {
padding-top: 30px;
padding-bottom: 30px;
}
.step-title,
.step-description {
font-weight: 300;
}
.step-title {
font-size: 18px;
}
.step-title code {
font-size: 14px;
}
.step-description {
font-size: 14px;
} }
@media screen and (min-width: 768px) {
.step-title {
font-size: 24px;
}
.step-title code {
font-size: 18px;
}
.step-description {
font-size: 18px;
}
.docs-module {
margin-top: 35px;
}
}
.docs-module { .docs-module {
margin-top: 20px; margin-top: 20px;
padding: 20px; padding: 20px;
@ -482,10 +441,6 @@ body {
margin-bottom: 0; margin-bottom: 0;
} }
.docs-module-title {
font-weight: 300;
}
.version { .version {
margin-top: 10px; margin-top: 10px;
margin-bottom: 0; margin-bottom: 0;
@ -620,7 +575,6 @@ body {
} }
.docs-example-group .example-wrap h5 { .docs-example-group .example-wrap h5 {
margin-top: 10px; margin-top: 10px;
font-weight: 300;
} }
.docs-example-group .example-wrap img { .docs-example-group .example-wrap img {
display: block; display: block;
@ -662,14 +616,12 @@ code {
.component-title { .component-title {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 24px; font-size: 24px;
font-weight: 300;
line-height: 34px; line-height: 34px;
} }
.component-description { .component-description {
margin-bottom: 15px; margin-bottom: 15px;
font-size: 16px; font-size: 16px;
font-weight: 300;
} }
.component-example { .component-example {
@ -726,7 +678,6 @@ code {
color: #fff; color: #fff;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
font-weight: 300;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
} }
@ -883,7 +834,6 @@ code {
color: #fff; color: #fff;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
font-weight: 300;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
} }
} }

18
docs/components.html

@ -10,7 +10,7 @@ title: Components &middot; Ratchet
<div class="column units-2"> <div class="column units-2">
<div class="docs-sub-content"> <div class="docs-sub-content">
<h2 class="page-title">Components</h2> <h2 class="page-title">Components</h2>
<p class="page-description">Design patterns that serve as basic building blocks</p> <p class="page-description">Design patterns that serve as basic building blocks.</p>
</div> </div>
</div> </div>
</div> </div>
@ -21,7 +21,7 @@ title: Components &middot; Ratchet
<div class="container"> <div class="container">
<!-- Components --> <!-- Components -->
<div class="docs-components column-group"> <div class="docs-components column-group">
<div class="device-column column units-2 lg-units-5 pull-right"> <div class="device-column column units-2 lg-units-5 pull-right">
<!-- In phone examples --> <!-- In phone examples -->
<div class="device js-device"> <div class="device js-device">
@ -35,7 +35,7 @@ title: Components &middot; Ratchet
</div> </div>
</div> </div>
<div class="column units-2 lg-units-7"> <div class="column units-2 lg-units-7 docs-content">
<!-- Bars --> <!-- Bars -->
<article class="component active" id="bars"> <article class="component active" id="bars">
<h3 class="component-title">Title bar</h3> <h3 class="component-title">Title bar</h3>
@ -1074,7 +1074,7 @@ document
<h3 class="component-title">Popovers</h3> <h3 class="component-title">Popovers</h3>
{% highlight html %} {% highlight html %}
<div id="popover" class="popover"> <div id="popover" class="popover">
<header class="bar bar-nav"> <header class="bar bar-nav">
<h1 class="title">Popover title</h1> <h1 class="title">Popover title</h1>
</header> </header>
@ -1095,7 +1095,7 @@ document
{% highlight html %} {% highlight html %}
<header class="bar bar-nav"> <header class="bar bar-nav">
<a href="#myPopover"> <a href="#myPopover">
<h1 class="title"> <h1 class="title">
Tap title Tap title
<span class="icon icon-caret"></span> <span class="icon icon-caret"></span>
@ -1105,7 +1105,7 @@ document
{% endhighlight %} {% endhighlight %}
</article> </article>
<!-- Modals --> <!-- Modals -->
<article class="component" id="modals"> <article class="component" id="modals">
<h3 class="component-title">Modals</h3> <h3 class="component-title">Modals</h3>
@ -1117,7 +1117,7 @@ document
<a class="icon icon-close pull-right" href="#myModalexample"></a> <a class="icon icon-close pull-right" href="#myModalexample"></a>
<h1 class="title">Modal mobile</h1> <h1 class="title">Modal mobile</h1>
</header> </header>
<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> <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>
</div> </div>
@ -1129,7 +1129,7 @@ document
<a class="icon icon-close pull-right" href="#myModalexample"></a> <a class="icon icon-close pull-right" href="#myModalexample"></a>
<h1 class="title">Modal</h1> <h1 class="title">Modal</h1>
</header> </header>
<div class="content"> <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> <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>
@ -1363,7 +1363,7 @@ window.addEventListener('push', myFunction);
{% endhighlight %} {% endhighlight %}
</article> </article>
<!-- Footer --> <!-- Footer -->
{% include footer.html %} {% include footer.html %}
</div> </div>

80
docs/getting-started.html

@ -20,46 +20,44 @@ title: Getting started &middot; Ratchet
<div class="container"> <div class="container">
<div class="column-group"> <div class="column-group">
<div class="column units-2 lg-units-8"> <div class="column units-2 lg-units-8 docs-content">
<ol class="docs-steps">
<li class="step">
<h3 class="step-title">1. Create your pages</h3>
<p class="step-description">Use the <a href="/components" data-ignore="push">documentation</a> as a reference for all the available components and piece together the pages of your app. Be sure to look at the <a href="#pageLayout">basic page template</a> and <a href="/examples" data-ignore="push">example applications</a>. Make sure to add <code>ratchet-theme-ios.css</code> or <code>ratchet-theme-android.css</code> to your app's <code>&lt;head&gt;</code> if you have a specific platform in mind.</p> <div class="docs-section">
</li> <h2>Quick start</h2>
<li class="step"> <p class="lead">Quickly get up and running with a Ratchet prototype.</p>
<h3 class="step-title">2. Connect pages with push.js</h3>
<p class="step-description">Read about <a href="/components/#push" data-ignore="push">push.js</a> then start connecting your pages. Push.js allows you to create a prototype that feels like a real app when you save it to your phone. (Need to have a server running).</p> <h3>1. Create your pages</h3>
</li> <p>Use the <a href="/components" data-ignore="push">documentation</a> as a reference for all the available components and piece together the pages of your app. Be sure to look at the <a href="#pageLayout">basic page template</a> and <a href="/examples" data-ignore="push">example applications</a>. Make sure to add <code>ratchet-theme-ios.css</code> or <code>ratchet-theme-android.css</code> to your app's <code>&lt;head&gt;</code> if you have a specific platform in mind.</p>
<li class="step">
<h3 class="step-title">3. Save the prototype to your phone</h3> <h3>2. Connect pages with push.js</h3>
<p class="step-description">There are <a href="https://groups.google.com/forum/#!topic/goratchet/IboE6SCMAyw" data-ignore="push">a few ways to do this</a>, but the simplest is to run a local server on your computer, point Safari on your iPhone to your computer, then click the <span class="icon icon-share"></span> button and "Add to Home Screen". For Android, check out <a href="https://developers.google.com/chrome/mobile/docs/installtohomescreen" data-ignore="push">this guide</a>.</p> <p>Read about <a href="/components/#push" data-ignore="push">push.js</a> then start connecting your pages. Push.js allows you to create a prototype that feels like a real app when you save it to your phone. (Need to have a server running).</p>
</li>
</ol> <h3>3. Save the prototype to your phone</h3>
<p>There are <a href="https://groups.google.com/forum/#!topic/goratchet/IboE6SCMAyw" data-ignore="push">a few ways to do this</a>, but the simplest is to run a local server on your computer, point Safari on your iPhone to your computer, then click the <span class="icon icon-share"></span> button and "Add to Home Screen". For Android, check out <a href="https://developers.google.com/chrome/mobile/docs/installtohomescreen" data-ignore="push">this guide</a>.</p>
<hr> </div>
<h2 class="section-heading">Page setup</h2>
<p class="section-lead">Three simple rules for structuring your Ratchet pages</p>
<ol class="docs-steps"> <div class="docs-section">
<li class="step"> <h2>Page setup</h2>
<h3 class="step-title">1. Fixed bars come first</h3> <p class="lead">Three simple rules for structuring your Ratchet pages</p>
<p class="step-description">All fixed bars (<code>.bar</code>) should always be the first thing in the <code>&lt;body&gt;</code> of the page. This is really important!</p> <h3>1. Fixed bars come first</h3>
</li> <p>All fixed bars (<code>.bar</code>) should always be the first thing in the <code>&lt;body&gt;</code> of the page. This is really important!</p>
<li class="step">
<h3 class="step-title">2. Everything else goes in <code>.content</code></h3> <h3>2. Everything else goes in <code>.content</code></h3>
<p class="step-description">Anything that's not a <code>.bar</code> should be put in a div with the class <code>.content</code>. Put this div after the bars in the <code>&lt;body&gt;</code> tag. The <code>.content</code> div is what actually scrolls in a Ratchet prototype.</p> <p>Anything that's not a <code>.bar</code> should be put in a div with the class <code>.content</code>. Put this div after the bars in the <code>&lt;body&gt;</code> tag. The <code>.content</code> div is what actually scrolls in a Ratchet prototype.</p>
</li>
<li class="step"> <h3>3. Don't forget your meta tags</h3>
<h3 class="step-title">3. Don't forget your meta tags</h3> <p>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.</p>
<p class="step-description">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.</p> </div>
</li>
</ol>
<div class="compontent">
<hr> <h2 id="pageLayout">Basic template</h2>
<p class="lead">Use this basic template to get your app started.</p>
<h2 id="pageLayout" class="section-heading">Basic template</h2>
<p class="section-lead">Use this basic template to get your app started.</p>
{% highlight html %} {% highlight html %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -79,7 +77,6 @@ title: Getting started &middot; Ratchet
<!-- Include the compiled Ratchet JS --> <!-- Include the compiled Ratchet JS -->
<script src="ratchet.js"></script> <script src="ratchet.js"></script>
</head> </head>
<body> <body>
@ -120,6 +117,7 @@ title: Getting started &middot; Ratchet
</body> </body>
</html> </html>
{% endhighlight %} {% endhighlight %}
</div>
</div> </div>
<div class="column units-2 lg-units-4"> <div class="column units-2 lg-units-4">

124
sass/docs.scss

@ -14,13 +14,49 @@ body {
} }
body { body {
position: relative !important; // Overrides the fixed positioning of body in Ratchet position: relative !important; // Overrides the fixed positioning of body in Ratchet
font: 14px/1.5 "Source Sans Pro",sans-serif; font: 300 14px/1.5 "Open Sans", sans-serif;
color: #333; color: #333;
background-color: #fff; background-color: #fff;
-webkit-font-smoothing: antialiased; // Fix for webkit rendering -webkit-font-smoothing: antialiased; // Fix for webkit rendering
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
} }
// Typography
//
// Gets scoped to a common class in the docs so we don't collide with any of
// Ratchet's styles.
.docs-content {
font-size: 14px;
@media screen and (min-width: 768px) {
font-size: 18px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 300;
color: #222;
}
h2 {
margin-bottom: .25em;
font-size: 2em;
}
h3 {
margin-bottom: .5em;
font-size: 1.25em;
}
p {
margin-bottom: 1.5em;
font-size: 1em;
color: #555;
}
.lead {
font-size: 1.1em;
color: #777;
}
}
// Jumbotron // Jumbotron
// -------------------------------------------------- // --------------------------------------------------
@ -287,7 +323,6 @@ body {
max-width: 750px; max-width: 750px;
margin: 0 auto 20px; margin: 0 auto 20px;
font-size: 28px; font-size: 28px;
font-weight: 300;
color: #fff; color: #fff;
line-height: 38px; line-height: 38px;
} }
@ -401,79 +436,12 @@ body {
// Content sections // Content sections
// -------------------------------------------------- // --------------------------------------------------
// Wrap each section of the docs
.docs-section { .docs-section {
padding-top: 80px; margin-bottom: 50px;
padding-bottom: 80px; padding-top: 50px;
} padding-bottom: 50px;
.section-heading, border-bottom: 1px solid #ddd;
.section-lead {
margin-top: 0;
margin-bottom: 0;
}
.section-heading {
font-size: 22px;
font-weight: 300;
}
.section-lead {
font-size: 18px;
color: #777;
}
// Desktop: Section headings
@media screen and (min-width: 768px) {
.section-heading {
margin-top: 50px;
margin-bottom: 10px;
font-size: 40px;
}
.section-lead {
font-size: 24px;
}
}
// Steps
// --------------------------------------------------
.docs-steps {
margin-top: 20px;
padding: 0;
list-style: none;
}
.step {
padding-top: 30px;
padding-bottom: 30px;
}
.step-title,
.step-description {
font-weight: 300;
}
.step-title {
font-size: 18px
}
.step-title code {
font-size: 14px;
}
.step-description {
font-size: 14px;
}
// Desktop steps styles
@media screen and (min-width: 768px) {
.step-title {
font-size: 24px;
}
.step-title code {
font-size: 18px;
}
.step-description {
font-size: 18px;
}
// Docs modules
.docs-module {
margin-top: 35px;
}
} }
// Docs modules // Docs modules
@ -487,9 +455,6 @@ body {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.docs-module-title {
font-weight: 300;
}
.version { .version {
margin-top: 10px; margin-top: 10px;
margin-bottom: 0; margin-bottom: 0;
@ -637,7 +602,6 @@ body {
} }
h5 { h5 {
margin-top: 10px; margin-top: 10px;
font-weight: 300;
} }
img { img {
display: block; display: block;
@ -686,13 +650,11 @@ code {
.component-title { .component-title {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 24px; font-size: 24px;
font-weight: 300;
line-height: 34px; line-height: 34px;
} }
.component-description { .component-description {
margin-bottom: 15px; margin-bottom: 15px;
font-size: 16px; font-size: 16px;
font-weight: 300;
} }
.component-example { .component-example {
font-family: $font-family-default; font-family: $font-family-default;
@ -742,7 +704,6 @@ code {
color: #fff; color: #fff;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
font-weight: 300;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
} }
.component-example-fullbleed, .component-example-fullbleed,
@ -910,7 +871,6 @@ code {
color: #fff; color: #fff;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
font-weight: 300;
text-shadow: 0 0 10px rgba(0,0,0,.5); text-shadow: 0 0 10px rgba(0,0,0,.5);
} }
} }

Loading…
Cancel
Save