mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 01:05:34 +03:00
Show domain on first line, chop off "www"
This commit is contained in:
parent
5c813b69be
commit
bcf4fe6e5c
1 changed files with 2 additions and 2 deletions
|
@ -181,7 +181,7 @@ function Card({ card }) {
|
||||||
const hasText = title || providerName || authorName;
|
const hasText = title || providerName || authorName;
|
||||||
|
|
||||||
if (hasText && image) {
|
if (hasText && image) {
|
||||||
const domain = new URL(url).hostname;
|
const domain = new URL(url).hostname.replace(/^www\./, '');
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
href={url}
|
href={url}
|
||||||
|
@ -200,6 +200,7 @@ function Card({ card }) {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div class="meta-container">
|
<div class="meta-container">
|
||||||
|
<p class="meta domain">{domain}</p>
|
||||||
<p
|
<p
|
||||||
class="title"
|
class="title"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
|
@ -207,7 +208,6 @@ function Card({ card }) {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<p class="meta">{providerName || authorName}</p>
|
<p class="meta">{providerName || authorName}</p>
|
||||||
<p class="meta domain">{domain}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue