godash/server/routes.go
2022-10-20 10:31:28 +02:00

20 lines
442 B
Go

package server
import (
"launchpad/bookmark"
"launchpad/files"
"net/http"
)
type LaunchpadInformation struct {
Title string
Bookmarks []bookmark.Bookmark
}
func launchpad(w http.ResponseWriter, r *http.Request) {
files.ParseHtml(w, "index.gohtml", LaunchpadInformation{Title: "Launchpad", Bookmarks: bookmark.Bookmarks})
}
func serveStyleCss(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "static/style.css")
}