diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-22 09:11:13 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-22 09:11:13 +0300 |
| commit | 0441373602305fed3534020cf426681faa83a59b (patch) | |
| tree | ee3c780bd43eeeae52fa2247e99a5311fcf821ed /src/components | |
| parent | aecf74e6648e9089b17716acceee6626217169dc (diff) | |
Update seo
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/widgets/Header.astro | 4 | ||||
| -rw-r--r-- | src/components/widgets/Steps2.astro | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index f67ed7e..277411b 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -6,7 +6,9 @@ import { Icon } from 'astro-icon/components'; <div class="max-w-7xl mx-auto flex items-center justify-center"> <div class="flex items-center space-x-2"> <Icon name="tabler:mail" class="w-4 h-4" /> - <span class="text-sm font-medium">grestech.biuro@gmail.com</span> + <a href="mailto:grestech.biuro@gmail.com" class="text-sm font-medium hover:text-gray-300 transition-colors"> + grestech.biuro@gmail.com + </a> </div> </div> </header> diff --git a/src/components/widgets/Steps2.astro b/src/components/widgets/Steps2.astro index 8f7afb5..b37fbc0 100644 --- a/src/components/widgets/Steps2.astro +++ b/src/components/widgets/Steps2.astro @@ -18,6 +18,14 @@ const { classes = {}, bg = await Astro.slots.render('bg'), } = Astro.props; + +// Function to detect and wrap email addresses in mailto links +function processEmailLinks(text: string): string { + const emailRegex = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g; + return text.replace(emailRegex, (email) => { + return `<a href="mailto:${email}" class="text-primary hover:text-secondary transition-colors">${email}</a>`; + }); +} --- <WidgetWrapper id={id} isDark={isDark} containerClass={`max-w-6xl mx-auto ${classes?.container ?? ''}`} bg={bg}> @@ -60,7 +68,7 @@ const { </div> <div class="pl-4 rtl:pl-0 rtl:pr-4"> <h3 class="mb-4 text-xl font-semibold font-heading" set:html={title2} /> - <p class="text-muted dark:text-gray-400" set:html={description} /> + <p class="text-muted dark:text-gray-400" set:html={description ? processEmailLinks(description) : ''} /> </div> </li> )) |
