forked from tangled.org/core
this repo has no description

appview: fix repo ordering on timeline

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 096eb308 62ef376d

verified
Changed files
+20 -16
appview
+1
appview/db/repos.go
···
from
repos r
%s
+
order by created desc
%s`,
whereClause,
limitClause,
+2 -5
appview/db/timeline.go
···
var events []TimelineEvent
for _, f := range follows {
-
profile, ok1 := profileMap[f.SubjectDid]
-
followStatMap, ok2 := followStatMap[f.SubjectDid]
-
if !ok1 || !ok2 {
-
continue
-
}
+
profile, _ := profileMap[f.SubjectDid]
+
followStatMap, _ := followStatMap[f.SubjectDid]
events = append(events, TimelineEvent{
Follow: &f,
+1 -1
appview/pages/templates/layouts/base.html
···
<div class="px-1" style="z-index: 20">
{{ block "topbarLayout" . }}
<div class="grid grid-cols-1 md:grid-cols-12">
-
<header class="col-span-1 md:col-start-3 md:col-span-8">
+
<header class="col-span-1 md:col-start-3 md:col-span-8" style="z-index: 20;">
{{ template "layouts/topbar" . }}
</header>
</div>
+3 -1
appview/pages/templates/repo/commit.html
···
{{end}}
{{ define "topbarLayout" }}
-
{{ template "layouts/topbar" . }}
+
<header style="z-index: 20;">
+
{{ template "layouts/topbar" . }}
+
</header>
{{ end }}
{{ define "contentLayout" }}
+1 -1
appview/pages/templates/repo/index.html
···
dark:[&_pre]:border dark:[&_pre]:border-gray-700
{{ end }}"
>
-
<article class="{{ if .Raw }}whitespace-pre{{ end }}">{{- if .Raw -}}<pre class="dark:bg-gray-800 dark:text-white overflow-x-scroll">
+
<article class="{{ if .Raw }}whitespace-pre{{ end }}">{{- if .Raw -}}<pre class="dark:bg-gray-800 dark:text-white overflow-x-auto">
{{- .HTMLReadme -}}
</pre>
{{- else -}}
+12 -8
appview/pages/templates/timeline.html
···
<a href="/{{ $subjectHandle }}">
<span class="font-bold dark:text-white overflow-hidden text-ellipsis whitespace-nowrap max-w-full">{{ $subjectHandle | truncateAt30 }}</span>
</a>
-
{{ with $profile.Description }}
-
<p class="text-sm pb-2 md:pb-2">{{.}}</p>
+
{{ with $profile }}
+
{{ with .Description }}
+
<p class="text-sm pb-2 md:pb-2">{{.}}</p>
+
{{ end }}
{{ end }}
-
<div class="text-sm flex items-center gap-2 my-2 overflow-hidden text-ellipsis whitespace-nowrap max-w-full text-sm">
-
<span class="flex-shrink-0">{{ i "users" "size-4" }}</span>
-
<span id="followers">{{ $stat.Followers }} followers</span>
-
<span class="select-none after:content-['·']"></span>
-
<span id="following">{{ $stat.Following }} following</span>
-
</div>
+
{{ with $stat }}
+
<div class="text-sm flex items-center gap-2 my-2 overflow-hidden text-ellipsis whitespace-nowrap max-w-full text-sm">
+
<span class="flex-shrink-0">{{ i "users" "size-4" }}</span>
+
<span id="followers">{{ .Followers }} followers</span>
+
<span class="select-none after:content-['·']"></span>
+
<span id="following">{{ .Following }} following</span>
+
</div>
+
{{ end }}
</div>
</div>
{{ end }}