Skip to content

Add herecomesbitcoin animations #4254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
17eb975
Add herecomesbitcoin animation to FAQ page
thebrandonlucas Aug 1, 2024
eade202
Add fairy
thebrandonlucas Sep 7, 2024
a7efda3
add construction animation
thebrandonlucas Sep 11, 2024
427a4eb
avoid conflicting variable names for fairy and construction
thebrandonlucas Sep 11, 2024
287272f
allow fairy animation to be replayed multiple times
thebrandonlucas Sep 11, 2024
96e5ff2
add lottie script
thebrandonlucas Sep 11, 2024
0cd9976
add sir animation
thebrandonlucas Sep 11, 2024
8ad0cfe
remove white background from fancy animation
thebrandonlucas Sep 11, 2024
d6f015f
optimize fancy animation and correct sizing
thebrandonlucas Sep 12, 2024
cc183db
refactor fairy animation to load from json
thebrandonlucas Sep 12, 2024
dc29bcd
refactor construction animation to load from json
thebrandonlucas Sep 12, 2024
e0f5a0d
add coder animation
thebrandonlucas Sep 12, 2024
7ed2966
add cat animation
thebrandonlucas Sep 13, 2024
48c743f
add astronaut
thebrandonlucas Sep 15, 2024
3de79eb
add bottom padding to bitcoin-paper
thebrandonlucas Sep 15, 2024
2dd6e75
wip - add flower heads
thebrandonlucas Sep 15, 2024
962993e
Fairy animation only plays on touch or click
thebrandonlucas Nov 16, 2024
b047e65
feat: make flower heads animation on mouseenter
thebrandonlucas Nov 16, 2024
6e43630
fix: flower animation should cover page scroll link
thebrandonlucas Nov 16, 2024
05a3737
feat: implement intersection observer for construction animation
thebrandonlucas Nov 16, 2024
efcfb6f
feat: only show construction worker on bitcoin-for-businesses page
thebrandonlucas Dec 10, 2024
26b0af8
feat: only show cat on index page
thebrandonlucas Dec 10, 2024
c1f027f
feat: cat scaling
thebrandonlucas Dec 11, 2024
22b69c2
feat: shorten cat reveal time
thebrandonlucas Dec 11, 2024
f50cebf
feat: hide flower heads animation on small screens
thebrandonlucas Dec 11, 2024
17f73d8
feat: replace bg image with repeatable bg
thebrandonlucas Dec 11, 2024
3a14d00
feat: add hungry bitcoin animation
thebrandonlucas Dec 12, 2024
61b3bde
chore: only use repeating mainoverview background
thebrandonlucas Dec 12, 2024
990cc55
feat: move sir animation above text
thebrandonlucas Dec 12, 2024
6a83576
Merge branch 'bitcoin-dot-org:master' into master
thebrandonlucas Feb 6, 2025
76fa5e9
fix: use more performant fairy and flower heads animations
thebrandonlucas Feb 6, 2025
b96b1be
Merge pull request #1 from thebrandonlucas/deploy
thebrandonlucas Feb 6, 2025
913b3c4
fix: center sir animation
thebrandonlucas Feb 6, 2025
eac2a00
fix: center align coder animation
thebrandonlucas Feb 6, 2025
f100d0f
fix: add new construction animation to fix safari
thebrandonlucas Feb 6, 2025
ee66328
fix: use hungry animation that aligns properly
thebrandonlucas Feb 6, 2025
b0f429f
wip: add hands svg, currently small and broken
thebrandonlucas Feb 6, 2025
c4a9597
fix: flower heads reduced animation
thebrandonlucas Feb 18, 2025
8be58d0
fix: hungry hands positioning
thebrandonlucas Feb 18, 2025
c84a1d8
feat: add individual hands svg and position them
thebrandonlucas Mar 10, 2025
b02164a
fix: use lottie-player web component to fix screen resize
thebrandonlucas Mar 17, 2025
16829cd
fix: flower heads causing extra margin
thebrandonlucas Mar 17, 2025
2906092
fix: pass in callback properly
thebrandonlucas Mar 18, 2025
ec08224
feat: replace lottie.min.js with lottie-player.js
thebrandonlucas Mar 18, 2025
d46e035
feat: use lottie-player for all animations
thebrandonlucas Mar 18, 2025
7231571
Merge pull request #2 from thebrandonlucas/fix-breakpoint
thebrandonlucas Mar 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions _includes/animations/herecomesbitcoin/astronaut.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html xmlns="http://www.w4.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-astronaut {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-astronaut" src="/json/astronaut.json" autoplay></lottie-player>
</body>
</html>
19 changes: 19 additions & 0 deletions _includes/animations/herecomesbitcoin/cat.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html xmlns="http://www.w4.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-cat {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-cat" src="/json/cat.json" autoplay loop></lottie-player>
</body>
</html>
19 changes: 19 additions & 0 deletions _includes/animations/herecomesbitcoin/coder.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html xmlns="http://www.w4.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-coder {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-coder" src="/json/coder.json" autoplay loop></lottie-player>
</body>
</html>
20 changes: 20 additions & 0 deletions _includes/animations/herecomesbitcoin/construction.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html xmlns="http://www.w4.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-construction{
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}

