instagram cta changes, mail fixes

This commit is contained in:
2026-05-04 23:47:26 +12:00
parent d115a8db7c
commit 04bca98ef8
6 changed files with 80 additions and 70 deletions
+3 -1
View File
@@ -7,7 +7,9 @@ POSTGRES_PASSWORD=gw_Pg_7Jm9!Qx4#Ld2@Vr8
POSTGRES_PASSWORD_URLENCODED=gw_Pg_7Jm9%21Qx4%23Ld2%40Vr8
RESEND_API_KEY=re_hcDByLp8_HEBW93wDirr7o9g16FgCeYNF
OWNER_EMAIL=mattcohen0@gmail.com
OWNER_EMAIL=info@goodwalk.co.nz
OWNER_BCC=mattcohen0@gmail.com
CLIENT_BCC=mattcohen0@gmail.com
FROM_EMAIL=GoodWalk <info@goodwalk.co.nz>
REPLY_TO=info@goodwalk.co.nz
ENABLE_GENERAL_ENQUIRIES=false
+2
View File
@@ -31,6 +31,8 @@ services:
APP_VERSION: ${APP_VERSION:-4.0.2}
RESEND_API_KEY: ${RESEND_API_KEY}
OWNER_EMAIL: ${OWNER_EMAIL}
OWNER_BCC: ${OWNER_BCC:-}
CLIENT_BCC: ${CLIENT_BCC:-}
FROM_EMAIL: ${FROM_EMAIL:-GoodWalk <bookings@goodwalk.co.nz>}
REPLY_TO: ${REPLY_TO:-aless@goodwalk.co.nz}
ENABLE_GENERAL_ENQUIRIES: ${ENABLE_GENERAL_ENQUIRIES:-false}
+4 -2
View File
@@ -24,8 +24,10 @@ services:
APP_VERSION: ${APP_VERSION:-4.0.2}
RESEND_API_KEY: ${RESEND_API_KEY}
OWNER_EMAIL: ${OWNER_EMAIL}
FROM_EMAIL: ${FROM_EMAIL:-GoodWalk <bookings@goodwalk.co.nz>}
REPLY_TO: ${REPLY_TO:-aless@goodwalk.co.nz}
OWNER_BCC: ${OWNER_BCC:-}
CLIENT_BCC: ${CLIENT_BCC:-}
FROM_EMAIL: ${FROM_EMAIL:-GoodWalk <info@goodwalk.co.nz>}
REPLY_TO: ${REPLY_TO:-info@goodwalk.co.nz}
ENABLE_GENERAL_ENQUIRIES: ${ENABLE_GENERAL_ENQUIRIES:-false}
TZ: ${TZ:-Pacific/Auckland}
restart: unless-stopped
+33 -19
View File
@@ -89,6 +89,8 @@ def _load_config() -> dict:
"owner_email": os.environ["OWNER_EMAIL"],
"from_email": os.environ.get("FROM_EMAIL", "GoodWalk <bookings@goodwalk.co.nz>"),
"reply_to": os.environ.get("REPLY_TO", "aless@goodwalk.co.nz"),
"owner_bcc": os.environ.get("OWNER_BCC", "example@example.com").strip(),
"client_bcc": os.environ.get("CLIENT_BCC", "").strip(),
"enable_general_enquiries": os.environ.get("ENABLE_GENERAL_ENQUIRIES", "false").strip().lower() in {"1", "true", "yes", "on", "enabled"},
"max_attempts": max(1, int(os.environ.get("MAIL_MAX_ATTEMPTS", "3"))),
"form_min_seconds": max(1, int(os.environ.get("FORM_MIN_SECONDS", "4"))),
@@ -104,6 +106,8 @@ _config = _load_config()
APP_VERSION = os.environ.get("APP_VERSION", "unknown")
resend.api_key = _config["resend_api_key"]
OWNER_EMAIL = _config["owner_email"]
OWNER_BCC = _config["owner_bcc"]
CLIENT_BCC = _config["client_bcc"]
FROM_EMAIL = _config["from_email"]
REPLY_TO = _config["reply_to"]
ENABLE_GENERAL_ENQUIRIES = _config["enable_general_enquiries"]
@@ -118,12 +122,14 @@ RATE_LIMIT_MIN_INTERVAL_SECONDS = _config["rate_limit_min_interval_seconds"]
LOGO_URL = "https://www.goodwalk.co.nz/images/goodwalk-auckland-dog-walking-logo.png"
logger.info(
"Mail API config: version=%r timezone=%r from=%r reply_to=%r owner=%r general_enquiries=%r max_attempts=%d form_min=%ss form_max=%ss rate_window=%ss per_ip=%d per_email=%d min_interval=%ss",
"Mail API config: version=%r timezone=%r from=%r reply_to=%r owner=%r owner_bcc=%r client_bcc=%r general_enquiries=%r max_attempts=%d form_min=%ss form_max=%ss rate_window=%ss per_ip=%d per_email=%d min_interval=%ss",
APP_VERSION,
os.environ.get("TZ", "system-default"),
FROM_EMAIL,
REPLY_TO,
OWNER_EMAIL,
OWNER_BCC,
CLIENT_BCC,
ENABLE_GENERAL_ENQUIRIES,
MAX_SEND_ATTEMPTS,
FORM_MIN_SECONDS,
@@ -891,15 +897,19 @@ async def submit_booking(data: BookingSubmission, request: Request):
failures: list[dict] = []
client_payload = {
"from": FROM_EMAIL,
"to": [data.email],
"reply_to": REPLY_TO,
"subject": f"We received your {'general enquiry' if _is_general_enquiry(data) else 'enquiry'}, {first_name}! 🐾",
"html": client_email(data),
}
if CLIENT_BCC:
client_payload["bcc"] = [CLIENT_BCC]
try:
await _send_email(
{
"from": FROM_EMAIL,
"to": [data.email],
"reply_to": REPLY_TO,
"subject": f"We received your {'general enquiry' if _is_general_enquiry(data) else 'enquiry'}, {first_name}! 🐾",
"html": client_email(data),
},
client_payload,
label="client_email",
request_id=request_id,
)
@@ -911,19 +921,23 @@ async def submit_booking(data: BookingSubmission, request: Request):
"status": getattr(exc, "status_code", None) or getattr(exc, "code", None),
})
owner_payload = {
"from": FROM_EMAIL,
"to": [OWNER_EMAIL],
"reply_to": data.email,
"subject": (
f"New GoodWalk general enquiry — {data.fullName}"
if _is_general_enquiry(data)
else f"New GoodWalk lead — {data.fullName} ({data.petName})"
),
"html": owner_email(data, ip, browser),
}
if OWNER_BCC:
owner_payload["bcc"] = [OWNER_BCC]
try:
await _send_email(
{
"from": FROM_EMAIL,
"to": [OWNER_EMAIL],
"reply_to": data.email,
"subject": (
f"New GoodWalk general enquiry — {data.fullName}"
if _is_general_enquiry(data)
else f"New GoodWalk lead — {data.fullName} ({data.petName})"
),
"html": owner_email(data, ip, browser),
},
owner_payload,
label="owner_email",
request_id=request_id,
)
+38 -48
View File
@@ -4,7 +4,7 @@
export let instagram: HomePageContent['instagram'];
const dogCutoutSrc = '/images/smiling-dog-cutout.webp';
const dogCutoutSrc = '/images/smiling-dogs-instagram-cta.png';
</script>
<section id="instagram">
@@ -30,7 +30,7 @@
<style>
#instagram {
overflow: visible;
padding-bottom: 102px;
padding-bottom: 40px;
}
.instagram-stage {
@@ -40,8 +40,10 @@
}
.instagram-panel {
padding: 42px 44px 112px;
border-radius: 32px;
position: relative;
min-height: 150px;
padding: 24px 320px 24px 44px;
border-radius: 24px;
background:
radial-gradient(circle at top left, rgba(255, 255, 255, 0.52), transparent 42%),
linear-gradient(135deg, rgba(255, 252, 242, 0.98), rgba(255, 243, 198, 0.96));
@@ -52,75 +54,62 @@
}
.instagram-copy {
padding-top: 10px;
max-width: 620px;
margin: 0 auto;
text-align: center;
max-width: 580px;
margin: 0;
text-align: left;
display: flex;
flex-direction: column;
align-items: flex-start;
}
.instagram-kicker {
display: inline-flex;
margin-bottom: 16px;
padding: 8px 14px;
margin-bottom: 10px;
padding: 6px 12px;
border-radius: 999px;
background: rgba(33, 48, 33, 0.08);
color: var(--green);
font-size: 12px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.instagram-copy :global(h2) {
max-width: 12ch;
margin-left: auto;
margin-right: auto;
max-width: none;
margin: 0 0 6px;
font-size: 22px;
line-height: 1.2;
}
.instagram-blurb {
max-width: 520px;
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
margin: 0;
font-size: 14px;
}
.instagram-button {
margin-top: 28px;
margin-top: 14px;
position: relative;
z-index: 1;
}
.instagram-dog-wrap {
position: absolute;
left: 50%;
bottom: -74px;
right: 24px;
bottom: 0;
display: flex;
align-items: flex-end;
justify-content: center;
width: clamp(300px, 36vw, 430px);
width: 280px;
pointer-events: none;
transform: translateX(-50%);
z-index: 1;
}
.instagram-dog-wrap::before {
content: '';
position: absolute;
left: 50%;
bottom: 54px;
width: 92%;
height: 56%;
border-radius: 999px 999px 40px 40px;
background:
radial-gradient(circle at 50% 35%, rgba(255, 244, 194, 0.95), rgba(255, 224, 122, 0.88));
transform: translateX(-50%);
filter: blur(2px);
z-index: -1;
z-index: 0;
}
.instagram-dog {
display: block;
width: 100%;
height: auto;
filter: drop-shadow(0 20px 28px rgba(33, 48, 33, 0.16));
}
@media (min-width: 1800px) {
@@ -131,24 +120,31 @@
@media (max-width: 768px) {
#instagram {
padding-bottom: 76px;
padding-bottom: 120px;
}
.instagram-panel {
padding: 30px 24px 120px;
padding: 30px 24px 180px;
border-radius: 28px;
min-height: 0;
}
.instagram-copy {
max-width: none;
margin: 0 auto;
text-align: center;
align-items: center;
}
.instagram-copy :global(h2) {
max-width: none;
font-size: inherit;
line-height: inherit;
}
.instagram-blurb {
max-width: none;
font-size: inherit;
margin-left: auto;
margin-right: auto;
}
@@ -160,17 +156,11 @@
.instagram-dog-wrap {
left: 50%;
right: auto;
bottom: -10px;
bottom: -80px;
width: min(260px, calc(100% - 40px));
transform: translateX(-50%);
}
.instagram-dog-wrap::before {
width: 86%;
height: 52%;
bottom: 8px;
}
.instagram-dog {
width: 100%;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB