Skip to content

Commit a1a01ff

Browse files
committed
Add wobbly sidebar image
1 parent a66b3c9 commit a1a01ff

1 file changed

Lines changed: 63 additions & 2 deletions

File tree

_includes/sub-content.html

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,69 @@
11
<hr class=hide-desk>
22

3+
{% comment %}
4+
Don’t bother showing the contact CTA on the contact page.
5+
{% endcomment %}
6+
37
{% if page.page-class != "page--contact" %}
48

9+
<style>
10+
@media (pointer: fine) {
11+
12+
@keyframes wobble {
13+
14+
from {
15+
transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
16+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
17+
}
18+
19+
15% {
20+
transform: translate3d(-6%, 0, 0) rotate3d(0, 0, 1, -2deg) scale3d(1.05, 1.05, 1);
21+
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
22+
}
23+
24+
30% {
25+
transform: translate3d(5%, 0, 0) rotate3d(0, 0, 1, 1.5deg) scale3d(1.08, 1.08, 1);
26+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
27+
}
28+
29+
45% {
30+
transform: translate3d(-4%, 0, 0) rotate3d(0, 0, 1, -1.5deg) scale3d(1.06, 1.06, 1);
31+
box-shadow: 0 7px 20px rgba(0, 0, 0, 0.32);
32+
}
33+
34+
60% {
35+
transform: translate3d(3%, 0, 0) rotate3d(0, 0, 1, 1deg) scale3d(1.04, 1.04, 1);
36+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
37+
}
38+
39+
75% {
40+
transform: translate3d(-1.5%, 0, 0) rotate3d(0, 0, 1, -0.5deg) scale3d(1.02, 1.02, 1);
41+
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.26);
42+
}
43+
44+
to {
45+
transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
46+
box-shadow: none;
47+
}
48+
49+
}
50+
51+
html:has(.u-wobble-trigger:hover) .u-wobble {
52+
animation-name: wobble;
53+
animation-duration: .75s;
54+
animation-fill-mode: both;
55+
}
56+
57+
.u-wobble {
58+
will-change: transform;
59+
}
60+
61+
}
62+
</style>
63+
564
<p class=text-banner>
6-
<a href=https://calendly.com/csswizardry/30min class="btn btn--full btn--positive" id=cta data-sctrack=cta-sidebar elementtiming=cta-sidebar>{% include cta.md %}</a>
65+
<a href=https://calendly.com/csswizardry/30min class="btn btn--full
66+
btn--positive u-wobble-trigger" id=cta data-sctrack=cta-sidebar elementtiming=cta-sidebar>{% include cta.md %}</a>
767
</p>
868

969
<script>
@@ -36,7 +96,8 @@
3696
height=480
3797
style="background-image: url(/img/css/masthead-small-lqip.jpg), url({% include base64/masthead.jpg.html %}); view-transition-name: masthead;"
3898
elementtiming=sidebar-image
39-
decoding=sync>
99+
decoding=sync
100+
class=u-wobble>
40101
</p>
41102
{% endif %}
42103

0 commit comments

Comments
 (0)