-
Notifications
You must be signed in to change notification settings - Fork 29
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 #7 from yoanbernabeu/3-add-area-for-phone-number-a…
…nd-for-email 📦 NEW: Contact buttons (Phone + Email)
- Loading branch information
Showing
5 changed files
with
61 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
export interface Props { | ||
contact: string; | ||
phone: string; | ||
email: string; | ||
} | ||
const { contact, phone, email } = Astro.props; | ||
--- | ||
<div> | ||
<div | ||
class="mx-auto max-w-7xl py-12 px-4 text-center sm:px-6 lg:py-16 lg:px-8" | ||
> | ||
<h2 class="text-2xl font-bold tracking-tight text-indigo-300 sm:text-2xl"> | ||
<span class="block">{contact}</span> | ||
</h2> | ||
<div class="mt-5 flex justify-center"> | ||
<div class="inline-flex rounded-md shadow"> | ||
<a | ||
href={"tel://"+phone} | ||
class="inline-flex items-center justify-center rounded-md border border-transparent bg-indigo-100 px-5 py-3 text-base font-medium text-indigo-700 hover:bg-indigo-200 shadow-md hover:shadow-xl" | ||
>☎️ Call me</a | ||
> | ||
</div> | ||
<div class="ml-3 inline-flex"> | ||
<a | ||
href={"mailto://"+email} | ||
class="inline-flex items-center justify-center rounded-md border border-transparent bg-indigo-100 px-5 py-3 text-base font-medium text-indigo-700 hover:bg-indigo-200 shadow-md hover:shadow-xl" | ||
>📪 Email me</a | ||
> | ||
</div> | ||
</div> | ||
</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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
export const SUBTITLE = "A free clone of LinkTree" | ||
export const TITLE = "LinkTreeFreeClone" | ||
export const TAGLINE = "Make your own LinkTree page for free" | ||
export const TAGLINE = "Make your own LinkTree page for free" | ||
|
||
// Contacts | ||
export const contact = "Keep in touch" | ||
export const phone = "+33600000000" | ||
export const email = "[email protected]" |
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 |
---|---|---|
|
@@ -17,4 +17,9 @@ test('homepage has title and links', async ({ page }) => { | |
const blog = page.getByRole('link', { name: '📝 Blog' }); | ||
await expect(blog).toHaveAttribute('href', 'https://yoandev.co'); | ||
|
||
const phone = page.getByRole('link', { name: '☎️ Call me' }); | ||
await expect(phone).toHaveAttribute('href', 'tel://+33600000000'); | ||
|
||
const email = page.getByRole('link', { name: '📪 Email me' }); | ||
await expect(email).toHaveAttribute('href', 'mailto://[email protected]'); | ||
}); |