HTML · 2188 bytes Raw Blame History
1 {{ define "feed-row" -}}
2 <li class="shithub-feed-row">
3 <a class="shithub-feed-avatar" href="/{{ .ActorUsername }}" aria-label="{{ .ActorUsername }}">
4 <img src="/avatars/{{ .ActorUsername }}" alt="" width="40" height="40">
5 </a>
6 <div class="shithub-feed-body">
7 <p class="shithub-feed-head">
8 <a href="/{{ .ActorUsername }}"><strong>{{ if .ActorDisplayName }}{{ .ActorDisplayName }}{{ else }}{{ .ActorUsername }}{{ end }}</strong></a>
9 <span>{{ .Verb }}</span>
10 {{ if .ItemURL }}<a href="{{ .ItemURL }}" class="shithub-feed-target">{{ .ItemTitle }}</a>{{ else if .ItemTitle }}<span class="shithub-feed-target">{{ .ItemTitle }}</span>{{ end }}
11 {{ if and .RepoFullName (ne .ItemTitle .RepoFullName) }}<span>in</span> <a href="{{ .RepoURL }}" class="shithub-feed-target">{{ .RepoFullName }}</a>{{ end }}
12 <time datetime="{{ .CreatedAt.Format "2006-01-02T15:04:05Z" }}">{{ relativeTime .CreatedAt }}</time>
13 </p>
14 {{ if and .SourceName (or (eq .Kind "followed_user") (eq .Kind "followed_org")) }}
15 <div class="shithub-feed-profile">
16 <a href="{{ .SourceURL }}" class="shithub-feed-profile-avatar">
17 <img src="/avatars/{{ .SourceName }}" alt="" width="44" height="44">
18 </a>
19 <div class="shithub-feed-profile-copy">
20 <a href="{{ .SourceURL }}" class="shithub-feed-profile-name">{{ .SourceName }}</a>
21 <span>{{ if eq .SourceKind "org" }}Organization{{ else }}@{{ .SourceName }}{{ end }}</span>
22 </div>
23 <a href="{{ .SourceURL }}" class="shithub-button shithub-button-small">View</a>
24 </div>
25 {{ else if .Repo }}
26 <div class="shithub-feed-repo">
27 <a href="{{ .RepoURL }}" class="shithub-feed-repo-title">{{ octicon "repo" }} {{ .RepoFullName }}</a>
28 {{ if .Repo.Description }}<p>{{ .Repo.Description }}</p>{{ end }}
29 <ul class="shithub-feed-meta">
30 {{ if .Repo.PrimaryLanguage }}<li><span class="shithub-lang-dot" aria-hidden="true"></span>{{ .Repo.PrimaryLanguage }}</li>{{ end }}
31 <li>{{ octicon "star" }} {{ .Repo.StarCount }}</li>
32 <li>{{ octicon "repo-forked" }} {{ .Repo.ForkCount }}</li>
33 </ul>
34 </div>
35 {{ end }}
36 </div>
37 </li>
38 {{- end }}