made-with-collection

1.0.7 • Public • Published

Made-With-Collection

Made-with-collection a badge provider based on simple-icons for websites.

Disclaimer

Simple icons provides icons that may include a license, copyright or trademarkes. Before any usage, read the simple-icons disclaimer before using this library.

Preview

Installation

  • You can install it using npm
npm i made-with-collection
  • By downloading the latest release
  • Or using a CDN

Import

Using module import

import MadeWith from "path/to/dist/made-with-module.js";

// Then you can conditionnaly enable it using the 'enable' function
MadeWith.enable();

This method only works using npm or the latest release. If your using an external js file to write the code above, you'll need to add the type="module" when importing the script.

Using a CDN

Simply link the CDN to your html page like this

<script src="https://cdn.jsdelivr.net/npm/made-with-collection@latest/dist/made-with.js"></script>

<!-- Or the minified version -->
<script src="https://cdn.jsdelivr.net/npm/made-with-collection@latest/dist/made-with.min.js"></script>

Usage

First, you need to provide a custom class made-with to detect which element needs to be converted into a made-with badge.

Then, you'll ne provide html data attributs. There are currently 3 parameters available :

  • data-mw-icon
  • data-mw-size
  • data-mw-theme
Attribut Values Default
data-mw-icon Any icon available on simple-icons none
data-mw-size small, medium, large medium
data-mw-theme light, dark light

Examples are provided onto the /test folder.

<div class="made-with" data-mw-icon="[ICON_SLUG]" data-mw-size="medium" data-mw-theme="light"></div>

Hope you like it 👍

Readme

Keywords

Package Sidebar

Install

npm i made-with-collection

Weekly Downloads

0

Version

1.0.7

License

ISC

Unpacked Size

30.8 kB

Total Files

13

Last publish

Collaborators

  • mranyx