diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 4079c72..fd16a90 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -11,6 +11,7 @@ import ( "path" "strings" + "github.com/dustin/go-humanize" "github.com/sotangled/tangled/appview/auth" "github.com/sotangled/tangled/appview/db" "github.com/sotangled/tangled/types" @@ -48,6 +49,7 @@ func funcMap() template.FuncMap { } return pairs, nil }, + "timeFmt": humanize.Time, } } diff --git a/appview/pages/templates/layouts/repobase.html b/appview/pages/templates/layouts/repobase.html index 945e00a..3c3c94d 100644 --- a/appview/pages/templates/layouts/repobase.html +++ b/appview/pages/templates/layouts/repobase.html @@ -1,14 +1,16 @@ {{ define "title" }}{{ .RepoInfo.FullName }}{{ end }} {{ define "content" }} - -
-

{{ .RepoInfo.FullName }}

- {{ if .RepoInfo.Description }} -

{{ .RepoInfo.Description }}

- {{ else }} - this repo has no description - {{ end }} +
+ {{ .RepoInfo.FullName }} +
+ + {{ if .RepoInfo.Description }} + {{ .RepoInfo.Description }} + {{ else }} + this repo has no description + {{ end }} +