Skip to content

Commit

Permalink
Add V4 links
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangarnier committed Oct 24, 2023
1 parent 28b26cd commit 56a97ef
Show file tree
Hide file tree
Showing 8 changed files with 327 additions and 15 deletions.
11 changes: 10 additions & 1 deletion documentation/assets/css/documentation.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ h2 {
font-weight: 200;
}

.description-header a {
text-decoration: none;
color: inherit;
}

.description-header a:hover {
text-decoration: underline;
}

/* Panes */

.pane {
Expand Down Expand Up @@ -218,7 +227,7 @@ h2 {
}

.demo-info code {
font-family: "Input Mono Reg", monospace;
font-family: "InputMono", "Courier New", Courier, monospace;
font-size: 14px;
line-height: 22px;
white-space: pre-wrap;
Expand Down
186 changes: 186 additions & 0 deletions documentation/assets/css/v4.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
/* V4 */

body {
transition: padding-top .5s ease-in-out;
}

body.has-banner {
padding-top: 60px;
}

#top-banner,
#docs-header {
transition: transform .5s ease-in-out;
}

body.has-banner #docs-header {
transform: translateY(60px);
}

body.has-banner #top-banner {
transform: translateY(0%);
}

#top-banner {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
z-index: 99;
top: 0;
left: 0;
right: 0;
height: 60px;
padding-left: 60px;
padding-right: 10px;
font-size: 16px;
font-weight: 600;
background-color: #F74F4D;
color: #FFFFFF;
transform: translateY(-100%);
}

#top-banner p {
margin-top: -2px;
}

#close-banner {
position: absolute;
z-index: 99;
left: 10px;
top: 10px;
height: 40px;
width: 40px;
text-align: center;
background-color: transparent;
color: #FFF;
cursor: pointer;
}

#banner-cta {
display: inline-flex;
align-items: baseline;
height: 30px;
padding-left: 12px;
padding-right: 12px;
margin-left: 16px;
border-radius: 16px;
white-space: pre;
font-weight: 600;
line-height: 30px;
background-color: #FFF;
color: #F74F4D;
text-decoration: none;
transition: transform .25s ease;
}

#banner-cta:hover {
transform: scale(1.08);
}

@media (max-width: 640px) {
#top-banner {
padding-left: 40px;
padding-right: 10px;
font-size: 15px;
}

#close-banner {
left: 0;
height: 40px;
width: 40px;
}

#banner-cta {
margin-left: 10px;
}

#banner-cta span {
display: none;
}
}

/* Sponsors */

.sponsor-logo {
opacity: .5;
text-decoration: none;
transition: opacity .25s ease;
margin-bottom: 20px;
}

.sponsor-logo:hover {
opacity: 1;
}

.sponsor-logo img {
width: 100%;
max-width: 92px;
height: auto;
margin-bottom: 10px;
}

.sponsor-name {
display: block;
color: #FFF;
font-family: "InputMono", "Courier New", Courier, monospace;
font-weight: bold;
font-size: 10px;
text-align: center;
letter-spacing: -.075em;
}

.sponsors-pane {
display: none;
}

@media (min-width: 800px) {
.sponsors-pane {
width: 148px;
overflow-y: scroll;
display: block;
border-left: 1px solid rgba(0,0,0,.65);
}
}

#docs-sponsors-list {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}

.sponsors-grid {
opacity: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

#home-sponsors-list {
flex-wrap: wrap;
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
display: flex;
flex-direction: row;
justify-content: space-between;
}

@media (max-width: 739px) {
.sponsors-grid {
justify-content: flex-start;
align-items: flex-start;
padding-top: 40px;
border-top: 1px solid rgba(255,255,255,.3);
}
#home-sponsors-list .sponsor-logo {
width: 33.33%;
padding: 10px;
}
#home-sponsors-list .sponsor-logo img {
max-width: 100%;
}
}
4 changes: 3 additions & 1 deletion documentation/assets/css/website.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ a.main-cta {
padding-left: 12px;
padding-right: 12px;
border-radius: 16px;
font-size: 16px;
font-weight: 600;
line-height: 2;
background-color: #F64E4D;
transition: transform .25s ease;
Expand Down Expand Up @@ -1059,4 +1061,4 @@ a.feature-icon:hover img {
.footer-text a {
font-size: 14px;
}
}
}
Binary file added documentation/assets/img/sponsor-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions documentation/assets/js/v4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// V4

const $banner = document.querySelector('#top-banner');
const $closeBanner = document.querySelector('#close-banner');

function showBanner() {
document.body.classList.add('has-banner');
}

function closeBanner() {
document.body.classList.remove('has-banner');
}

setTimeout(showBanner, 2500);

