...
 
Commits (2)
......@@ -21,13 +21,7 @@ func removeFileExtensions(path string) string {
func pageIndex(ctx PageContext) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" {
user := parseUser(r)
if err := formatTemplate(w, "index.html", IndexData{
user,
}); err != nil {
panic(err)
}
http.Redirect(w, r, "/me/images", http.StatusFound)
} else if r.URL.Path == "/favicon.ico" {
w.Header().Set("Vary", "Accept-Encoding")
w.Header().Set("Cache-Control", "public, max-age=31536000")
......
......@@ -8,7 +8,7 @@
<h2 class="title">{{.Image.Title}}</h2>
{{end}}
<a class="image" href="/{{.Image.Id}}">
<img src="/{{.Image.Id}}">
<img src="/{{.Image.Id}}.png">
</a>
{{if .IsMine}}
<p class="description fake-input" contenteditable="true" placeholder="Description"
......
......@@ -4,7 +4,7 @@
{{range .Images}}
<a class="image" href="/i/{{.Id}}">
<div class="image-container">
<img src="/{{.Id}}t">
<img src="/{{.Id}}t.png">
</div>
<div class="info">
<p>{{.OriginalName}}</p>
......