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

tweak styles a bit

Changed files
+18 -19
appview
db
pages
templates
state
+1 -1
appview/db/repos.go
···
func CollaboratingIn(e Execer, collaborator string) ([]Repo, error) {
var repos []Repo
-
rows, err := e.Query(`select r.did, r.name, r.knot, r.rkey, r.created from repos r join collaborators c on r.id = c.repo where c.did = ?;`, collaborator)
+
rows, err := e.Query(`select r.did, r.name, r.knot, r.rkey, r.description, r.created from repos r join collaborators c on r.id = c.repo where c.did = ?;`, collaborator)
if err != nil {
return nil, err
}
+1 -1
appview/pages/templates/fragments/repoDescription.html
···
{{ end }}
{{ if .RepoInfo.Roles.IsOwner }}
-
<button class="bg-gray-100 rounded p-1 mr-1 hover:bg-gray-200 font-mono text-sm" hx-get="/{{ .RepoInfo.FullName }}/description/edit">
+
<button class="bg-gray-200 uppercase rounded p-1 ml-1 hover:bg-gray-400 font-mono text-sm" hx-get="/{{ .RepoInfo.FullName }}/description/edit">
edit
</button>
{{ end }}
+1 -1
appview/pages/templates/repo/index.html
···
<div
class="inline-block px-1 select-none after:content-['·']"
></div>
-
<span class="text-xs rounded-full bg-gray-700 text-white px-2 mx-1/2 inline-flex items-center">
+
<span class="text-xs rounded bg-gray-100 font-mono px-2 mx-1/2 inline-flex items-center">
{{ . }}
</span>
{{ end }}
+14 -10
appview/pages/templates/user/profile.html
···
>{{ .Name }}</a
>
</div>
-
<div
-
id="repo-knot-name"
-
class="text-gray-600 text-sm font-mono"
-
>
-
{{ .Knot }}
-
</div>
+
{{ if .Description }}
+
<div class="text-gray-600 text-sm">
+
{{ .Description }}
+
</div>
+
{{ end }}
+
<div class="text-gray-600 text-sm font-mono">
+
{{ .Knot }}
+
</div>
</div>
{{ else }}
<p class="px-6">This user does not have any repos yet.</p>
···
{{ index $.DidHandleMap .Did }}/{{ .Name }}
</a>
</div>
-
<div
-
id="repo-knot-name"
-
class="text-gray-600 text-sm font-mono"
-
>
+
{{ if .Description }}
+
<div class="text-gray-600 text-sm">
+
{{ .Description }}
+
</div>
+
{{ end }}
+
<div class="text-gray-600 text-sm font-mono">
{{ .Knot }}
</div>
</div>
-2
appview/state/repo.go
···
}
user := s.auth.GetUser(r)
-
s.pages.RepoIndexPage(w, pages.RepoIndexParams{
LoggedInUser: user,
RepoInfo: f.RepoInfo(s, user),
···
func rolesInRepo(s *State, u *auth.User, f *FullyResolvedRepo) pages.RolesInRepo {
if u != nil {
r := s.enforcer.GetPermissionsInRepo(u.Did, f.Knot, f.OwnerSlashRepo())
-
log.Println(r)
return pages.RolesInRepo{r}
} else {
return pages.RolesInRepo{}
+1 -1
flake.nix
···
inherit (gitignore.lib) gitignoreSource;
in {
overlays.default = final: prev: let
-
goModHash = "sha256-tBhwRT3qnTHoAyasYIDwr9+3V+c7VLPY2LJ6A25l1gA=";
+
goModHash = "sha256-k+WeNx9jZ5YGgskCJYiU2mwyz25E0bhFgSg2GDWZXFw=";
buildCmdPackage = name:
final.buildGoModule {
pname = name;
-1
go.mod
···
github.com/ipfs/go-cid v0.4.1
github.com/mattn/go-sqlite3 v1.14.24
github.com/microcosm-cc/bluemonday v1.0.27
-
github.com/russross/blackfriday/v2 v2.1.0
github.com/sethvargo/go-envconfig v1.1.0
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e
github.com/yuin/goldmark v1.4.13
-2
go.sum
···
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
-
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sethvargo/go-envconfig v1.1.0 h1:cWZiJxeTm7AlCvzGXrEXaSTCNgip5oJepekh/BOQuog=