mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 18:31:24 +02:00
Only hide comment count if there's a target URL
This commit is contained in:
parent
8fb5de4e87
commit
bb80637e72
@ -1038,7 +1038,7 @@ details[open] .summary::after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@container widget (max-width: 550px) {
|
@container widget (max-width: 550px) {
|
||||||
.forum-post-comment-count {
|
.forum-post-autohide {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
<svg class="forum-post-list-thumbnail hide-on-mobile" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-9 -8 40 40" stroke-width="1.5" stroke="var(--color-text-subdue)">
|
<svg class="forum-post-list-thumbnail hide-on-mobile" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-9 -8 40 40" stroke-width="1.5" stroke="var(--color-text-subdue)">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" />
|
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" />
|
||||||
</svg>
|
</svg>
|
||||||
{{- else if ne .ThumbnailUrl "" }}
|
{{- else if .ThumbnailUrl }}
|
||||||
<img class="forum-post-list-thumbnail thumbnail" src="{{ .ThumbnailUrl }}" alt="" loading="lazy">
|
<img class="forum-post-list-thumbnail thumbnail" src="{{ .ThumbnailUrl }}" alt="" loading="lazy">
|
||||||
{{- else if ne "" .TargetUrl }}
|
{{- else if .TargetUrl }}
|
||||||
<svg class="forum-post-list-thumbnail hide-on-mobile" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-9 -8 40 40" stroke-width="1.5" stroke="var(--color-text-subdue)">
|
<svg class="forum-post-list-thumbnail hide-on-mobile" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-9 -8 40 40" stroke-width="1.5" stroke="var(--color-text-subdue)">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" />
|
||||||
</svg>
|
</svg>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
<div class="grow min-width-0">
|
<div class="grow min-width-0">
|
||||||
<a href="{{ .DiscussionUrl }}" class="size-title-dynamic color-primary-if-not-visited" target="_blank" rel="noreferrer">{{ .Title }}</a>
|
<a href="{{ .DiscussionUrl }}" class="size-title-dynamic color-primary-if-not-visited" target="_blank" rel="noreferrer">{{ .Title }}</a>
|
||||||
{{- if gt (len .Tags) 0 }}
|
{{- if .Tags }}
|
||||||
<div class="inline-block forum-post-tags-container">
|
<div class="inline-block forum-post-tags-container">
|
||||||
<ul class="attachments">
|
<ul class="attachments">
|
||||||
{{- range .Tags }}
|
{{- range .Tags }}
|
||||||
@ -36,8 +36,8 @@
|
|||||||
<ul class="list-horizontal-text flex-nowrap text-compact">
|
<ul class="list-horizontal-text flex-nowrap text-compact">
|
||||||
<li {{ dynamicRelativeTimeAttrs .TimePosted }}></li>
|
<li {{ dynamicRelativeTimeAttrs .TimePosted }}></li>
|
||||||
<li class="shrink-0">{{ .Score | formatApproxNumber }} <span class="forum-post-points-word">points</span></li>
|
<li class="shrink-0">{{ .Score | formatApproxNumber }} <span class="forum-post-points-word">points</span></li>
|
||||||
<li class="forum-post-comment-count shrink-0">{{ .CommentCount | formatApproxNumber }} comments</li>
|
<li class="shrink-0{{ if .TargetUrl }} forum-post-autohide{{ end }}">{{ .CommentCount | formatApproxNumber }} comments</li>
|
||||||
{{- if ne "" .TargetUrl }}
|
{{- if .TargetUrl }}
|
||||||
<li class="min-width-0"><a class="visited-indicator text-truncate block" href="{{ .TargetUrl }}" target="_blank" rel="noreferrer">{{ .TargetUrlDomain }}</a></li>
|
<li class="min-width-0"><a class="visited-indicator text-truncate block" href="{{ .TargetUrl }}" target="_blank" rel="noreferrer">{{ .TargetUrlDomain }}</a></li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user