-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathNewsletter.astro
More file actions
83 lines (71 loc) · 2.04 KB
/
Newsletter.astro
File metadata and controls
83 lines (71 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
import { Icon } from "@astrojs/starlight/components";
---
<div class="hubspot-form-wrapper">
<div class="newsletter-pitch">
<p class="newsletter-title">
<Icon name="email" label="Duende Newsletter" />
Subscribe To Our Newsletter!</p>
<p class="newsletter-subtitle">Stay ahead in the world of identity and access management!</p>
<ul>
<li>Latest security best practices</li>
<li>Product updates and releases</li>
<li>Technical tips and implementation guides</li>
<li>Industry news and trends</li>
</ul>
<p>Join our community of developers and security professionals building secure applications.</p>
</div>
<hubspot-form></hubspot-form>
</div>
<style>
.newsletter-title {
display: flex;
font-size: var(--sl-text-3xl);
font-weight: 500;
svg {
margin-right: 0.5rem;
}
}
.newsletter-subtitle {
font-size: var(--sl-text-lg);
font-weight: 400;
}
.hubspot-form-wrapper {
display: flex;
--sl-card-border: var(--sl-color-purple);
--sl-card-bg: var(--sl-color-purple-low);
border: 1px solid var(--sl-color-gray-5);
background-color: var(--sl-color-black);
padding: clamp(1rem, calc(0.125rem + 3vw), 2.5rem);
flex-direction: row;
gap: clamp(0.5rem, calc(0.125rem + 1vw), 1rem);
flex-wrap: nowrap;
}
@media (max-width: 768px) {
.hubspot-form-wrapper {
flex-wrap: wrap;
}
}
.newsletter-pitch {
vertical-align: baseline;
align-content: center;
}
</style>
<script>
import "https://js.hsforms.net/forms/embed/v2.js";
class HubspotForm extends HTMLElement {
constructor() {
super();
const div = document.createElement("div");
div.className = `hubspot-form-${Math.random().toString(36).substring(2, 10)}`;
this.appendChild(div);
hbspt.forms.create({
portalId: "47428297",
formId: "bdd9b287-d141-46e2-8b1f-90ce29fd262e",
region: "na1",
target: `.${div.className}`
});
}
}
customElements.define("hubspot-form", HubspotForm);
</script>