feat(component): add email obfuscation component
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
interface Props {
|
||||||
|
email: string;
|
||||||
|
obfuscatedText?: string;
|
||||||
|
class?: string;
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
email,
|
||||||
|
obfuscatedText = email,
|
||||||
|
class: className,
|
||||||
|
id
|
||||||
|
} = Astro.props;
|
||||||
|
|
||||||
|
const spanId = id ?? `email-obfuscation-${Math.random().toString(36).slice(2, 10)}`;
|
||||||
|
---
|
||||||
|
|
||||||
|
<span id={spanId} class={className}>{obfuscatedText}</span><script type="text/javascript" define:vars={{ email, spanId }}>
|
||||||
|
(() => {
|
||||||
|
const emailSpan = document.getElementById(spanId);
|
||||||
|
|
||||||
|
if (!emailSpan) return;
|
||||||
|
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = `mailto:${email}`;
|
||||||
|
link.textContent = email;
|
||||||
|
|
||||||
|
emailSpan.textContent = '';
|
||||||
|
emailSpan.appendChild(link);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
import Button from '../Button.astro';
|
import Button from '../Button.astro';
|
||||||
|
import EmailObfuscation from '../EmailObfuscation.astro';
|
||||||
const groups = [
|
const groups = [
|
||||||
{
|
{
|
||||||
title: 'Board Certified Behavioral Analysts & Psychologists',
|
title: 'Board Certified Behavioral Analysts & Psychologists',
|
||||||
@@ -68,7 +69,7 @@ const groups = [
|
|||||||
<p class="eyebrow">Join the AIA Team!</p>
|
<p class="eyebrow">Join the AIA Team!</p>
|
||||||
<h2>Employment Opportunities</h2>
|
<h2>Employment Opportunities</h2>
|
||||||
<p>Apply online to join the AIA team! At the Arizona Institute for Autism (AIA) we are on a mission to improve special education and strengthen communities throughout Arizona.</p>
|
<p>Apply online to join the AIA team! At the Arizona Institute for Autism (AIA) we are on a mission to improve special education and strengthen communities throughout Arizona.</p>
|
||||||
<p>Our talented and passionate employees are a critical piece to the high-quality ABA therapy we provide along with our commitment to behavioral health, school solutions, and community outreach. For questions regarding open positions, please contact us at <a href="mailto:hr@azinstitute4autism.com">hr@azinstitute4autism.com</a>.</p>
|
<p>Our talented and passionate employees are a critical piece to the high-quality ABA therapy we provide along with our commitment to behavioral health, school solutions, and community outreach. For questions regarding open positions, please contact us at <EmailObfuscation email="hr@azinstitute4autism.com" obfuscatedText="hr [at] abaclinicaz [dot] com" class="team-email" />.</p>
|
||||||
<Button href="/careers">View Open Positions</Button>
|
<Button href="/careers">View Open Positions</Button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -89,6 +90,7 @@ const groups = [
|
|||||||
.team-member p { font-size: .85rem; margin: 0; }
|
.team-member p { font-size: .85rem; margin: 0; }
|
||||||
.team-careers { padding-block: 5rem; }
|
.team-careers { padding-block: 5rem; }
|
||||||
.team-careers :global(.content-button) { margin-left: 50%; margin-top: 4rem; translate: -50%; }
|
.team-careers :global(.content-button) { margin-left: 50%; margin-top: 4rem; translate: -50%; }
|
||||||
|
.team-email { font-weight: 700; }
|
||||||
@media (max-width: 950px) {
|
@media (max-width: 950px) {
|
||||||
.team-member { flex-basis: min(100%, 227px); }
|
.team-member { flex-basis: min(100%, 227px); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ draft: false
|
|||||||
---
|
---
|
||||||
|
|
||||||
import Button from '../../../components/Button.astro';
|
import Button from '../../../components/Button.astro';
|
||||||
|
import EmailObfuscation from '../../../components/EmailObfuscation.astro';
|
||||||
|
|
||||||
## Learner Social Club
|
## Learner Social Club
|
||||||
|
|
||||||
@@ -50,6 +51,6 @@ The Learner Social Club currently serves youth learners aged 8–17 years . Our
|
|||||||
|
|
||||||
Interested in Trying Out Our Program?
|
Interested in Trying Out Our Program?
|
||||||
|
|
||||||
Get a 1-Day Trial Pass by emailing us at info [at] azinstitute4autism [dot] com .
|
Get a 1-Day Trial Pass by emailing us at <EmailObfuscation email="info@azinstitute4autism.com" obfuscatedText="info [at] azinstitute4autism [dot] com" />.
|
||||||
|
|
||||||
<Button href="https://form.jotform.com/231638510219149" target="_blank" center>Enroll Now</Button>
|
<Button href="https://form.jotform.com/231638510219149" target="_blank" center>Enroll Now</Button>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ draft: false
|
|||||||
---
|
---
|
||||||
|
|
||||||
import Button from '../../../components/Button.astro';
|
import Button from '../../../components/Button.astro';
|
||||||
|
import EmailObfuscation from '../../../components/EmailObfuscation.astro';
|
||||||
|
|
||||||
## Learner Social Club
|
## Learner Social Club
|
||||||
|
|
||||||
@@ -58,6 +59,6 @@ Learner Social Club actualmente atiende a jóvenes de 8 a 17 años . Nuestras op
|
|||||||
|
|
||||||
¿Le interesa probar nuestro programa?
|
¿Le interesa probar nuestro programa?
|
||||||
|
|
||||||
Obtenga un pase de prueba de 1 día enviándonos un correo electrónico a info [at] azinstitute4autism [dot] com .
|
Obtenga un pase de prueba de 1 día enviándonos un correo electrónico a <EmailObfuscation email="info@azinstitute4autism.com" obfuscatedText="info [at] azinstitute4autism [dot] com" />.
|
||||||
|
|
||||||
<Button href="https://form.jotform.com/231638510219149" target="_blank">Enroll Now</Button>
|
<Button href="https://form.jotform.com/231638510219149" target="_blank">Enroll Now</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user