package Webserver
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
|
|
"PersonalWebsite/Database"
|
|
)
|
|
|
|
func ViewIndex(w http.ResponseWriter, r *http.Request) {
|
|
var (
|
|
v = make(map[string]interface{})
|
|
e error
|
|
)
|
|
|
|
v["SidebarLinks"], e = Database.GetAllSidebarLinks()
|
|
if e != nil {
|
|
// TODO: Handle
|
|
log.Fatal(e)
|
|
}
|
|
|
|
ServeTemplate(w, r, "html/index.gohtml", v)
|
|
}
|