Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/lib/frontend/templates/listing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ d.Node? _nameMatches(SearchForm form, List<String>? matches) {
: 'Matching package ${singular ? 'name' : 'names'}: ';

return d.p(children: [
d.b(text: nameMatchLabel),
d.text(nameMatchLabel),
...matches.expandIndexed((i, name) {
return [
if (i > 0) d.text(', '),
d.code(child: d.a(href: urls.pkgPageUrl(name), text: name)),
d.a(
href: urls.pkgPageUrl(name),
child: d.b(text: name),
),
];
}),
]);
Expand Down
3 changes: 2 additions & 1 deletion app/lib/frontend/templates/views/pkg/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ d.Node packageListingNode({
}) {
final innerContent = d.fragment([
listingInfo,
if (nameMatches != null) nameMatches,
if (nameMatches != null)
d.div(classes: ['listing-highlight-block'], child: nameMatches),
packageList,
if (pagination != null) pagination,
d.markdown('Check our help page for details on '
Expand Down
4 changes: 4 additions & 0 deletions pkg/web_css/lib/src/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
}
}

.listing-highlight-block {
margin: 8px 0px;
}

.sort-control {
position: relative;
cursor: pointer;
Expand Down
Loading