Socket
Book a DemoInstallSign in
Socket

github-corners

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-corners

Embed script for GitHub Corners.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
64
14.29%
Maintainers
1
Weekly downloads
 
Created
Source

github-corners

NPM

NPM version

Embed script for Tim Holman's Github Corners.

Installation

Include the embed script from the unpkg CDN in your page:

<!-- placed preferably before the closing `<body>` tag -->
<script src="https://unpkg.com/github-corners/dist/embed.min.js"></script>

It's recommended that you specify a version or you may experience breaking changes:

<!-- replace `latest` with a version like `0.1.0` -->
<script src="https://unpkg.com/github-corners@latest/dist/embed.min.js"></script>

Usage

So the GitHub Corner renders on your page. Great! But how do I specify a link?

You can set it using the data-href attribute:

<script data-href="https://github.com/tholman/github-corners" src="https://unpkg.com/github-corners/dist/embed.min.js"></script>

Now what if I want the link to open in a new tab?

Set data-target to _blank:

<script data-href="https://github.com/tholman/github-corners" data-target="_blank" src="https://unpkg.com/github-corners/dist/embed.min.js"></script>

And what if I want to change the color or position of the corner?

You can always override the default styling of the svg:

<!-- placed preferably after the embed script -->
<style>
.github-corner > svg {
  fill: skyblue;
}
</style>

License

MIT

See license/acknowledgements from original project.

Keywords

github-corners

FAQs

Package last updated on 19 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts