Skip to content

Commit fabc66a

Browse files
committed
Happy Harry’s little happy dance
Make the sidebar headshot jiggle when someone hovers the sidebar CTA.
1 parent a1a01ff commit fabc66a

File tree

2 files changed

+5
-54
lines changed

2 files changed

+5
-54
lines changed

_includes/css/components.happy-harry.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_includes/sub-content.html

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,13 @@
77
{% if page.page-class != "page--contact" %}
88

99
<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-
}
10+
{% include css/components.happy-harry.css %}
11+
/*# sourceURL=happy-harry.inline.css */
6212
</style>
6313

6414
<p class=text-banner>
6515
<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>
16+
btn--positive c-happy-harry-trigger" id=cta data-sctrack=cta-sidebar elementtiming=cta-sidebar>{% include cta.md %}</a>
6717
</p>
6818

6919
<script>
@@ -97,7 +47,7 @@
9747
style="background-image: url(/img/css/masthead-small-lqip.jpg), url({% include base64/masthead.jpg.html %}); view-transition-name: masthead;"
9848
elementtiming=sidebar-image
9949
decoding=sync
100-
class=u-wobble>
50+
class=c-happy-harry>
10151
</p>
10252
{% endif %}
10353

0 commit comments

Comments
 (0)