Cleaned up breadcrumbs
This commit is contained in:
parent
5d5e84d7de
commit
ae12ef0e8c
|
@ -23,12 +23,7 @@
|
||||||
<div class="post-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} {{ .Classes }}">
|
<div class="post-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} {{ .Classes }}">
|
||||||
<img class="avatar-icon mr2" src="{{ .User.AvatarUrl }}">
|
<img class="avatar-icon mr2" src="{{ .User.AvatarUrl }}">
|
||||||
<div class="flex-grow-1 overflow-hidden">
|
<div class="flex-grow-1 overflow-hidden">
|
||||||
<div class="breadcrumbs">
|
{{ template "breadcrumbs.html" .Breadcrumbs }}
|
||||||
{{ range $i, $breadcrumb := .Breadcrumbs }}
|
|
||||||
{{ if gt $i 0 }} » {{ end }}
|
|
||||||
<a href="{{ $breadcrumb.Url }}">{{ $breadcrumb.Name }}</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
<div class="title nowrap truncate"><a href="{{ .Url }}" title="{{ .Preview }}">{{ if .PostTypePrefix }}{{ .PostTypePrefix }}: {{ end }}{{ .Title }}</a></div>
|
<div class="title nowrap truncate"><a href="{{ .Url }}" title="{{ .Preview }}">{{ if .PostTypePrefix }}{{ .PostTypePrefix }}: {{ end }}{{ .Title }}</a></div>
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<a class="user" href="{{ .User.ProfileUrl }}">{{ .User.Name }}</a> — {{ timehtml (relativedate .Date) .Date }}
|
<a class="user" href="{{ .User.ProfileUrl }}">{{ .User.Name }}</a> — {{ timehtml (relativedate .Date) .Date }}
|
||||||
|
|
|
@ -7,12 +7,6 @@ It should be called with ThreadListItem.
|
||||||
<div class="thread-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} post-list-bg-odd {{ .Classes }}">
|
<div class="thread-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} post-list-bg-odd {{ .Classes }}">
|
||||||
<img class="avatar-icon mr2" src="{{ .FirstUser.AvatarUrl }}">
|
<img class="avatar-icon mr2" src="{{ .FirstUser.AvatarUrl }}">
|
||||||
<div class="flex-grow-1 overflow-hidden">
|
<div class="flex-grow-1 overflow-hidden">
|
||||||
<div class="breadcrumbs">
|
|
||||||
{{ range $i, $breadcrumb := .Breadcrumbs }}
|
|
||||||
{{ if gt $i 0 }} » {{ end }}
|
|
||||||
<a href="{{ $breadcrumb.Url }}">{{ $breadcrumb.Name }}</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
<div class="title nowrap truncate"><a href="{{ .Url }}">{{ .Title }}</a></div>
|
<div class="title nowrap truncate"><a href="{{ .Url }}">{{ .Title }}</a></div>
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<a class="user" href="{{ .FirstUser.ProfileUrl }}">{{ .FirstUser.Name }}</a> — {{ timehtml (relativedate .FirstDate) .FirstDate }}
|
<a class="user" href="{{ .FirstUser.ProfileUrl }}">{{ .FirstUser.Name }}</a> — {{ timehtml (relativedate .FirstDate) .FirstDate }}
|
||||||
|
|
|
@ -291,12 +291,6 @@
|
||||||
<div class="post-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} {{ .Classes }}">
|
<div class="post-list-item flex items-center ph3 pv2 {{ if .Unread }}unread{{ else }}read{{ end }} {{ .Classes }}">
|
||||||
<img class="avatar-icon mr2" src="{{ .User.AvatarUrl }}">
|
<img class="avatar-icon mr2" src="{{ .User.AvatarUrl }}">
|
||||||
<div class="flex-grow-1 overflow-hidden">
|
<div class="flex-grow-1 overflow-hidden">
|
||||||
<div class="breadcrumbs">
|
|
||||||
{{ range $i, $breadcrumb := .Breadcrumbs }}
|
|
||||||
{{ if gt $i 0 }} » {{ end }}
|
|
||||||
<a href="{{ $breadcrumb.Url }}">{{ $breadcrumb.Name }}</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
<div class="title nowrap truncate"><a href="{{ .Url }}" title="{{ .Preview }}">{{ .Title }}</a></div>
|
<div class="title nowrap truncate"><a href="{{ .Url }}" title="{{ .Preview }}">{{ .Title }}</a></div>
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<a class="user" href="{{ .User.ProfileUrl }}">{{ .User.Name }}</a> — {{ timehtml (relativedate .Date) .Date }}
|
<a class="user" href="{{ .User.ProfileUrl }}">{{ .User.Name }}</a> — {{ timehtml (relativedate .Date) .Date }}
|
||||||
|
|
|
@ -192,9 +192,8 @@ type PostListItem struct {
|
||||||
|
|
||||||
// Data from thread_list_item.html
|
// Data from thread_list_item.html
|
||||||
type ThreadListItem struct {
|
type ThreadListItem struct {
|
||||||
Title string
|
Title string
|
||||||
Url string
|
Url string
|
||||||
Breadcrumbs []Breadcrumb
|
|
||||||
|
|
||||||
FirstUser User
|
FirstUser User
|
||||||
FirstDate time.Time
|
FirstDate time.Time
|
||||||
|
|
Loading…
Reference in New Issue