-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from mearashadowfax/add-i18n
Add internationalization (i18n) features and refactor codebase
- Loading branch information
Showing
36 changed files
with
829 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ import TextInput from "../ui/forms/input/TextInput.astro"; | |
import EmailContactInput from "../ui/forms/input/EmailContactInput.astro"; | ||
import PhoneInput from "../ui/forms/input/PhoneInput.astro"; | ||
import TextAreaInput from "../ui/forms/input/TextAreaInput.astro"; | ||
import Icon from "../ui/icons/Icon.astro"; | ||
// Define the variables that will be used in this component | ||
const title: string = "Contact us"; | ||
|
@@ -82,19 +83,7 @@ const formSubTitle: string = "We'll get back to you in 1-2 business days."; | |
linkTitle="Visit guides & tutorials" | ||
linkURL="#" | ||
isArrowVisible={true} | ||
><svg | ||
class="mt-1.5 h-6 w-6 flex-shrink-0 text-neutral-600 dark:text-neutral-400" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke-width="1.5" | ||
stroke="currentColor" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" | ||
></path> | ||
</svg> | ||
><Icon name="question" /> | ||
</ContactIconBlock> | ||
|
||
<ContactIconBlock | ||
|
@@ -104,43 +93,15 @@ const formSubTitle: string = "We'll get back to you in 1-2 business days."; | |
linkTitle="Visit FAQ" | ||
linkURL="#" | ||
isArrowVisible={true} | ||
><svg | ||
class="mt-1.5 h-6 w-6 flex-shrink-0 text-neutral-600 dark:text-neutral-400" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke-width="1.5" | ||
stroke="currentColor" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
d="M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155" | ||
></path> | ||
</svg> | ||
><Icon name="chatBubble" /> | ||
</ContactIconBlock> | ||
|
||
<ContactIconBlock | ||
heading="Visit our office" | ||
content="UK ScrewFast" | ||
isAddressVisible={true} | ||
addressContent="72 Union Terrace, E10 4PE London" | ||
><svg | ||
class="mt-1.5 h-6 w-6 flex-shrink-0 text-neutral-600 dark:text-neutral-400" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke-width="1.5" | ||
stroke="currentColor" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
d="M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z" | ||
></path> | ||
</svg> | ||
><Icon name="mapPin" /> | ||
</ContactIconBlock> | ||
|
||
<ContactIconBlock | ||
|
@@ -149,19 +110,7 @@ const formSubTitle: string = "We'll get back to you in 1-2 business days."; | |
isLinkVisible={true} | ||
linkTitle="[email protected]" | ||
linkURL="#" | ||
><svg | ||
class="mt-1.5 h-6 w-6 flex-shrink-0 text-neutral-600 dark:text-neutral-400" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke-width="1.5" | ||
stroke="currentColor" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
d="M21.75 9v.906a2.25 2.25 0 0 1-1.183 1.981l-6.478 3.488M2.25 9v.906a2.25 2.25 0 0 0 1.183 1.981l6.478 3.488m8.839 2.51-4.66-2.51m0 0-1.023-.55a2.25 2.25 0 0 0-2.134 0l-1.022.55m0 0-4.661 2.51m16.5 1.615a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V8.844a2.25 2.25 0 0 1 1.183-1.981l7.5-4.039a2.25 2.25 0 0 1 2.134 0l7.5 4.039a2.25 2.25 0 0 1 1.183 1.98V19.5Z" | ||
></path> | ||
</svg> | ||
><Icon name="envelopeOpen" /> | ||
</ContactIconBlock> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
--- | ||
// Import the necessary dependencies. | ||
import AuthBtn from "../ui/buttons/AuthBtn.astro"; | ||
import ContactIconBlock from "../ui/blocks/ContactIconBlock.astro"; | ||
import TextInput from "../ui/forms/input/TextInput.astro"; | ||
import EmailContactInput from "../ui/forms/input/EmailContactInput.astro"; | ||
import PhoneInput from "../ui/forms/input/PhoneInput.astro"; | ||
import TextAreaInput from "../ui/forms/input/TextAreaInput.astro"; | ||
import Icon from "../ui/icons/Icon.astro"; | ||
// Define the variables that will be used in this component | ||
const title: string = "Contactez-nous"; | ||
const subTitle: string = | ||
"Vous avez des questions ou souhaitez discuter d'un projet ? Contactez-nous et laissons-nous élaborer la solution parfaite avec nos outils et services."; | ||
const formTitle: string = "Remplissez le formulaire ci-dessous"; | ||
const formSubTitle: string = | ||
"Nous vous répondrons dans un délai de 1 à 2 jours ouvrables."; | ||
--- | ||
|
||
<!-- Contact Us --> | ||
<section class="mx-auto max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14"> | ||
<div class="mx-auto max-w-2xl lg:max-w-5xl"> | ||
<div class="text-center"> | ||
<h1 | ||
class="text-balance text-2xl font-bold tracking-tight text-neutral-800 dark:text-neutral-200 md:text-4xl md:leading-tight" | ||
> | ||
{title} | ||
</h1> | ||
<p class="mt-1 text-pretty text-neutral-600 dark:text-neutral-400"> | ||
{subTitle} | ||
</p> | ||
</div> | ||
|
||
<div class="mt-12 grid items-center gap-6 lg:grid-cols-2 lg:gap-16"> | ||
<div class="flex flex-col rounded-xl p-4 sm:p-6 lg:p-8"> | ||
<h2 | ||
class="mb-8 text-xl font-bold text-neutral-700 dark:text-neutral-300" | ||
> | ||
{formTitle} | ||
</h2> | ||
<!-- Form for user input with various input fields.--> | ||
<!-- Each field utilizes a different input component for the specific type of input (text, email, phone, and textarea)--> | ||
<form> | ||
<div class="grid gap-4"> | ||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2"> | ||
<TextInput | ||
id="hs-firstname-contacts" | ||
label="Prénom" | ||
name="hs-firstname-contacts" | ||
/> | ||
<TextInput | ||
id="hs-lastname-contacts" | ||
label="Nom" | ||
name="hs-firstname-contacts" | ||
/> | ||
</div> | ||
<EmailContactInput id="hs-email-contacts" /> | ||
<PhoneInput id="hs-phone-number" /> | ||
<TextAreaInput | ||
id="hs-about-contacts" | ||
label="Détails" | ||
name="hs-about-contacts" | ||
/> | ||
</div> | ||
|
||
<div class="mt-4 grid"> | ||
<AuthBtn title="Envoyer un message" /> | ||
</div> | ||
|
||
<div class="mt-3 text-center"> | ||
<p class="text-sm text-neutral-600 dark:text-neutral-400"> | ||
{formSubTitle} | ||
</p> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<!--ContactIconBlocks are used to display different methods of contacting, including visiting office, email, browsing knowledgebase, and FAQ.--> | ||
<div class="divide-y divide-neutral-300 dark:divide-neutral-700"> | ||
<ContactIconBlock | ||
heading="Base de connaissances" | ||
content="Parcourez tous nos articles de base de connaissances." | ||
isLinkVisible={true} | ||
linkTitle="Visiter les guides et tutoriels" | ||
linkURL="#" | ||
isArrowVisible={true} | ||
><Icon name="question" /> | ||
</ContactIconBlock> | ||
|
||
<ContactIconBlock | ||
heading="FAQ" | ||
content="Explorez notre FAQ pour des réponses rapides et claires aux questions courantes." | ||
isLinkVisible={true} | ||
linkTitle="Visiter la FAQ" | ||
linkURL="#" | ||
isArrowVisible={true} | ||
><Icon name="chatBubble" /> | ||
</ContactIconBlock> | ||
|
||
<ContactIconBlock | ||
heading="Visitez notre bureau" | ||
content="ScrewFast UK" | ||
isAddressVisible={true} | ||
addressContent="72 Union Terrace, E10 4PE London" | ||
><Icon name="mapPin" /> | ||
</ContactIconBlock> | ||
|
||
<ContactIconBlock | ||
heading="Contactez-nous par e-mail" | ||
content="Préférez-vous le texte écrit ? Envoyez-nous un e-mail à" | ||
isLinkVisible={true} | ||
linkTitle="[email protected]" | ||
linkURL="#" | ||
><Icon name="envelopeOpen" /> | ||
</ContactIconBlock> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.