(search) Revamp browse results with new look.
This commit is contained in:
parent
9bc65ff0ca
commit
97d43a6fa2
@ -11,4 +11,20 @@ public record BrowseResult (EdgeUrl url, int domainId, double relatedness) {
|
||||
}
|
||||
return domain.toString();
|
||||
}
|
||||
|
||||
public String displayDomain() {
|
||||
String ret;
|
||||
var domain = url.domain;
|
||||
if ("www".equals(domain.subDomain)) {
|
||||
ret = domain.domain;
|
||||
}
|
||||
else {
|
||||
ret = domain.toString();
|
||||
}
|
||||
if (ret.length() > 25) {
|
||||
ret = ret.substring(0, 22) + "...";
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -224,6 +224,7 @@ section.cards {
|
||||
|
||||
h2 {
|
||||
@extend .heading;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
h2 a {
|
||||
@ -548,3 +549,5 @@ footer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.w3m-helper { display: none; }
|
@ -1,5 +1,5 @@
|
||||
<section class="card">
|
||||
<h2>{{url.domain}}</h2>
|
||||
<section class="card browse-result">
|
||||
<h2 title="{{url.domain}}">{{displayDomain}}</h2>
|
||||
|
||||
<a href="{{url.proto}}://{{url.domain}}/">
|
||||
<img src="/screenshot/{{domainId}}" title="{{description}}" loading="lazy"/>
|
||||
|
@ -15,8 +15,6 @@
|
||||
{{>search/parts/search-header}}
|
||||
{{>search/parts/search-form}}
|
||||
|
||||
<section class="cards">
|
||||
|
||||
<div class="infobox">
|
||||
{{#if focusDomain}}
|
||||
Showing domains similar to <tt>{{focusDomain}}</tt>.
|
||||
@ -28,8 +26,8 @@ take the helm.
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
||||
<section class="cards">
|
||||
{{#each results}}{{>search/browse-result}}{{/each}}
|
||||
|
||||
</section>
|
||||
|
||||
{{>search/parts/search-footer}}
|
||||
|
@ -16,3 +16,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr class="w3m-helper" />
|
Loading…
Reference in New Issue
Block a user