Skip to content

Commit 9d8f04c

Browse files
authored
Add newsletter subscription form (#840)
1 parent 9c8c0eb commit 9d8f04c

File tree

3 files changed

+49
-7
lines changed

3 files changed

+49
-7
lines changed

_includes/page-header.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@
77
<h1>{{ include.title }}</h1>
88
{% endif %}
99
<p>{{ include.tagline }}</p>
10-
11-
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
12-
<script>
13-
document.addEventListener('DOMContentLoaded', function(event) {
14-
anchors.add();
15-
});
16-
</script>
1710
</header>

_layouts/default.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
<link rel="apple-touch-icon" sizes="167x167" href="/assets/favicons/apple-touch-icon-167x167.png">
7676
<link rel="me" href="https://hachyderm.io/@ProjectJupyter">
7777
<script>console.log('Welcome to Project Jupyter! Explore the various tools available and their corresponding documentation. If you are interested in contributing to the platform, please visit the community resources section at https://jupyter.org/community.html.')</script>
78+
<script defer src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
79+
<script>
80+
document.addEventListener('DOMContentLoaded', function(event) {
81+
anchors.add();
82+
});
83+
</script>
84+
7885
<!-- Privacy-friendly analytics by Plausible -->
7986
<script async src="https://plausible.io/js/pa-B75UO5--FNXYQSG7GBWkf.js"></script>
8087
<script>
@@ -180,6 +187,33 @@ <h2>Legal</h2>
180187
</div>
181188
</div>
182189
</section>
190+
<section class="newsletter">
191+
<div class="content content--wide">
192+
<h2 id="newsletter">Subscribe for updates, event info, webinars, and the latest community news</h2>
193+
<!-- Newsletter subscription -->
194+
<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/embed/v2.js"></script>
195+
<script>
196+
hbspt.forms.create({
197+
portalId: "8112310",
198+
formId: "3a79d744-5260-4a98-b069-39defccc8f42",
199+
region: "na1",
200+
css: "\
201+
.hs-form { display: flex; flex-wrap: wrap; gap: 1em; align-items: flex-end; }\
202+
.hs-form-field { flex: 1 1 200px; position: relative; padding-bottom: 1.5em; }\
203+
.hs-form-field .input { margin: 0 !important; }\
204+
.hs-input { width: 100% !important; background: transparent !important; border: none !important; border-bottom: 2px solid #4d4d4d !important; padding: 0.6em 0 !important; margin: 0 !important; outline: none !important; box-shadow: none !important; }\
205+
.hs-input:focus { border-bottom-color: #000 !important; }\
206+
.hs-input.error { border-bottom-style: dashed !important; }\
207+
select.hs-input { appearance: auto; }\
208+
.hs-richtext { flex: 1 1 300px; color: #000; font-size: 0.85em; line-height: 1.5; }\
209+
.hs-submit { flex: 0 0 auto; }\
210+
.hs-button { background: #f37626 !important; color: #fff !important; text-shadow: 0px 0px 4px #000 !important; border: none !important; padding: 0.75em 3em; font-size: 1.1em; font-weight: 600; cursor: pointer; border-radius: 4px; }\
211+
.hs-error-msgs { position: absolute; left: 0; bottom: 0; color: #000; list-style: none; padding: 0; margin: 0; font-size: 0.8em; }\
212+
"
213+
});
214+
</script>
215+
</div>
216+
</section>
183217
<section class="footer-text">
184218
<div class="content content--wide">
185219
<img src="/assets/logos/rectanglelogo-blacktext-blackbody-blackplanets.svg" width="189" height="51" alt="Project Jupyter logo">

_sass/components/_footer.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
3838
}
3939
}
4040
}
41+
.newsletter {
42+
background-color: lighten($orange, 24%);
43+
h2 {
44+
color: $black;
45+
font-size: 1.3em;
46+
font-weight: bold;
47+
margin: 0 0 1.5em 0;
48+
padding: 0;
49+
}
50+
// Form renders in iframe; styles injected via css param in hbspt.forms.create()
51+
}
4152
.footer-text {
4253
background-color: $orange;
4354
img {
@@ -48,6 +59,10 @@
4859
color: $black;
4960
padding-top: 10px;
5061
font-size: 0.9em;
62+
a {
63+
color: $black;
64+
text-decoration: underline;
65+
}
5166
}
5267
}
5368
}

0 commit comments

Comments
 (0)