Add latest commit in repo viewer

This commit is contained in:
Unknown 2014-03-17 00:57:18 -04:00
parent 664bbe4f54
commit 0f68930892
6 changed files with 57 additions and 3 deletions

View file

@ -19,6 +19,7 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
"AppVer": func() string {
return AppVer
},
"AvatarLink": AvatarLink,
"str2html": Str2html,
"TimeSince": TimeSince,
"FileSize": FileSize,

View file

@ -22,6 +22,11 @@ func EncodeMd5(str string) string {
return hex.EncodeToString(m.Sum(nil))
}
// AvatarLink returns avatar link by given e-mail.
func AvatarLink(email string) string {
return "http://1.gravatar.com/avatar/" + EncodeMd5(email)
}
// Seconds-based time units
const (
Minute = 60