diff --git a/src/hmnurl/urls.go b/src/hmnurl/urls.go index 8cc63eb..a31552d 100644 --- a/src/hmnurl/urls.go +++ b/src/hmnurl/urls.go @@ -746,6 +746,10 @@ func BuildTheme(filepath string, theme string, cachebust bool) string { } func BuildUserFile(filepath string) string { + if filepath == "" { + return "" + } + filepath = strings.Trim(filepath, "/") return BuildPublic(fmt.Sprintf("media/%s", filepath), false) } diff --git a/src/templates/src/include/project_card.html b/src/templates/src/include/project_card.html index d2dd969..ad0b8c1 100644 --- a/src/templates/src/include/project_card.html +++ b/src/templates/src/include/project_card.html @@ -1,8 +1,10 @@ {{- /*gotype: git.handmade.network/hmn/hmn/src/templates.ProjectCardData*/ -}} -
-
-
+ {{ with .Project.Logo }} +
+
+
+ {{ end }}

{{ .Project.Name }}

{{ .Project.Blurb }}
diff --git a/src/templates/src/project_homepage.html b/src/templates/src/project_homepage.html index da2b24c..ca6e834 100644 --- a/src/templates/src/project_homepage.html +++ b/src/templates/src/project_homepage.html @@ -13,8 +13,14 @@ flex flex-column flex-row-ns items-start-ns flex-column-l items-stretch-l mw5-l mh3 ml0-ns mb3 overflow-hidden "> -
- {{ .Project.Name }} +
+ {{ if .Project.Logo }} + {{ .Project.Name }} + {{ else }} +
+
{{ .Project.Name }}
+
+ {{ end }}