@dankolz/webhandle-admin-icons

1.0.2 • Public • Published

Webhandle Admin Icons

Some basic support for google's material icon set

clone the source at:

git clone https://github.com/google/material-design-icons/

Documentation at:

https://developers.google.com/fonts/docs/material_icons

Overview of icons at:

https://fonts.google.com/icons?selected=Material+Icons

Install

npm i @dankolz/webhandle-admin-icons

Usage

HTML

Super simple. Just create an element like this.

	<span class="material-icons">face</span>

Build the styles into your stylesheet

The best way is just build the couple styles you need by including the less stylesheet from the package. If you do that, you DO NOT need to do the "load dynamically" steps from below.

Include in your less files like:

@import "../node_modules/@dankolz/webhandle-admin-icons/less/admin-icon-setup";

That should resolve to the global location without duplicates so long as it doesn't install into the the sub package as well.

Dynamically Load the Styles

If you've included the stylesheet as described above you DO NOT need to do this.

These instructions are if you're using this code only by invoking javascript.

On the server side, if you're using webhandle, add the resources like:

const webhandle = require('webhandle')
const iconResources = require('@dankolz/webhandle-admin-icons')
iconResources(webhandle)

On the client side, you can either include the code in a larger build like:

const ensure = require('@dankolz/webhandle-admin-icons')
ensure()

Or with a script tag on page like:

<script src="/@dankolz/webhandle-admin-icons/resources/js/load-styles.js"></script>

Readme

Keywords

none

Package Sidebar

Install

npm i @dankolz/webhandle-admin-icons

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

5.66 kB

Total Files

8

Last publish

Collaborators

  • dankolz