Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoporto committed Feb 16, 2017
1 parent db2a2eb commit d03ccc7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
[![devDependencies Status](https://david-dm.org/tiagoporto/accessibility-buttons/dev-status.svg)](https://david-dm.org/tiagoporto/accessibility-buttons?type=dev)
[![NPM Downloads](https://img.shields.io/npm/dt/accessibility-buttons.svg)](https://www.npmjs.com/package/accessibility-buttons)
[![Github Release](https://img.shields.io/github/release/tiagoporto/accessibility-buttons.svg)](https://github.com/tiagoporto/accessibility-buttons/releases)
[![Github Issues](https://img.shields.io/github/issues/tiagoporto/accessibility-buttons.svg)](https://github.com/tiagoporto/accessibility-buttons/issues)
[![Github License](https://img.shields.io/github/license/tiagoporto/accessibility-buttons.svg)](https://raw.githubusercontent.com/tiagoporto/accessibility-buttons/master/LICENSE.md)

Buttons to add/remove contrast and increase/decrease font size.

<p align="right">
<img src="http://icons.iconarchive.com/icons/icons8/christmas-flat-color/256/star-icon.png" alt="Star" height="25"><img src="http://icons.iconarchive.com/icons/icons8/christmas-flat-color/256/star-icon.png" alt="Star" height="25"><img src="http://icons.iconarchive.com/icons/icons8/christmas-flat-color/256/star-icon.png" alt="Star" height="25"><br>
<code>LIKE ? Leave a <a href="https://github.com/tiagoporto/accessibility-buttons">Star</a> : Make a DEV sad</code>
</p>


## Table of Contents

* [Usage](#usage)
Expand All @@ -19,20 +24,19 @@ Buttons to add/remove contrast and increase/decrease font size.

## Usage

###Download with [NPM](https://npmjs.com)
Download with [NPM](https://npmjs.com)

```sh
$ bower install accessibility-buttons --save
$ npm install accessibility-buttons --save
```

###Download with [Bower](http://bower.io/)
Or download with [Bower](http://bower.io/)

```sh
$ bower install accessibility-buttons --save
```


###Include the Files
Include the Files

```html
<link rel="stylesheet" href="node_modules/accessibility-buttons/dist/css/accessibility-buttons.css">
Expand All @@ -42,22 +46,40 @@ Buttons to add/remove contrast and increase/decrease font size.
```


###Insert the Buttons
Insert the Buttons

```html
<button aria-label="Increase Font" id="accessibility-font" class="js-acessibility">+A</button>
<button aria-label="Add Contrast" id="accessibility-contrast" class="js-acessibility">Add Contrast</button>
```

**Note:** To get `font-size` to work, it's necessary to use `em` or `rem` units.

Initialize the Plugin after the dom ready

###Initialize the Plugin
If you don't use jQuery (support IE9+)
```js
function ready(fn) {
if (document.readyState !== 'loading') {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}

ready(function() {
accessibilityButtons();
});
```

If you use jQuery
```js
$(document).ready(function() {
accessibilityButtons();
})
```

**Note:** To get `font-size` to work, it's necessary to use `em` or `rem` units.

# Settings

To set up button names and aria-labels, call the plugin with additional options as shown below:
Expand Down
8 changes: 4 additions & 4 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ <h2>Usage</h2>

<p>Download with <a href="https://npmjs.com">NPM</a></p>

<code><pre>bower install accessibility-buttons --save</pre></code>
<code><pre>npm install accessibility-buttons --save</pre></code>


<p>Download with <a href="http://bower.io">Bower</a></p>
<p>Or download with <a href="http://bower.io">Bower</a></p>

<code><pre>bower install accessibility-buttons --save</pre></code>

Expand Down Expand Up @@ -164,10 +164,10 @@ <h2>Settings</h2>
Copyright © 2014 - <span id="year"></span> Tiago Porto
</footer>

<!-- build:js js/scripts.combined.min.js -->
<!-- build:js js/demo.js -->
<script src="js/accessibility-buttons.js"></script>
<script src="js/vendors.js"></script>
<script src="js/scripts.js"></script>
<script src="js/vendors.js"></script>
<!-- endbuild -->

<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/handlebars/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ <h2>Usage</h2>

<p>Download with <a href="https://npmjs.com">NPM</a></p>

<code><pre>bower install accessibility-buttons --save</pre></code>
<code><pre>npm install accessibility-buttons --save</pre></code>


<p>Download with <a href="http://bower.io">Bower</a></p>
<p>Or download with <a href="http://bower.io">Bower</a></p>

<code><pre>bower install accessibility-buttons --save</pre></code>

Expand Down

0 comments on commit d03ccc7

Please sign in to comment.