Skip to content

Commit

Permalink
Cleanup, docs and added GH buttons for fun
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennemarais committed Jan 8, 2018
1 parent f9aa4f2 commit 78a2732
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 3 deletions.
2 changes: 2 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
</noscript>
<!-- Scripts -->
<script src="js/index.js"></script>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>
6 changes: 5 additions & 1 deletion demo/js/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@
</div>
<div class="column is-1">&nbsp;</div>
</div>
<div class="columns"><div class="column is-full">&nbsp;</div></div>
<div class="columns">
<div class="column is-full">&nbsp;</div>
<div class="column is-full has-text-centered">
<a class="github-button" href="https://github.com/etiennemarais/vue-monograms/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork etiennemarais/vue-monograms on GitHub">Fork</a>
<a class="github-button" href="https://github.com/etiennemarais/vue-monograms" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star etiennemarais/vue-monograms on GitHub">Star</a>
</div>
</div>
<div class="columns">
<div class="column is-full">
Expand Down
1 change: 0 additions & 1 deletion demo/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ if (process.env.NODE_ENV === 'development') {
* Application bootstrap
*/
import App from './App';
// import Monogram from '../../src/js';
import Monogram from '../..';
Vue.component('monogram', Monogram);

Expand Down
2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
</noscript>
<!-- Scripts -->
<script src="js/index.js"></script>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/js/index.js

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# Vue Monograms

Vue Component to generate a SVG monogram shape with letters in that resembles your first/last name.

### Supports

- [x] Hexagons (Plain)
- [ ] Hexagons (With internal patterns)
- [ ] Rectangles (Plain or with internal patterns)
- [ ] Circles (Plain or with internal patterns)
- [ ] Octagons (Plain or with internal patterns)

## Installation

You can include this plugin into your application by installing this package via `yarn`

```sh
yarn add vue-monograms
```

## Usage

Register the component in your `App.vue`.

```vue
import Monogram from 'vue-monograms';
Vue.component('monogram', Monogram);
```

You will be able to use this component throughout your application.

```
<template>
...
<monogram width="80" letters="XB" :primary-color="'#00a8e8'" />
...
</template>
```

# Properties

## `width`

The width attribute is required to calculate the sides and points coordinates of the hexagon, calculated in pixels as a number value.

## `letters`

The letters provide the reference to a name/surname, but can be any string.

## `primary-color`

Primary background color fill for the shape. Identified as a string hex color value ex: `'#00a8e8'`

0 comments on commit 78a2732

Please sign in to comment.