From bf465edb8c3558a8e862505b39b80547c39b1a7d Mon Sep 17 00:00:00 2001 From: bisco Date: Fri, 26 Jun 2026 09:02:48 +0200 Subject: [PATCH] fix: add contact and social icons --- tests/functional/tests/portal.spec.ts | 2 ++ wordpress/theme/azionelab/front-page.php | 11 +++++++---- wordpress/theme/azionelab/functions.php | 24 ++++++++++++++++++++++-- wordpress/theme/azionelab/style.css | 11 +++++++---- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/tests/functional/tests/portal.spec.ts b/tests/functional/tests/portal.spec.ts index 96c59e6..95e24f2 100644 --- a/tests/functional/tests/portal.spec.ts +++ b/tests/functional/tests/portal.spec.ts @@ -60,6 +60,8 @@ test("provides usable contact actions", async ({ page }) => { "https://facebook.com/", ); await expect(page.locator(".social-links .social-icon")).toHaveCount(2); + await expect(page.locator(".contact-actions .contact-icon")).toHaveCount(3); + await expect(page.locator(".contact-info .contact-icon")).toHaveCount(1); }); test("supports mobile navigation without horizontal overflow", async ({ page }) => { diff --git a/wordpress/theme/azionelab/front-page.php b/wordpress/theme/azionelab/front-page.php index 6de3f70..80f9ca8 100644 --- a/wordpress/theme/azionelab/front-page.php +++ b/wordpress/theme/azionelab/front-page.php @@ -187,7 +187,10 @@ $social_links = array_values(

Parliamone

Vieni a conoscerci

Non serve esperienza: basta la curiosità di incontrare il teatro e il gruppo.

-

Dove

+
+ +

Dove

+
@@ -203,9 +206,9 @@ $social_links = array_values(
- Scrivi una mail - Chiama - WhatsApp + Scrivi una mail + Chiama + WhatsApp
diff --git a/wordpress/theme/azionelab/functions.php b/wordpress/theme/azionelab/functions.php index da86410..172df3e 100644 --- a/wordpress/theme/azionelab/functions.php +++ b/wordpress/theme/azionelab/functions.php @@ -79,11 +79,31 @@ function azionelab_whatsapp_href( string $number ): string { function azionelab_social_icon( string $network ): string { if ( 'instagram' === $network ) { - return ''; + return ''; } if ( 'facebook' === $network ) { - return ''; + return ''; + } + + return ''; +} + +function azionelab_contact_icon( string $type ): string { + if ( 'email' === $type ) { + return ''; + } + + if ( 'phone' === $type ) { + return ''; + } + + if ( 'whatsapp' === $type ) { + return ''; + } + + if ( 'address' === $type ) { + return ''; } return ''; diff --git a/wordpress/theme/azionelab/style.css b/wordpress/theme/azionelab/style.css index 10d6c91..e8d5f1b 100644 --- a/wordpress/theme/azionelab/style.css +++ b/wordpress/theme/azionelab/style.css @@ -182,9 +182,14 @@ blockquote { margin: 2rem 0 0; padding-left: 1.5rem; border-left: 3px solid var( .contacts .eyebrow { color: var(--color-primary-soft); } .contacts .lead { color: rgba(255, 248, 239, 0.8); } .contact-grid { display: grid; gap: 2.5rem; } +.contact-info { display: grid; position: relative; margin-top: 1.6rem; padding-left: 3rem; } +.contact-info p { margin: 0; } +.contact-info .contact-icon { top: 0.1rem; left: 0; color: var(--color-sand); } .contact-actions { display: grid; gap: 0.8rem; } -.contact-action { display: grid; padding: 1rem 1.1rem; border: 1px solid rgba(255,255,255,0.18); border-radius: 0.9rem; text-decoration: none; } +.contact-action { display: grid; position: relative; padding: 1rem 1.1rem 1rem 4rem; border: 1px solid rgba(255,255,255,0.18); border-radius: 0.9rem; text-decoration: none; } .contact-action span { color: var(--color-sand); font-size: 0.78rem; text-transform: uppercase; } +.contact-icon { position: absolute; top: 1rem; left: 1.1rem; width: 2rem; height: 2rem; color: var(--color-primary-soft); } +.contact-icon-whatsapp { color: #25d366; } .social-promo { margin-top: 1.6rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 248, 239, 0.22); } .social-promo-title { margin-bottom: 0.8rem; color: var(--color-sand); font-size: 0.78rem; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; } .social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; } @@ -192,9 +197,7 @@ blockquote { margin: 2rem 0 0; padding-left: 1.5rem; border-left: 3px solid var( .social-link-instagram span { background: linear-gradient(135deg, #f58529 0%, #dd2a7b 48%, #8134af 100%); background-clip: text; color: transparent; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.55rem; font-weight: 700; } .social-link-facebook span { color: #1877f2; font-family: var(--font-sans); font-size: 1.42rem; font-weight: 850; letter-spacing: -0.05em; } .social-links a:hover { background: white; transform: translateY(-2px); } -.social-icon { width: 1.55rem; height: 1.55rem; flex: 0 0 auto; } -.social-link-instagram .social-icon { color: #dd2a7b; } -.social-link-facebook .social-icon { color: #1877f2; } +.social-icon { width: 1.85rem; height: 1.85rem; flex: 0 0 auto; } .site-footer { padding-block: 2rem; color: #f7efe4; background: var(--color-dark-text); } .site-footer a { color: #fff8ef; } .footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; font-size: 0.85rem; }