Skip to content

“Made by Friends of Google Fonts” badge for font minisites

License

Notifications You must be signed in to change notification settings

aminalhazwani/friends-badge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Friends of Google Fonts badge

The “Made by Friends of Google Fonts” badge.

Getting started

A hosted version of this script will be available. To add it to your project, add this script tag to your project:

<script src="../build/googlefontsbadge.js" async defer onload="gfBadge()"></script>

This will asynchronously load the badge and initialise it once it’s ready.

Browserify & Webpack

Alternatively, if you are using a build tool like Browserify, Webpack, etc. you can install the badge as a dependency and initialise it yourself. First, you’ll want to install it as a dependency using npm:

npm install --save https://github.com/googlefonts/friends-badge

Then, require it in your project:

var gfBadge = require('@googlefonts/badge')

// Initialise the badge when you are ready
gfBadge()

Contributing

To run the project locally, run the following commands in your terminal:

git clone https://github.com/googlefonts/badge googlefonts-badge
cd googlefonts-badge
npm install

Now you can build the distributed version of the file by running:

npm run build

…which uses Browserify to build a stand-alone minified version of the file.

About

“Made by Friends of Google Fonts” badge for font minisites

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 83.9%
  • JavaScript 16.1%