Skip to content

Commit

Permalink
Upload 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
jerosoler committed Jun 6, 2021
0 parents commit b46389f
Show file tree
Hide file tree
Showing 13 changed files with 8,012 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

custom: ["https://paypal.me/jerosoler"]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Folders
node_modules/
docs/
src/
gulpfile.js
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Jero Soler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<div style="text-align:center">
<p style="font-size:135px;">IOAA</p>
<p>Intersection Observer API Animation</p>
<small>⚡ Fast animation Inteserction Observer library</small>
</div>

# IOAA - Intersection Observer API Animation

## Install

Simple install with npm or download dist file.

### NPM

```bash
npm install ioaa -s
```

### javascript

```javascript
<script type="module">import ioaa from "../dist/ioaa.min.js";</script>
```

## How to use

### HTML

```html
<div class="ioaa" data-ioaa-animation="animateLeft" data-ioaa-repeat="true">
...
</div>
```

| Option | Default | Description |
| ------------------- | ------- | --------------------------- |
| class | ioaa | Class Name for animation |
| data-ioaa-animation | null | Your class name animation |
| data-ioaa-repeat | false | True or False, not required |

### Javascript

```
<script type="module">
import ioaa from "../src/ioaa.js";
ioaa(); // Or ioaa('.YOU_CLASSNAME'); Default ClassName ioaa
</script>
```

### CSS

```css
.animateLeft {
animation-name: fadeInLeft;
animation-duration: 1s;
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}

to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
```
1 change: 1 addition & 0 deletions dist/ioaa.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 108 additions & 0 deletions docs/animations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.animateLeft {
animation-name: fadeInLeft;
animation-duration: 1s;
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}

to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}

.animateRight {
animation-name: fadeInRight;
animation-duration: 1s;
}

@keyframes fadeInRight {
from {
opacity: 0;
transform: translate3d(100%, 0, 0);
}

to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}

.animateFlip {
backface-visibility: visible;
animation-name: flip;
animation-duration: 1s;
}

@keyframes flip {
from {
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
animation-timing-function: ease-in;
opacity: 0;
}

40% {
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
animation-timing-function: ease-in;
}

60% {
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}

80% {
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}

to {
transform: perspective(400px);
}
}

.animateHeart {
animation-name: heartBeat;
animation-duration: 1s;
animation-timing-function: ease-in-out;
}

@keyframes heartBeat {
0% {
transform: scale(1);
}

14% {
transform: scale(1.3);
}

28% {
transform: scale(1);
}

42% {
transform: scale(1.3);
}

70% {
transform: scale(1);
}
}

.animateZoom {
animation-name: zoomIn;
animation-duration: 1s;
}

@keyframes zoomIn {
from {
opacity: 0;
transform: scale3d(0.3, 0.3, 0.3);
}

50% {
opacity: 1;
}
}
161 changes: 161 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚡</text></svg>">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IOAA - Intersection Observer API Animation</title>
<meta name="description" content="Fast animation Inteserction Observer library">
<meta name="author" content="Jero Soler">

<link href="style.css" rel="stylesheet">
<link href="animations.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css" integrity="sha256-cuvic28gVvjQIo3Q4hnRpQSNB0aMw3C+kjkR0i+hrWg=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism-tomorrow.min.css" integrity="sha256-xevuwyBEb2ZYh4nDhj0g3Z/rDBnM569hg9Vq6gEw/Sg=" crossorigin="anonymous">
</head>
<body>

<header id="header">
<h1 class="ioaa" data-ioaa-animation="animateZoom" data-ioaa-repeat="true">IOAA</h1>
<h3>Intersection Observer API Animation</h3>
<small>⚡ Fast animation Inteserction Observer library</small>
</header>
<div class="wrapper">
<nav>
<a href="#install">Install</a>
<a href="#howtouse">How to use</a>
<a href="https://github.com/jerosoler/ioaa" target="_blank">Github</a>
</nav>
<blockquote class="ioaa" data-ioaa-animation="animateHeart" data-ioaa-repeat="true">Simple library to add animation on intersection</blockquote>
<h3 div="install">Install</h3>
<p>
Simple install with npm or download dist file.
</p>
<h4>NPM</h4>
<div class="codebox" data-ioaa-animation="animateLeft">
<div class="preheader">
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg>
</div>
<pre><code class="language-bash">npm install ioaa -s</code></pre>
</div>

<h4>Script</h4>
<div class="codebox" data-ioaa-animation="animateRight" data-ioaa-repeat="true">
<div class="preheader">
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg>
</div>
<pre><code class="language-html"><xmp><script type="module">
import ioaa from "../dist/ioaa.min.js";
</script></xmp></code></pre>
</div>




<h3 id="howtouse">How to use</h3>
<h4>HTML</h4>
<div class="codebox" data-ioaa-animation="animateLeft" data-ioaa-repeat="true">
<div class="preheader">
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg>
</div>
<pre><code class="language-html"><xmp><div class="ioaa" data-ioaa-animation="animateLeft" data-ioaa-repeat="true">...</div></xmp></code></pre>
</div>
<table class="ioaa" data-ioaa-animation="animateFlip" data-ioaa-repeat="true">
<thead>
<th>
Option
</th>
<th>
Default
</th>
<th>
Description
</th>
</thead>
<tr>
<td>
class
</td>
<td>
ioaa
</td>
<td>
Class Name for animation
</td>
</tr>
<tr>
<td>
data-ioaa-animation
</td>
<td>
null
</td>
<td>
Your class name animation
</td>
</tr>
<tr>
<td>
data-ioaa-repeat
</td>
<td>
false
</td>
<td>
True or False, not required
</td>
</tr>
</table>

<h4>Javascript</h4>
<div class="codebox" data-ioaa-animation="animateRight" data-ioaa-repeat="true">
<div class="preheader">
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg>
</div>
<pre><code class="language-html"><xmp><script type="module">
import ioaa from "../src/ioaa.js";
ioaa(); // Or ioaa('.YOU_CLASSNAME'); Default ClassName ioaa
</script></xmp></code></pre>
</div>
<h4>CSS</h4>
<div class="codebox" data-ioaa-animation="animateLeft" data-ioaa-repeat="true">
<div class="preheader">
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg>
</div>
<pre><code class="language-css"><xmp>.animateLeft {
animation-name: fadeInLeft;
animation-duration: 1s;
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}

to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}</xmp></code></pre>
</div>



</div>

<footer id="footer">
Developed by <a href="https://twitter.com/jerosoler" target="_blank">Jero Soler</a> with <span class="ioaa" data-ioaa-animation="animateHeart" data-ioaa-repeat="true"></span>
<a href="#header"></a>
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.min.js" integrity="sha256-3teItwIfMuVB74Alnxw/y5HAZ2irOsCULFff3EgbtEs=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-css.min.js" integrity="sha256-4ut/7XCv/zjtcNF9GlQL+Jpy3AuQlLt2ExXNtIjZ8Po=" crossorigin="anonymous"></script>

<script type="module">
import ioaa from "../src/ioaa.js";
ioaa();
ioaa(".codebox");
</script>

</body>
</html>
Loading

0 comments on commit b46389f

Please sign in to comment.