(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();
|
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 {
|
h2 {
|
||||||
@extend .heading;
|
@extend .heading;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 a {
|
h2 a {
|
||||||
@ -548,3 +549,5 @@ footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w3m-helper { display: none; }
|
@ -1,5 +1,5 @@
|
|||||||
<section class="card">
|
<section class="card browse-result">
|
||||||
<h2>{{url.domain}}</h2>
|
<h2 title="{{url.domain}}">{{displayDomain}}</h2>
|
||||||
|
|
||||||
<a href="{{url.proto}}://{{url.domain}}/">
|
<a href="{{url.proto}}://{{url.domain}}/">
|
||||||
<img src="/screenshot/{{domainId}}" title="{{description}}" loading="lazy"/>
|
<img src="/screenshot/{{domainId}}" title="{{description}}" loading="lazy"/>
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
{{>search/parts/search-header}}
|
{{>search/parts/search-header}}
|
||||||
{{>search/parts/search-form}}
|
{{>search/parts/search-form}}
|
||||||
|
|
||||||
<section class="cards">
|
|
||||||
|
|
||||||
<div class="infobox">
|
<div class="infobox">
|
||||||
{{#if focusDomain}}
|
{{#if focusDomain}}
|
||||||
Showing domains similar to <tt>{{focusDomain}}</tt>.
|
Showing domains similar to <tt>{{focusDomain}}</tt>.
|
||||||
@ -28,8 +26,8 @@ take the helm.
|
|||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<section class="cards">
|
||||||
{{#each results}}{{>search/browse-result}}{{/each}}
|
{{#each results}}{{>search/browse-result}}{{/each}}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{>search/parts/search-footer}}
|
{{>search/parts/search-footer}}
|
||||||
|
@ -16,3 +16,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<hr class="w3m-helper" />
|
Loading…
Reference in New Issue
Block a user