A modern and global open source fork corner label for your project's landing page.
A modern approach to the old style of adding "Fork Me" ribbon or label in an open source project's landing page.
Visit fork-corner.warengonzaga.com for the demo. Watch the video demo via Waren Gonzaga's YouTube Channel.
Fork corner generator page coming soon...
The complete documentation can be found here:
Install with npm:
$ npm i fork-corner --save
or add it directly to your webpage using a CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-corner/dist/fork-corner.min.css">
<script src="https://cdn.jsdelivr.net/npm/fork-corner/dist/fork-corner.min.js" defer></script>
After installing Fork Corner simply add this one line of code to the <body>
of your webpage:
<a href="https://github.com/user/repo" target="_blank" id="fork-corner" class="fork-corner fc-pos-tr fc-animate fc-theme-git"></a>
Fork Corner uses fork-corner
as ID to identify which element should be use in creating the fork corner. The class fork-corner
is use to identify which element to be controlled by the class. We have few important classes to quickly customize the fork corner's look and feel.
Class to position the Fork Corner on your webpage. By default, the position is top right
.
Class | Position |
---|---|
fc-pos-tr |
Top, Right |
fc-pos-tl |
Top, Left |
fc-pos-tr-sticky |
Top, Right, Sticky |
fc-pos-tl-sticky |
Top, Left, Sticky |
fc-pos-br |
Bottom, Right (sticky by default) |
fc-pos-bl |
Bottom, Left (sticky by default) |
Class to animate the Fork Corner on your webpage. By default, when you hover your mouse to the icon it will rotate.
Class | Animation |
---|---|
fc-animate |
Icon rotation on cursor hover |
fc-animate-slideup |
Icon slide up on cursor hover |
fc-animate-slidedown |
Icon slide down on cursor hover |
fc-animate-grow |
Icon grow on cursor hover |
fc-animate-shrink |
Icon shrink on cursor hover |
fc-animate-fade |
Icon fade out on cursor hover |
More animation will come, have animation in mind? Contribute today!
Class to select pre-defined theme or style you want to use. By default, it will show the official Git logo.
Class | Theme/Brand |
---|---|
fc-theme-animate |
Git Logo |
fc-theme-github |
GitHub Logo |
fc-theme-gitlab |
Gitlab Logo |
fc-theme-bitbucket |
Bitbucket Logo |
More theme and brand will come, have one in mind? Contribute today!
Class to select pre-defined corner size. By default, it is set as 200px. To set the default size just don't add the size class.
Class | Corner Size |
---|---|
fc-size-small |
150px corner size |
fc-size-medium |
250px corner size |
fc-size-large |
300px corner size |
If you're looking for specific size please edit the source file and build it.
Contributions are welcome, create a pull request to this repo and I will review your code. Please consider to submit your pull request to the dev
branch. Thank you!
Read the project's contributing guide for more info.
For any questions, suggestions, ideas, or simply you want to share your experience in using this project, feel free to share and discuss it to the community!
If you're facing a problem in using Fork Corner please let me know by creating an issue here. I'm here to help you!
Love what I do? Send me some coffees!
Your coffee donation and support will help me to continue working on open-source projects like this.
Join to my growing tech community and get the latest updates!
Read the project's code of conduct.
Fork Corner is licensed under The MIT License.
Fork Corner is created by Waren Gonzaga, with the help of awesome contributors.
π» Made with π and β by Waren Gonzaga with YHWH π | Citizen of Heaven