</style>
</head>
<body>
<lottie-player id="animation-construction" src="/json/construction.json" autoplay></lottie-player>
</body>
</html>
32 changes: 32 additions & 0 deletions _includes/animations/herecomesbitcoin/fairy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-fairy {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-fairy" src="/json/fairy.json"></lottie-player>
<script>
const animFairy = document.querySelector('#animation-fairy');
animFairy.addEventListener('click', playFairyAnimation);
animFairy.addEventListener('complete', stopFairyAnimation);

function stopFairyAnimation() {
animFairy.stop();
}

function playFairyAnimation() {
animFairy.play(animFairy.firstFrame);
}
</script>
</body>
</html>
20 changes: 20 additions & 0 deletions _includes/animations/herecomesbitcoin/fancy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-fancy {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
<script src="/js/lottie-player.js"></script>
</head>
<body>
<lottie-player id="animation-fancy" src="/json/fancy.json" autoplay loop></lottie-player>
</body>
</html>
34 changes: 34 additions & 0 deletions _includes/animations/herecomesbitcoin/flower_heads.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-flower-heads {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-flower-heads" src="/json/flower_heads.json"></lottie-player>
<script>
const animFlowerHeads = document.querySelector('#animation-flower-heads');
animFlowerHeads.addEventListener('click', playFlowerHeadsAnimation);
animFlowerHeads.addEventListener('complete', stopFlowerHeadsAnimation);

document.querySelector('#flower-heads-hoverable').addEventListener('mouseenter', playFlowerHeadsAnimation);

function stopFlowerHeadsAnimation() {
animFlowerHeads.stop();
}

function playFlowerHeadsAnimation() {
animFlowerHeads.play(animFlowerHeads.firstFrame);
}
</script>
</body>
</html>
32 changes: 32 additions & 0 deletions _includes/animations/herecomesbitcoin/hungry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-hungry {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-hungry" src="/json/hungry.json"></lottie-player>
<script>
const animHungry = document.querySelector('#animation-hungry');
animHungry.addEventListener('click', playHungryAnimation);
animHungry.addEventListener('complete', stopHungryAnimation);

function stopHungryAnimation() {
animHungry.stop();
}

function playHungryAnimation() {
animHungry.play(animHungry.firstFrame);
}
</script>
</body>
</html>
19 changes: 19 additions & 0 deletions _includes/animations/herecomesbitcoin/sir.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
#animation-sir {
width:100%;
height:100%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<lottie-player id="animation-sir" src="/json/sir.json" autoplay loop></lottie-player>
</body>
</html>
3 changes: 3 additions & 0 deletions _includes/layout/base/footer-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<p class="donate-text">{% translate donate-community-support layout %}
<a class="donate-link" href="bitcoin:bc1qx3u4njquj0ux63030r4nat8awqrlm0x2zlt96h" target="_blank">bc1qx3u4njquj0ux63030r4nat8awqrlm0x2zlt96h</a>
</p>
{% if page.id == 'bitcoin-for-businesses' %}
{% include animations/herecomesbitcoin/construction.html %}
{% endif %}
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions _includes/layout/base/html-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{% if page.lang == 'bg' or page.lang == 'el' or page.lang == 'ko' or page.lang == 'hi' or page.lang == 'pl' or page.lang == 'sl' or page.lang == 'ro' or page.lang == 'ru' or page.lang == 'tr' or page.lang == 'uk' or page.lang == 'zh_CN' or page.lang == 'zh_TW' %}<link rel="stylesheet" href="/css/sans.css?{{site.time | date: '%s'}}">{% endif %}
<script type="text/javascript" src="/js/base.js?{{site.time | date: '%s'}}"></script>
<script type="text/javascript" src="/js/main.js?{{site.time | date: '%s'}}"></script>
<script type="text/javascript" src="/js/lottie-player.js?{{site.time | date: '%s'}}"></script>
<script src="/js/jquery/jquery-1.11.2.min.js"></script>
<script src="/js/jquery/jquery-ui.min.js"></script>
<script src="/js/jquery/jquery.qrcode.min.js"></script>
Expand Down
73 changes: 43 additions & 30 deletions _includes/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% comment %} This file is licensed under the MIT License (MIT) available on http://opensource.org/licenses/MIT. {% endcomment
%}
{% comment %} This file is licensed under the MIT License (MIT) available on http://opensource.org/licenses/MIT. {% endcomment %}


<div class="mainhero">
Expand All @@ -17,34 +16,44 @@

</div>
</div>
<div class="mainoverview">
<div class="container">
<div class="mainoverview-title">{% translate overview %}</div>
<a href="/{{ page.lang }}/{% translate bitcoin-for-individuals url %}" class="maincard">
<img class="maincard-img" src="/img/icons/ico_individuals.svg?{{site.time | date: '%s'}}" alt="Icon">
<div>
<p class="maincard-title">{% translate menu-bitcoin-for-individuals layout %}</p>
<p class="maincard-link">{% translate learn-more layout %}</p>
</div>
</a>
<a href="/{{ page.lang }}/{% translate bitcoin-for-businesses url %}" class="maincard">
<img class="maincard-img" src="/img/icons/ico_business.svg?{{site.time | date: '%s'}}" alt="Icon">
<div>
<p class="maincard-title">{% translate menu-bitcoin-for-businesses layout %}</p>
<p class="maincard-link">{% translate learn-more layout %}</p>
</div>
</a>
<a href="https://developer.bitcoin.org/" class="maincard">
<img class="maincard-img" src="/img/icons/ico_developers.svg?{{site.time | date: '%s'}}" alt="Icon">
<div>
<p class="maincard-title">{% translate menu-bitcoin-for-developers layout %}</p>
<p class="maincard-link">{% translate learn-more layout %}</p>
</div>
<div class="mainoverview-parent">
<div class="herecomesbitcoin-hungry">
{% include animations/herecomesbitcoin/hungry.html %}
<img class="herecomesbitcoin-hungry-right-hand" src="/img/animations/herecomesbitcoin/hungry_right_hand.svg?{{site.time | date: '%s'}}" alt="right-hand"/>
<img class="herecomesbitcoin-hungry-left-hand" src="/img/animations/herecomesbitcoin/hungry_left_hand.svg?{{site.time | date: '%s'}}" alt="left-hand"/>
</div>
<div class="mainoverview">
<div class="container">
<div class="mainoverview-title">{% translate overview %}</div>
<a href="/{{ page.lang }}/{% translate bitcoin-for-individuals url %}" class="maincard">
<img class="maincard-img" src="/img/icons/ico_individuals.svg?{{site.time | date: '%s'}}" alt="Icon">
<div>
<p class="maincard-title">{% translate menu-bitcoin-for-individuals layout %}</p>
<p class="maincard-link">{% translate learn-more layout %}</p>
</div>
</a>
<a href="/{{ page.lang }}/{% translate bitcoin-for-businesses url %}" class="maincard">
<img id="flower-heads-hoverable" class="maincard-img" src="/img/icons/ico_business.svg?{{site.time | date: '%s'}}" alt="Icon">
<div>
<p class="maincard-title">{% translate menu-bitcoin-for-businesses layout %}</p>
<p class="maincard-link">{% translate learn-more layout %}</p>
</div>
<div class="herecomesbitcoin-flower-heads">
{% include animations/herecomesbitcoin/flower_heads.html %}
</div>
</a>
<a href="https://developer.bitcoin.org/" class="maincard">
<img class="maincard-img" src="/img/icons/ico_developers.svg?{{site.time | date: '%s'}}" alt="Icon">
<div>
<p class="maincard-title">{% translate menu-bitcoin-for-developers layout %}</p>
<p class="maincard-link">{% translate learn-more layout %}</p>
</div>
</a>
</div>
<a class="btn-down" href="#maindesc-title">
<img src="/img/icons/ico_arrow_down.svg?{{site.time | date: '%s'}}" alt="Link">
</a>
</div>
<a class="btn-down" href="#maindesc-title">
<img src="/img/icons/ico_arrow_down.svg?{{site.time | date: '%s'}}" alt="Link">
</a>
</div>
<div class="maindesc">
<div class="container">
Expand Down Expand Up @@ -73,8 +82,12 @@

</ul>
</div>
<img class="maindesc-img" src="/img/home/bitcoin-img.svg?{{site.time | date: '%s'}}" alt="Bitcoin image">
</div>
<div class="herecomesbitcoin-fairy-container">
<div class="herecomesbitcoin-fairy">
{% include animations/herecomesbitcoin/fairy.html %}
</div>
</div>
</div>
<div class="btn-container">
<a class="btn btn-dark btn-home center" href="/{{ page.lang }}/{% translate getting-started url %}">{% translate getstarted layout %}</a>
</div>
Expand Down
8 changes: 8 additions & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
</div>
{% include layout/base/footer-license.html %}
</div>

{% if page.id == 'index' %}
<div class="herecomesbitcoin-container" style="justify-content: center">
<div class="herecomesbitcoin-cat">
{% include animations/herecomesbitcoin/cat.html %}
</div>
</div>
{% endif %}
</div>

{% include layout/base/footer-js.html %}
Expand Down
Loading