forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

proper titles for repos + better issue heirarchy

anirudh.fi dbbd3298 97278200

verified
Changed files
+43 -16
appview
+2
appview/pages/templates/repo/blob.html
···
+
{{ define "title" }}{{ .Path }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
+
{{ define "repoContent" }}
{{ $lines := split .Contents }}
{{ $tot_lines := len $lines }}
+1 -1
appview/pages/templates/repo/commit.html
···
-
{{ define "title" }} commit {{ .Diff.Commit.This }} {{ end }}
+
{{ define "title" }} commit {{ .Diff.Commit.This }} · {{ .RepoInfo.FullName }} {{ end }}
{{ define "repoContent" }}
+2
appview/pages/templates/repo/empty.html
···
+
{{ define "title" }}{{ .RepoInfo.FullName }}{{ end }}
+
{{ define "repoContent" }}
<main>
<p class="text-center pt-5 text-gray-400">
+2
appview/pages/templates/repo/index.html
···
+
{{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }}
+
{{ define "repoContent" }}
<main>
<div class="flex justify-between pb-5">
+26 -9
appview/pages/templates/repo/issues/issue.html
···
{{ end }}
-
<section class="m-2">
+
<section>
<div class="flex items-center gap-2">
<div
id="state"
···
<span class="text-gray-400 text-sm">
opened by
{{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }}
-
<a href="/{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a>
+
<a href="/{{ $owner }}" class="no-underline hover:underline"
+
>{{ $owner }}</a
+
>
</span>
</div>
{{ if .Issue.Body }}
-
<article id="body" class="mt-8">
+
<article id="body" class="mt-8 border border-gray-300 px-4 py-6">
{{ .Issue.Body | escapeHtml }}
</article>
{{ end }}
</section>
-
<section id="comments" class="mt-8 space-y-4">
-
{{ range .Comments }}
+
<hr class="my-10" />
+
+
<section id="comments" class="mt-8 space-y-4 relative">
+
{{ range $index, $comment := .Comments }}
<div
id="comment-{{ .CommentId }}"
-
class="border border-gray-200 p-4"
+
class="border border-gray-200 p-4 relative"
>
+
{{ if ne $index 0 }}
+
<div
+
class="absolute left-8 -top-4 w-px h-4 bg-gray-200"
+
></div>
+
{{ end }}
<div class="flex items-center gap-2 mb-2">
{{ $owner := index $.DidHandleMap .OwnerDid }}
<span class="text-gray-400 text-sm">
-
<a href="{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a>
+
<a
+
href="{{ $owner }}"
+
class="no-underline hover:underline"
+
>{{ $owner }}</a
+
>
</span>
-
<span class="text-gray-500 text-sm">
+
<a
+
href="#{{ .CommentId }}"
+
class="text-gray-500 text-sm hover:text-gray-500 hover:underline no-underline"
+
id="{{ .CommentId }}"
+
>
{{ .Created | timeFmt }}
-
</span>
+
</a>
</div>
<div class="">
{{ nl2br .Body }}
+6 -3
appview/pages/templates/repo/issues/issues.html
···
-
{{ define "title" }}Issues &middot; {{ .RepoInfo.FullName }}{{ end }}
+
{{ define "title" }}issues &middot; {{ .RepoInfo.FullName }}{{ end }}
{{ define "repoContent" }}
<div class="flex justify-between items-center">
-
<h1 class="m-0">Issues</h1>
<div class="error" id="issues"></div>
<a
href="/{{ .RepoInfo.FullName }}/issues/new"
···
<span class="before:content-['·']">
opened by
{{ $owner := index $.DidHandleMap .OwnerDid }}
-
<a href="{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a>
+
<a
+
href="{{ $owner }}"
+
class="no-underline hover:underline"
+
>{{ $owner }}</a
+
>
</span>
</div>
</div>
+1 -2
appview/pages/templates/repo/log.html
···
-
{{ define "title" }}Commits &middot; {{ .RepoInfo.FullName }}{{ end }}
+
{{ define "title" }}commits &middot; {{ .RepoInfo.FullName }}{{ end }}
{{ define "repoContent" }}
-
<h1>Commits</h1>
<main>
<div id="commit-log" class="flex-1">
{{ range .Commits }}
+1 -1
appview/pages/templates/repo/settings.html
···
-
{{ define "title" }}Settings &middot; {{ .RepoInfo.FullName }}{{ end }}
+
{{ define "title" }}settings &middot; {{ .RepoInfo.FullName }}{{ end }}
{{ define "repoContent" }}
<header class="font-bold text-sm mb-4">COLLABORATORS</header>
+2
appview/pages/templates/repo/tree.html
···
+
{{ define "title"}}{{ range .BreadCrumbs }}{{ index . 0}}/{{ end }} at {{ .Ref }} &middot; {{ .RepoInfo.FullName }}{{ end }}
+
{{define "repoContent"}}
<main>
<div class="tree">