Skip to content

Commit

Permalink
add css
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed Jun 14, 2017
1 parent bc4911c commit c23da47
Show file tree
Hide file tree
Showing 4 changed files with 273 additions and 0 deletions.
237 changes: 237 additions & 0 deletions css.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer func(t func() time.Time) {
logger.Println(requestid, "closed after", t().Sub(t1))
}(time.Now)
log.Println(r.URL.Path, "/gh.css???")
if r.URL.Path == "/gh.css" {
log.Println("CSS")
b, err := Asset("static/gh.css")
if err == nil {
w.Header().Add("Content-Type", "test/css")
w.Write(b)
return
}
}

// abs is not absolute yet
abs := r.URL.Path[1:] // remove slash
Expand Down
Loading

0 comments on commit c23da47

Please sign in to comment.