chore: consolidate contact templates to single location
Remove duplicate contact templates: - templates/partials/contact_success.html (old, 1.2KB) - templates/partials/contact_error.html (old, 1.1KB) The active templates remain in templates/partials/contact/: - contact-success.html - contact-error.html Updated contact.go to use the new template names to match cv_contact.go. The old templates had inline styles and were larger; the new ones use external CSS and are more maintainable. All contact form tests pass (7/7).
This commit is contained in:
@@ -139,7 +139,7 @@ func (h *ContactHandler) renderSuccess(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
tmpl, err := h.templates.Render("contact_success.html")
|
||||
tmpl, err := h.templates.Render("contact-success")
|
||||
if err != nil {
|
||||
log.Printf("ERROR loading success template: %v", err)
|
||||
// Fallback to simple HTML
|
||||
@@ -168,7 +168,7 @@ func (h *ContactHandler) renderError(w http.ResponseWriter, r *http.Request, mes
|
||||
"Message": message,
|
||||
}
|
||||
|
||||
tmpl, err := h.templates.Render("contact_error.html")
|
||||
tmpl, err := h.templates.Render("contact-error")
|
||||
if err != nil {
|
||||
log.Printf("ERROR loading error template: %v", err)
|
||||
// Fallback to simple HTML
|
||||
|
||||
Reference in New Issue
Block a user