Giter Site home page Giter Site logo

rapsssito / github-profile-badge Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 3.0 64 KB

A widget to display your GitHub profile embedded in any website.

License: MIT License

JavaScript 59.17% HTML 40.83%
website badge widget github profile account github-profile

github-profile-badge's Introduction

GitHub Profile Badge / Widget

A widget to display your GitHub profile embedded in any website. This widget retrieves data from your GitHub profile and shows it up directly on your website. It is written in pure JavaScript and does not rely on external fonts or dependencies.

Check out the live example.

Usage

You can include the widget.js script and it will create the widget for you:

<div class="github-profile-badge" data-user="rapsssito"></div>
<script src="https://cdn.jsdelivr.net/gh/Rapsssito/github-profile-badge@latest/src/widget.min.js"></script>

Attributes

Attribute Type Description
data-user <string> Required. GitHub username.

Customization

The widget is customizable via pure CSS (you might need to use !important on some attributes depending on your setup). Here is the list of classes used inside the widget:

  • github-profile-badge: <div> main container.
  • github-profile-badge-wrapper: <a> links to the GitHub account and acts as a global container.
    • github-profile-badge-img-wrapper: <div> wraps all the images (account and GitHub logo).
      • github-profile-badge-img: <img> displays the user profile picture.
      • github-profile-badge-logo: <img> displays the GitHub logo.
    • github-profile-badge-name-wrapper: <div> wraps and shows/hides the username.
      • github-profile-badge-name: <p> displays the username.

License

The library is released under the MIT license. For more information see LICENSE.

github-profile-badge's People

Contributors

rapsssito avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

github-profile-badge's Issues

Lack of explicit box-sizing causes the badge to be the wrong size

I had * { box-sizing: border-box;} in the css of my page, and for whatever reason this leads to the hover width being miscalculated and too short to reveal the entire username.
Turns out I have no idea why that was in my css so I've removed it, but it seems like something that should be set explicitly to whatever the default value is rather than being at the whim of whatever is in the global css?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.