diff --git a/web/pages/about.go b/web/pages/about.go deleted file mode 100644 index bba81e7..0000000 --- a/web/pages/about.go +++ /dev/null @@ -1,28 +0,0 @@ -package page - -import ( - "github.com/Redume/EveryNasa/functions" - "net/http" - "strings" -) - -func AboutHandler(w http.ResponseWriter, r *http.Request) { - con := functions.Connected() - if con == false { - http.ServeFile(w, r, "web/src/errors/504.html") - return - } - - userAgent := r.UserAgent() - if strings.Contains(userAgent, "Mobile") { - http.ServeFile(w, r, "web/src/errors/mobile.html") - return - } - - if r.URL.Path != "/about" { - http.ServeFile(w, r, "web/src/errors/404.html") - return - } - - http.ServeFile(w, r, "web/src/about.html") -} diff --git a/web/pages/index.go b/web/pages/index.go deleted file mode 100644 index 79af089..0000000 --- a/web/pages/index.go +++ /dev/null @@ -1,29 +0,0 @@ -package page - -import ( - "github.com/Redume/EveryNasa/functions" - "net/http" - "strings" -) - -func GalleryHandler(w http.ResponseWriter, r *http.Request) { - con := functions.Connected() - if con == false { - http.ServeFile(w, r, "web/src/errors/504.html") - return - } - - userAgent := r.UserAgent() - - if strings.Contains(userAgent, "Mobile") { - http.ServeFile(w, r, "web/src/errors/mobile.html") - return - } - - if r.URL.Path != "/" { - http.ServeFile(w, r, "web/src/errors/404.html") - return - } - - http.ServeFile(w, r, "web/src/gallery.html") -} diff --git a/web/pages/settings.go b/web/pages/settings.go deleted file mode 100644 index 3114022..0000000 --- a/web/pages/settings.go +++ /dev/null @@ -1,28 +0,0 @@ -package page - -import ( - "github.com/Redume/EveryNasa/functions" - "net/http" - "strings" -) - -func SettingsHandler(w http.ResponseWriter, r *http.Request) { - con := functions.Connected() - if con == false { - http.ServeFile(w, r, "web/src/errors/504.html") - return - } - - userAgent := r.UserAgent() - if strings.Contains(userAgent, "Mobile") { - http.ServeFile(w, r, "web/src/errors/mobile.html") - return - } - - if r.URL.Path != "/settings" { - http.ServeFile(w, r, "web/src/errors/404.html") - return - } - - http.ServeFile(w, r, "web/src/settings.html") -}