Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Commit d082091

Browse files
authored
Merge pull request #88 from codiini/main
Create form for email collection
2 parents 87462f9 + 37ac57f commit d082091

6 files changed

Lines changed: 138 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<div class="email-collection-container my-5" style="padding-top:75px; padding-bottom: 75px;">
2+
<div class="container">
3+
<div class="row align-items-center g-4">
4+
<div class="col-md-6 text-center">
5+
<img
6+
class="img-fluid illustration-image"
7+
src="/images/email-illustration.svg"
8+
alt="Illustration of an email inbox"
9+
width="300"
10+
height="300"
11+
>
12+
</div>
13+
<div class="col-md-6">
14+
<div class="card rounded-0 border-0 bg-white shadow-sm p-4">
15+
<div class="card-body">
16+
<h3 class="fw-bold mb-3 fs-2">Stay ahead of licensing changes</h3>
17+
<p class="lead text-muted mb-4">
18+
Get instant notifications on evolving nursing regulations that impact your practice straight to your
19+
inbox.
20+
</p>
21+
<form id="email-subscription-form">
22+
{%- include states-select.html -%}
23+
<div class="mt-3">
24+
<div class="input-group">
25+
<input
26+
type="email"
27+
id="email"
28+
name="email"
29+
class="form-control form-control-lg text-black"
30+
placeholder="Enter your email address"
31+
required
32+
>
33+
<button
34+
type="submit"
35+
onclick="sendEmail(event)"
36+
class="btn btn-lg text-white"
37+
style="background-color: #0000ff;"
38+
>
39+
Stay informed
40+
</button>
41+
</div>
42+
</div>
43+
</form>
44+
<div id="subscription-message" class="mt-3 text-center small"></div>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
49+
</div>
50+
</div>
51+
52+
<style>
53+
.email-collection-container {
54+
background: #f2f2ff;
55+
}
56+
57+
.btn-primary {
58+
transition: all 0.3s ease;
59+
}
60+
61+
.btn-primary:hover {
62+
transform: translateY(-1px);
63+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
64+
}
65+
66+
.illustration-image {
67+
transition: transform 0.3s ease;
68+
}
69+
70+
.illustration-image:hover {
71+
transform: scale(1.02);
72+
}
73+
</style>
74+
75+
<script>
76+
function sendEmail(event) {
77+
event.preventDefault();
78+
const stateSelect = document.getElementById('state');
79+
const selectedState = stateSelect.options[stateSelect.selectedIndex].textContent;
80+
const email = document.getElementById('email').value;
81+
82+
if (!selectedState || selectedState === 'What state do you want to practice in?') {
83+
alert('Please select a state');
84+
return;
85+
}
86+
87+
if (!email) {
88+
alert('Please enter your email address');
89+
return;
90+
}
91+
92+
const mailtoUrl = `mailto:support@acls.net?subject=${encodeURIComponent('RN Mobility Email Signup')}&body=${encodeURIComponent(`Hello, I would like to sign up to receive email notifications on Nursing licensing in ${selectedState}. My email address is ${email}`)}`;
93+
window.location.href = mailtoUrl;
94+
}
95+
</script>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<select name="state" id="state" class="form-control form-control-lg">
2+
<option value="">What state do you want to practice in?</option>
3+
{%- assign states = 'Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana,Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming'
4+
| split: ','
5+
-%}
6+
{%- assign codes = 'AL,AK,AZ,AR,CA,CO,CT,DE,FL,GA,HI,ID,IL,IN,IA,KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VT,VA,WA,WV,WI,WY'
7+
| split: ','
8+
-%}
9+
10+
{%- for state in states -%}
11+
{%- assign index = forloop.index0 -%}
12+
<option value="{{ codes[index] }}">
13+
{{- state -}}
14+
</option>
15+
{%- endfor -%}
16+
</select>

source/_layouts/home.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<!-- Page content -->
1212
{{ content }}
1313
</div>
14+
{%- include email-collection.html -%}
15+
1416
{%- include footer.html -%}
1517

1618
<!-- Bootstrap JS -->

source/_layouts/other.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
{%- endif -%}
1515
{{ content }}
1616
</div>
17+
{%- include email-collection.html -%}
1718
{%- include footer.html -%}
1819

1920
<script

source/_layouts/page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
{{ content }}
1717
</div>
1818
</div>
19+
{%- include email-collection.html -%}
1920
{%- include footer.html -%}
2021

2122
<script
Lines changed: 23 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)