@luctst/paul
v1.5.1
Published
Meet Paul at each click π¨βπ¦° π¨βπ¦°β
Downloads
9
Maintainers
Readme
Paul
Meet Paul at each click
Motivation
This is my friend Paul, as you can see Paul is a cute guy he loves beer and he works hard everyday..
So I decided to honor him with this little package each time you'll click on a DOM element my friend Paul will appear randomly on your web page :) Enjoy !!
Usage
With Node
For now Paul is not available with Node we're working on this but you can use it with a CDN.
In browser
Use Paul via a CDN by including this script:
Add this script just before your </body>
closing tag:
<script crossorigin src="https://unpkg.com/@luctst/paul/umd/paul.client.min.js"></script>
You now have access to the Paul()
function to see how to use it check the api section below.
Exemple
After adding the script create another <script>
tag and call the Paul function
.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Your title</title>
</head>
<body>
<script crossorigin src="https://unpkg.com/@luctst/paul/umd/paul.client.min.js"></script>
<script>
Paul();
</script>
</body>
</html>
API
Paul([selecteur], [friends])
The Paul
function create an img with my friend Paul.
selecteur
{HTMLElement, optional} - If this argument is specified theclick
event will be attached on this DOM Element.friends
{Array, optional} - If this argument is specified the function will display randomly an img from thefriends
array.
Contribute
If you'll like to add more images create a PR by adding a new picture in the static
folder at the root folder.
Licence
MIT