Giter Site home page Giter Site logo

twbs / ratchet Goto Github PK

View Code? Open in Web Editor NEW
14.6K 14.6K 1.4K 16.11 MB

Build mobile apps with simple HTML, CSS, and JavaScript components.

Home Page: http://goratchet.com

License: MIT License

CSS 63.25% JavaScript 35.91% HTML 0.84%
css html javascript ratchet

ratchet's Introduction

GitHub Release Build Status devDependency Status

Build mobile apps with simple HTML, CSS, and JS components.

Table of contents

Getting started

  • Clone the repo with git clone https://github.com/twbs/ratchet.git or just download the bundled CSS and JS
  • Read the docs to learn about the components and how to get a prototype on your phone
  • Check out examples

Take note that our master branch is our active, unstable development branch and that if you're looking to download a stable copy of the repo, check the tagged downloads.

What's included

Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. 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

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 optional Android and iOS platform themes.

Documentation

Ratchet's documentation is built with Jekyll and publicly hosted on GitHub Pages at http://goratchet.com. The docs may also be run locally.

Running documentation locally

  1. If necessary, install Jekyll (requires v3.0.x).
  1. Install the Ruby-based syntax highlighter, Rouge, with gem install rouge.
  2. From the root /ratchet directory, run jekyll serve in the command line.
  3. Open http://localhost:4000 in your browser, and boom!

Learn more about using Jekyll by reading its documentation.

Documentation for previous releases

Documentation for v1.0.2 has been made available for the time being at http://goratchet.com/1.0.2/ while folks transition to Ratchet 2.

Previous releases and their documentation are also available for download.

Support

Questions or discussions about Ratchet should happen in the Google group or hit us up on Twitter @GoRatchet.

Contributing

Please file a GitHub issue to report a bug. When reporting a bug, be sure to follow the contributor guidelines.

Troubleshooting

A small list of "gotchas" is provided below for designers and developers starting to work with Ratchet.

  • Ratchet is designed to respond to touch events from a mobile device. In order to use mouse click events (for desktop browsing and testing), you have a few options:
    • Enable touch event emulation in Chrome (found in the overrides tab in the web inspector preferences)
    • Use a JavaScript library like fingerblast.js to emulate touch events (ideally only loaded from desktop devices)
  • Script tags containing JavaScript will not be executed on pages that are loaded with push.js. If you would like to attach event handlers to elements on other pages, document-level event delegation is a common solution.
  • Ratchet uses XHR requests to fetch additional pages inside the application. Due to security concerns, modern browsers prevent XHR requests when opening files locally (aka using the file:// protocol); consequently, Ratchet does not work when opened directly as a file.
    • A common solution to this is to simply serve the files from a local server. One convenient way to achieve this is to run python -m SimpleHTTPServer <port> to serve up the files in the current directory to http://localhost:<port>

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Ratchet is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to these rules whenever possible.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major while resetting minor and patch
  • New additions without breaking backward compatibility bumps the minor while resetting the patch
  • Bug fixes and misc changes bumps only the patch

For more information on SemVer, please visit http://semver.org/.

Maintainers

Connor Sears

Created by Connor Sears, Dave Gamache, and Jacob Thornton.

License

Ratchet is licensed under the MIT License.

ratchet's People

Contributors

achalv avatar airtonix avatar alecrust avatar artemave avatar benschwarz avatar coliff avatar connors avatar cvrebert avatar dhg avatar fat avatar fidransky avatar guilhermepontes avatar iamnirav avatar jaunesarmiento avatar johann-s avatar juthilo avatar kmulvey avatar mdo avatar medokin avatar optikalefx avatar pcottle avatar rishabhjain96 avatar ryanmillerdev avatar ryanstewart avatar sjonnet19 avatar vsn4ik avatar watilde avatar wibron avatar xhmikosr avatar zlatanvasovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ratchet's Issues

Push.js not working for me

@connors and I fiddled with this and couldn't get it to work with the minified JS. Could just be in scrub mode, but we're going to move on to other bugs and chat with @fat about this later.

Ratchet Performance

we're using [foo*='bar'] quite a bit, and these selectors are really expensive. (they're actually the most expensive selector you can run)

Also, CSS evals from right to left (you probably know that) – so doing things like this doesn't actually scope the selector (perf wise makes them even more expensive):

.list [class*="button"]

The above is still running a universal selector * on the entire dom, then checking all attributes for class, then running an expensive regex on each class attr. Then, after it's done that, it checks the dom for list elements, and see's if any of the initial matched elements have a list parent.

I only bring this up because in the sample app i'm building rendering (on the phone) seems a little jank. Also (even without js) the scroll is horrible (though that may be unrelated).

At anyrate, i think we should talk a look at css perf and see if there is anything we can do to improve it.

Also, I remember connor pointing out the other night that the slide.js perf on his phone was a little jank – which is something we should look at in the js.

font-size: 0 on slider

font-size: 0 on slider causes all children to have font-size 0 – and thus all slider content fontsize 0.

should probably fix that.

Allow push.js to work on any element

Not just <a> tags, but on anything by defining the href instead with a data attribute. This should actually be the default since there are tons of locations that aren't <a>'s that I would want to fire pushes (I think).

Write a real README

Include links to all resources, docs, etc and how to get started. Also how to launch project on phone <3

Toggles in lists are jumpy

Toggles in lists have a huge delay in changing the :before/after content. This means the .toggle-handle animates, but then the active class isn't applied at the right time, but entirely after the animation?

Oddly enough, last children of a list don't have this issue though...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.