diff --git a/assets/views/fragments/small-tn.jet.html b/assets/views/fragments/small-tn.jet.html index c4358c2..23c9678 100644 --- a/assets/views/fragments/small-tn.jet.html +++ b/assets/views/fragments/small-tn.jet.html @@ -14,20 +14,20 @@
-

- {{ .Title }} +

+ {{ .Title }}

- Deleted or Private + Deleted or Private
{{- else if .ID }} {{ include "thumbnail-dt" . }}
{{ include "thumbnail-tt" . }} - {{- if isFirstPathPart (CurrentPath, "/users") == false || isLastPathPart (CurrentPath, "/bookmarks") == true }} + {{- if isFirstPathPart (CurrentPath, "/users") == false || (isFirstPathPart (CurrentPath, "/users") == true && isLastPathPart (CurrentPath, "/bookmarks") == true) }} {{ include "thumbnail-at" . }} {{- end }}
diff --git a/server/template/templateFunctions.go b/server/template/templateFunctions.go index c4fa824..5bdc483 100644 --- a/server/template/templateFunctions.go +++ b/server/template/templateFunctions.go @@ -323,6 +323,12 @@ func IsFirstPathPart(currentPath, pathToCheck string) bool { // IsLastPathPart checks if the last part of the current path matches the given path func IsLastPathPart(currentPath, pathToCheck string) bool { + // Parse the currentPath to remove query parameters + u, err := url.Parse(currentPath) + if err == nil { + currentPath = u.Path + } + // Trim any trailing slashes from both paths currentPath = strings.TrimRight(currentPath, "/") pathToCheck = strings.TrimRight(pathToCheck, "/")