From f261131d427ee84cb8848af580e7a1256973ce93 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 22 Nov 2024 21:14:28 -0800 Subject: [PATCH] Contact card details --- main.go | 4 +++ static/index.html | 79 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 80 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a1ba943..5cd75eb 100644 --- a/main.go +++ b/main.go @@ -110,6 +110,10 @@ func (ph *PHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { var allowedEnvs = []string{ "CONTACT_PHONE", + "CONTACT_SMS", + "CONTACT_IMESSAGE", + "CONTACT_WHATSAPP", + "CONTACT_PAGE_EMAIL", } func (ph *PHandler) envs() map[string]string { diff --git a/static/index.html b/static/index.html index 08080d5..880243e 100644 --- a/static/index.html +++ b/static/index.html @@ -17,6 +17,18 @@ body { a { color: inherit; text-decoration: none; + display: flex; + flex-direction: row; + align-items: center; +} + +.contact { + margin-bottom: 10px; + white-space: nowrap; +} + +.contact svg { + margin-right: 10px; } Page Ian @@ -96,14 +108,75 @@ async function pageIan() { - + + {{if .CONTACT_PHONE}} -
+ {{end}} + + {{if .CONTACT_SMS}} + + {{end}} + + {{if .CONTACT_IMESSAGE}} + + {{end}} + + {{if .CONTACT_WHATSAPP}} + + {{end}} + + {{if .CONTACT_PAGE_EMAIL}} + + {{end}} + +
+ + + + + + + +