Files
westfarn 03bb01664f
Unit Tests / test (push) Successful in 12s
Align emails with site UX (#26) (#27)
## Summary
- Closes #26
- Shared dark branded email base (`emails/base_email.html`) matching site tokens: `#0a0a0a` / `#1a1a1a`, cyan `#00f3ff`, purple `#bc13fe`, logo, Inter-safe stack
- Refactors contact, marketing (+ preview), and invoice pay-link HTML/text to extend that base; drops Materialize CDN
- Adds `PUBLIC_SITE_URL` + `email_brand_context()` for absolute logo/footer links

## Email renders

### Contact
![Contact email](https://git.aimloperations.com/ai_ml_operations/company_site/raw/branch/feature/26-brand-email-ux/docs/email-previews/contact.png)

### Marketing
![Marketing email](https://git.aimloperations.com/ai_ml_operations/company_site/raw/branch/feature/26-brand-email-ux/docs/email-previews/marketing.png)

### Invoice pay link
![Invoice email](https://git.aimloperations.com/ai_ml_operations/company_site/raw/branch/feature/26-brand-email-ux/docs/email-previews/invoice.png)

Also see `docs/email-previews/`.

## Test plan
- [ ] Preview a marketing `EmailMessage` in admin / `/preview_email/<pk>/` — dark brand, logo, no Materialize
- [ ] Submit contact form (or render `emails/contact_email.html`) — subject/from/message fields + branded footer
- [ ] Send (or dry-render) invoice pay-link email — cyan CTA, amount accent
- [ ] Confirm logo loads from `PUBLIC_SITE_URL/static/public/img/logo.png` in a real clientReviewed-on: #27
2026-07-31 17:08:57 -07:00

50 lines
1.4 KiB
Bash

# Local development environment file (copy to .env).
# For production server values, use .env.prod.example instead.
DJANGO_ENV=dev
DJANGO_DEBUG=true
DJANGO_SECRET_KEY=change-me-for-local-development
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
# Optional; when unset, http:// origins are derived for local hosts.
# DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
# Database (docker-compose sets DATABASE_URL for the web service)
DATABASE_URL=postgres://company_site:company_site@db:5432/company_site
# DB_HOST=db
# DB_PORT=5432
# DB_NAME=company_site
# DB_USER=company_site
# DB_PASSWORD=company_site
# Logging
# DJANGO_LOG_LEVEL=DEBUG
# Analytics
TIANJI_ENABLED=false
TIANJI_TRACKER_URL=https://tianji.aimloperations.com/tracker.js
TIANJI_WEBSITE_ID=
# reCAPTCHA
RECAPTCHA_PUBLIC_KEY=
RECAPTCHA_PRIVATE_KEY=
# Email (SMTP2GO)
EMAIL_HOST=mail.smtp2go.com
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_PORT=2525
EMAIL_USE_TLS=true
# DEFAULT_FROM_EMAIL=AI ML Operations, LLC <info@aimloperations.com>
# Absolute origin for email logo / footer links
PUBLIC_SITE_URL=https://aimloperations.com
# DEFAULT_FROM_EMAIL=AI ML Operations, LLC <info@aimloperations.com>
# Stripe (test keys from https://dashboard.stripe.com/test/apikeys)
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
# From `stripe listen` or Dashboard → Developers → Webhooks
STRIPE_WEBHOOK_SECRET=
# Gunicorn
GUNICORN_WORKERS=2
GUNICORN_BIND=0.0.0.0:8000