$closeBanner.onclick = closeBanner;
18 changes: 9 additions & 9 deletions documentation/assets/js/website.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ var headerIntroAnimation = anime.timeline({
autoplay: false
})
.add({
targets: ['.header a', '.secondary-menu a', '.section-intro .feature-description-text'],
targets: ['.header a', '.secondary-menu a', '.section-intro .feature-description-text', '.sponsors-grid'],
opacity: {value: [0.001, 1], easing: 'linear', duration: 300},
translateY: [40, 0],
translateZ: 0,
Expand Down Expand Up @@ -574,7 +574,7 @@ var advancedStaggeringAnimation = (function() {
.add({
targets: '.stagger-visualizer .cursor',
keyframes: [
{ scale: .75, duration: 120},
{ scale: .75, duration: 120},
{ scale: 2.5, duration: 220},
{ scale: 1.5, duration: 450},
],
Expand Down Expand Up @@ -699,7 +699,7 @@ var timeControlAnimation = (function() {
end: time.start,
easing: 'spring(.3, 200, 5, 1)',
update: function() { timelineAnimation.seek(time.end); },
complete: function() {
complete: function() {
controlAnimationCanMove = true;
moveControlAnimation();
}
Expand Down Expand Up @@ -822,10 +822,10 @@ var layeredAnimation = (function() {
complete: function(anim) { animateShape(anim.animatables[0].target); },
})
.add({
translateX: createKeyframes(function(el) {
translateX: createKeyframes(function(el) {
return el.classList.contains('large') ? anime.random(-300, 300) : anime.random(-520, 520);
}),
translateY: createKeyframes(function(el) {
translateY: createKeyframes(function(el) {
return el.classList.contains('large') ? anime.random(-110, 110) : anime.random(-280, 280);
}),
rotate: createKeyframes(function() { return anime.random(-180, 180); }),
Expand All @@ -846,7 +846,7 @@ var layeredAnimation = (function() {
if (polyEl) {
animation.add({
targets: polyEl,
points: createKeyframes(function() {
points: createKeyframes(function() {
var scale = anime.random(72, 180) / 100;
return trianglePoints.map(function(p) { return p * scale; }).join(' ');
}),
Expand All @@ -869,12 +869,12 @@ var layeredAnimation = (function() {
complete: function(anim) { animateProgress(anim.animatables[0].target); },
})
.add({
transformOrigin: createKeyframes(function(el) {
transformOrigin: createKeyframes(function(el) {
return anime.random(0, 100) + '%';
})
}, 0)
.add({
scaleX: createKeyframes(function(el) {
scaleX: createKeyframes(function(el) {
return anime.random(10, 100) / 100;
})
}, 0);
Expand All @@ -894,4 +894,4 @@ scrollToGettingStartedLink.addEventListener('click', function(e) {
scrollToElement(document.querySelector('#getting-started'));
})

window.onload = introEasingsAnimation.init;
window.onload = introEasingsAnimation.init;
51 changes: 49 additions & 2 deletions documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,27 @@
<link href="assets/css/animejs.css" rel="stylesheet">
<link href="assets/css/anime-theme.css" rel="stylesheet">
<link href="assets/css/documentation.css" rel="stylesheet">
<link href="assets/css/v4.css" rel="stylesheet">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-16LTPBS8QC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-16LTPBS8QC');
</script>
<script src="../lib/anime.min.js"></script>
</head>
<body>
<div id="top-banner">
<button id="close-banner"></button>
<p>
Anime.js V4 is now in early access for GitHub Sponsors!
</p>
<a id="banner-cta" href="https://github.com/sponsors/juliangarnier" target="_blank">Try <span>Anime.js</span> V4</a>
</div>
<div class="content">
<header class="header">
<header id="docs-header" class="header">
<a class="logo" href="https://github.com/juliangarnier/anime/">
<img class="anime-mini-logo" src="assets/img/anime-mini-logo.svg" />
<span class="version-number"></span>
Expand Down Expand Up @@ -4176,10 +4183,50 @@ <h2><span></span></h2>
</header>
<div class="info-output"></div>
</section>
<section class="pane sponsors-pane">
<header class="description-header">
<a target="_blank" href="https://github.com/sponsors/juliangarnier"><h2>Sponsors</h2></a>
</header>
<div id="docs-sponsors-list">
<a class="sponsor-logo" target="_blank" href="https://github.com/sponsors/juliangarnier">
<img src="assets/img/sponsor-logo.png" />
<span class="sponsor-name">Your logo here</span>
</a>
<a class="sponsor-logo" target="_blank" href="https://github.com/sponsors/juliangarnier">
<img src="assets/img/sponsor-logo.png" />
<span class="sponsor-name">Your logo here</span>
</a>
<a class="sponsor-logo" target="_blank" href="https://github.com/sponsors/juliangarnier">
<img src="assets/img/sponsor-logo.png" />
<span class="sponsor-name">Your logo here</span>
</a>
<a class="sponsor-logo" target="_blank" href="https://github.com/sponsors/juliangarnier">
<img src="assets/img/sponsor-logo.png" />
<span class="sponsor-name">Your logo here</span>
</a>
<a class="sponsor-logo" target="_blank" href="https://github.com/sponsors/juliangarnier">
<img src="assets/img/sponsor-logo.png" />
<span class="sponsor-name">Your logo here</span>
</a>
<a class="sponsor-logo" target="_blank" href="https://github.com/sponsors/juliangarnier">
<img src="assets/img/sponsor-logo.png" />
<span class="sponsor-name">Your logo here</span>
</a>
</div>
</section>
</div>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-79927007-1', 'auto');
ga('send', 'pageview');
</script>
<script src="assets/js/vendors/highlight.pack.js"></script>
<script src="assets/js/vendors/beautify-html.js"></script>
<script src="assets/js/documentation.js"></script>
<script src="assets/js/v4.js"></script>
</body>
</html>
Loading

0 comments on commit 56a97ef

Please sign in to comment.