From 28740970b9909a0de0e6f757faec809a5b385a22 Mon Sep 17 00:00:00 2001 From: Joshua Herring Date: Tue, 26 May 2026 11:58:14 -0400 Subject: [PATCH] initial commit --- .gitignore | 2 + go.mod | 3 ++ main.go | 25 +++++++++++++ pages/main_form_page.go | 83 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 .gitignore create mode 100644 go.mod create mode 100644 main.go create mode 100644 pages/main_form_page.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c737dd5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +faculty_media_report +prompts diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8ab3d6a --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module faculty_media_report + +go 1.26 diff --git a/main.go b/main.go new file mode 100644 index 0000000..0e0ef84 --- /dev/null +++ b/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "net/http" + "net/http/cgi" + "os" + + "faculty_media_report/pages" +) + +func handler(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/html; charset=utf-8") + fmt.Fprint(w, pages.MainFormPage) +} + +func main() { + if os.Getenv("GATEWAY_INTERFACE") != "" { + cgi.Serve(http.HandlerFunc(handler)) + } else { + http.HandleFunc("/", handler) + fmt.Fprintln(os.Stderr, "Running in standalone mode on :8080") + http.ListenAndServe(":8080", nil) + } +} diff --git a/pages/main_form_page.go b/pages/main_form_page.go new file mode 100644 index 0000000..650933b --- /dev/null +++ b/pages/main_form_page.go @@ -0,0 +1,83 @@ +package pages + +const MainFormPage = ` + + + + + Faculty Media Report + + + +
+

Faculty Media Report

+ +
+ + +
+ Scholarship +

Please enter citations for recent publications here:

+ +
+ + +
+ +
+ + +
+
+ + +
+ Talks and Activities +

Please tell us about any recent talks and activities here:

+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+ Media Appearances +

Please tell us about any recent media appearances you have made:

+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + + +
+
+ + + +` +