Skip to content

Commit

Permalink
fix links in readme, added Installation doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Allien committed Nov 25, 2018
1 parent 82a0ed7 commit b95c0c5
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![Build Status](https://travis-ci.org/AllienWorks/cryptocoins.svg?branch=master)](https://travis-ci.org/AllienWorks/cryptocoins)
[![npm version](https://badge.fury.io/js/cryptocoins-icons.svg)](https://badge.fury.io/js/cryptocoins-icons)
[![jsDelivr hits/month](https://data.jsdelivr.com/v1/package/npm/cryptocoins-icons/badge)](https://www.jsdelivr.com/package/npm/cryptocoins-icons)

Available in webfont & SVG format for taking advantage of small file sizes and unlimited scalability, Cryptocoins are perfect for usage on the web – right where they belong. Use them all or just the ones you need.

Expand All @@ -23,9 +24,9 @@ There are many ways/formats how to use Cryptocoins. The fastest and recommended

* **[via SVG](https://github.com/allienworks/cryptocoins/wiki/SVG-version)** `recommended` – when you need just a few icons in your project
* [Webfont version](https://github.com/allienworks/cryptocoins/wiki/Webfont-version) – ideal when you want to include all icons at once
- _Pro tip:_ [Learn how to generate icon webfonts](https://allien.work/blog/howto-generate-icon-webfont) – it's even better when you only include those you really need
- _Pro tip:_ [Learn how to generate icon webfonts](https://allien.work/dev-design/2017/01/03/how-to-generate-icon-webfont/) – it's even better when you only include those you really need
* NPM package – `npm i cryptocoins-icons`
* Both [svg icons](https://www.jsdelivr.com/package/npm/cryptocoins-icons?path=SVG) and [the webfont](https://www.jsdelivr.com/package/npm/cryptocoins-icons?path=webfont) are also available on [jsDelivr CDN](https://www.jsdelivr.com/package/npm/cryptocoins-icons)
* Both [SVG icons](https://www.jsdelivr.com/package/npm/cryptocoins-icons?path=SVG) and [the webfont](https://www.jsdelivr.com/package/npm/cryptocoins-icons?path=webfont) are also available on [jsDelivr CDN](https://www.jsdelivr.com/package/npm/cryptocoins-icons)

#### 3rd party Packages

Expand All @@ -43,7 +44,7 @@ Initial release contains just a fraction of Altcoins. If you're missing your coi
3. _(optional)_ you can include HEX code of the main color used in coin's branding and bitcointalk thread link (not mandatory, but saves me time)
4. (optional) you can notify me on [@AllienWorks](https://twitter.com/AllienWorks) Twitter (also, helps spreading the word)

**This is all completely voluntary work**, so if you want to support my efforts _or_ speed up the addition of your coin, [please donate](https://allien.work/donate). Donation addresses are found below (if you don't see your coin, let me know and I'll send the address afterwards).
**This is all completely voluntary work**, so if you want to support my efforts _or_ speed up the addition of your coin, [please donate](https://allien.work/about.html#donate). Donation addresses are found below (if you don't see your coin, let me know and I'll send the address afterwards).


## For Contributors
Expand All @@ -59,7 +60,7 @@ Please see [Contributing guidelines](CONTRIBUTING.md) before submitting your PRs
* Keybase/contact: [martin_allien](https://keybase.io/martin_allien)
* Twitter: [@AllienWorks](https://twitter.com/AllienWorks)

> [Tip me crypto](https://allien.work/donate) and **support further development**!
> [Tip me crypto](https://allien.work/about.html#donate) and **support further development**!

## Updates
Expand Down
78 changes: 78 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Installation

Available install options:

- [npm](#npm)
- [SVG icons](#svg-icons)
- [Webfont version](#webfont-version)
- [CDN](#CDN)

## npm

Install [Cryptocoins NPM package](https://www.npmjs.com/package/cryptocoins-icons):

```
$ npm i cryptocoins-icons
```

---


## SVG icons

SVG is better option, if you want to use just a few icons (including whole webfont would be data-inefficient. Find the icons you need in "SVG" folder and copy them to your project. Then use them as regular images:

``` html
<img src="img/BTC.svg" alt="Bitcoin">
```

**Tip:** You can also open each SVG icon in text editor and copy its contents directly into HTML, resulting in fewer HTTP requests and ability to style icons direcly via CSS. There are also [many scripts](http://stackoverflow.com/questions/11978995/how-to-change-color-of-svg-image-using-css-jquery-svg-image-replacement) that do the same automatically – your choice.

When extracted to HTML directly, you can style the icons via CSS like this:

> Note: be sure to use SVG's "fill" property instead of "color".
```
.btc { fill: black; }
.btc:hover { fill: orange; }
```

You can also include `cryptocoins-color.css` which contains all the coins' main colors. This stylesheet colors all the icons via `fill` by default, so edit it as you please.

---


## Webfont version

Ideal when you want to include all icons at once.

> Pro tip: if you want to load icons efficiently (only those you need), [generate the webfont yourself](https://allien.work/blog/howto-generate-icon-webfont)
First clone or download [Cryptocoins](https://github.com/AllienWorks/cryptocoins) and extract its contents.

Webfont is ideal when you want to use majority of Cryptocoins icons. Copy `webfont/` folder to your project and link `cryptocoins.css` in your project (you can optionally include also `cryptocoins-colors.css` if you want to use predefined colors):

``` html
<!-- CSS defining icons (required) -->
<link rel="stylesheet" href="webfont/cryptocoins.css">

<!-- CSS defining icon/coin colors (optional) -->
<link rel="stylesheet" href="webfont/cryptocoins-colors.css">
```

Then insert your icons in HTML, e.g.:

> Cryptocoins targets any element with `cc` class. You can use `<i>`, `<div>` or whatever you want.
``` html
<i class="cc BTC"></i>
```

If you're familiar with Font Awesome, it's pretty much the same.

---


## CDN

Cryptocoins are also hosted on [jsDelivr CDN](https://www.jsdelivr.com/package/npm/cryptocoins-icons).

0 comments on commit b95c0c5

Please sign in to comment.