mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-22 08:46:22 +03:00
page handler
This commit is contained in:
parent
06a28ecbc9
commit
253988c4eb
3 changed files with 36 additions and 0 deletions
7
web/pages/about.go
Normal file
7
web/pages/about.go
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package page
|
||||||
|
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
|
func AboutHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFile(w, r, "web/src/about.html")
|
||||||
|
}
|
22
web/pages/index.go
Normal file
22
web/pages/index.go
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
package page
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/Redume/EveryNasa/functions"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GalleryHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
con := functions.Connected()
|
||||||
|
if con == false {
|
||||||
|
http.ServeFile(w, r, "web/src/errors/504.html")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if r.URL.Path != "/" {
|
||||||
|
http.ServeFile(w, r, "web/src/errors/404.html")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
http.ServeFile(w, r, "web/src/gallery.html")
|
||||||
|
}
|
7
web/pages/settings.go
Normal file
7
web/pages/settings.go
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package page
|
||||||
|
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
|
func SettingsHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFile(w, r, "web/src/settings.html")
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue