Skip to content

Commit 4835b25

Browse files
committed
make link layout consistent between refs page and docs landing page
1 parent b4611d8 commit 4835b25

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

Sources/UnidocUI/Endpoints/Docs/Unidoc.DocsEndpoint.PackagePage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ extension Unidoc.DocsEndpoint.PackagePage:Unidoc.ApicalPage
122122
switch repo.origin
123123
{
124124
case .github(let origin):
125-
$0[.dt] = "Provider"
125+
$0[.dt] = "Registrar"
126126
$0[.dd] = "GitHub"
127127

128128
if let license:Unidoc.PackageLicense = repo.license

Sources/UnidocUI/Endpoints/Tags/Unidoc.RefsPage.swift

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,26 @@ extension Unidoc.RefsPage
155155
$0[.dt] = "Owner"
156156
$0[.dd]
157157
{
158-
$0[.a]
158+
if let account:Unidoc.Account = self.package.repo?.account
159159
{
160-
$0.href = "https://github.com/\(origin.owner)"
161-
$0.rel = .external
162-
} = "@\(origin.owner)"
160+
$0[.a]
161+
{
162+
$0.href = "\(Unidoc.UserPropertyEndpoint[account])"
163+
} = origin.owner
164+
}
165+
else
166+
{
167+
$0[.span] = origin.owner
168+
}
163169

164170
$0[.span, { $0.class = "parenthetical" }]
165171
{
166172
$0[.a]
167173
{
168-
$0.href = "\(Unidoc.RulesEndpoint[self.package.symbol])"
169-
} = "manage collaborators"
174+
$0.target = "_blank"
175+
$0.href = "https://github.com/\(origin.owner)"
176+
$0.rel = .external
177+
} = "view profile"
170178
}
171179
}
172180

@@ -195,14 +203,11 @@ extension Unidoc.RefsPage
195203
}
196204
}
197205

198-
if let account:Unidoc.Account = self.package.repo?.account
206+
section[.a]
199207
{
200-
section[.a]
201-
{
202-
$0.class = "area"
203-
$0.href = "\(Unidoc.UserPropertyEndpoint[account])"
204-
} = "More packages by this author"
205-
}
208+
$0.class = "area"
209+
$0.href = "\(Unidoc.RulesEndpoint[self.package.symbol])"
210+
} = "Manage contributors"
206211

207212
section[.h2] = Heading.tags
208213
section[.table] = self.versions.table

0 commit comments

Comments
 (0)