Skip to content

MarketingPipeline/GitHub-Buttons-Web-Component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub-Buttons-Web-Component

GitHub Buttons as a web component to show off your stars, followers & more!
Show your support!

Note: contributor & pull request counts etc are currently not accurate. If you are a JavaScript developer & would like to address a fix for this see the to-do

Example and Usage

You can view a demo of the GitHub Buttons web component here

How to use GitHub Buttons:

include this script in your HTML document.

<script src="https://cdn.jsdelivr.net/gh/MarketingPipeline/GitHub-Buttons-Web-Component/version/1.0.0/src/github-buttons-wc.js" defer></script>    

How to show Star Button

<github-button repo="MarketingPipeline/Markdown-Tag"></github-button>

How to show Watch Button

<github-button type="watch" repo="MarketingPipeline/Markdown-Tag"></github-button>

How to show Fork Button

<github-button type="fork" repo="MarketingPipeline/Markdown-Tag"></github-button>

How to show Followers Button

<github-button type="followers" repo="MarketingPipeline"></github-button>

How to show Sponsor Button

<github-button type="sponsor" repo="MarketingPipeline"></github-button>

How to show Pull Requests Button

<github-button type="pulls" repo="MarketingPipeline/Markdown-Tag"></github-button>

How to show Issues Button

<github-button type="issues" repo="MarketingPipeline/Markdown-Tag"></github-button>

How to show Custom Button

<github-button type="custom" text="My super awesome custom button"></github-button>

Options

Attribute Meaning Default Required
repo Your GitHub username + repo or GitHub Profile (Not Required For Custom Button) Undefined Yes
type The type of button to show Star Count No
icon The icon to use in the button GitHub Icon No
href The href / link for the button Defined by Type No
new-window If True, button link will open in a new window False No
text Text to show (Custom Button's Have No Default Text) Defined by Type No

Contributing GitHub

Want to improve this? Create a pull request with detailed changes / improvements! If approved you will be added to the list of contributors of this awesome project!

See also the list of contributors who participate in this project.

License GitHub

This project is licensed under the MIT License - see the LICENSE.md file for details.