Fixed empty display name, firefox styling, removed colors from fallback avatar

main
Štěpán Škorpil 2022-01-10 23:33:00 +01:00
rodzic 4d0b079380
commit 95b673d8fc
4 zmienionych plików z 43 dodań i 26 usunięć

Wyświetl plik

@ -32,7 +32,7 @@ const Result:React.FC<{ feed:FeedResponseItem }> = ({ feed }) => {
<section className={'feed'}> <section className={'feed'}>
<h3 className={'display-name with-emoji'}> <h3 className={'display-name with-emoji'}>
<a href={feed.url} <a href={feed.url}
dangerouslySetInnerHTML={{ __html: striptags(feed.displayName, ['img']) }} dangerouslySetInnerHTML={{ __html: striptags(feed.displayName !== '' ? feed.displayName : feed.name, ['img']) }}
/> />
</h3> </h3>
<Avatar url={feed.avatar}/> <Avatar url={feed.avatar}/>

Wyświetl plik

@ -4,7 +4,7 @@ import { feedRequestSchema } from '../../types/FeedRequest'
import { NextApiRequest, NextApiResponse } from 'next' import { NextApiRequest, NextApiResponse } from 'next'
import { FeedResponse } from '../../types/FeedResponse' import { FeedResponse } from '../../types/FeedResponse'
const handleFeedSearch = async (req:NextApiRequest, res:NextApiResponse<FeedResponse>):Promise<void> => { const handleFeedSearch = async (req: NextApiRequest, res: NextApiResponse<FeedResponse>): Promise<void> => {
console.info('Searching feeds', { query: req.query }) console.info('Searching feeds', { query: req.query })
const feedRequest = feedRequestSchema.parse(req.query) const feedRequest = feedRequestSchema.parse(req.query)
@ -36,7 +36,18 @@ const handleFeedSearch = async (req:NextApiRequest, res:NextApiResponse<FeedResp
emails: true, emails: true,
fields: true, fields: true,
node: true node: true
} },
orderBy: [
{
lastStatusAt: 'desc'
},
{
followersCount: 'desc'
},
{
statusesCount: 'desc'
}
]
}) })
res.status(200) res.status(200)

Wyświetl plik

@ -1,20 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" version="1.1"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> id="Layer_1"
<path style="fill:#BDFDFF;" d="M0,488.727C0,501.58,10.42,512,23.273,512H256h232.727C501.58,512,512,501.58,512,488.727v-93.091 x="0px"
V23.273C512,10.42,501.58,0,488.727,0H256H23.273C16.043,0,9.584,3.297,5.314,8.47c-1.896,2.298-3.361,4.968-4.268,7.883 y="0px"
C0.366,18.538,0,20.863,0,23.273"/> viewBox="0 0 512 512"
<path style="fill:#A78966;" d="M507.412,381.763l-18.685-25.166l-74.406-100.214c-4.389-5.914-11.32-9.399-18.685-9.399 style="enable-background:new 0 0 512 512;"
s-14.296,3.486-18.685,9.399l-73.745,99.322L256,287.517l-73.956-106.826c-4.347-6.277-11.498-10.024-19.135-10.024 xml:space="preserve"
s-14.787,3.747-19.135,10.026L46.545,321.134l-23.273,33.617L4.138,382.39C1.444,386.281,0,390.903,0,395.636v93.091 xmlns="http://www.w3.org/2000/svg">
C0,501.58,10.42,512,23.273,512H256h232.727C501.58,512,512,501.58,512,488.727v-93.091 <path
C512,390.639,510.391,385.775,507.412,381.763z"/> style="fill:#9c9c9c;fill-opacity:0.48627451"
<path style="fill:#9BC9FF;" d="M23.273,0C10.42,0,0,10.42,0,23.273v372.364c0-4.734,1.444-9.356,4.138-13.247l19.135-27.64 d="M0,488.727C0,501.58,10.42,512,23.273,512H256h232.727C501.58,512,512,501.58,512,488.727v-93.091 V23.273C512,10.42,501.58,0,488.727,0H256H23.273C16.043,0,9.584,3.297,5.314,8.47c-1.896,2.298-3.361,4.968-4.268,7.883 C0.366,18.538,0,20.863,0,23.273"
l23.273-33.617l97.229-140.442c4.347-6.277,11.498-10.024,19.135-10.024s14.787,3.747,19.135,10.026L256,287.517V183.128v-55.954V0 id="path2" />
H23.273z"/> <path
<path style="fill:#806749;" d="M182.044,180.693c-4.347-6.279-11.498-10.026-19.135-10.026s-14.787,3.747-19.135,10.026 style="fill:#212224;fill-opacity:1"
L46.545,321.134l-23.273,33.617L4.138,382.39C1.444,386.281,0,390.903,0,395.636v93.091C0,501.58,10.42,512,23.273,512H256V287.517 d="M507.412,381.763l-18.685-25.166l-74.406-100.214c-4.389-5.914-11.32-9.399-18.685-9.399 s-14.296,3.486-18.685,9.399l-73.745,99.322L256,287.517l-73.956-106.826c-4.347-6.277-11.498-10.024-19.135-10.024 s-14.787,3.747-19.135,10.026L46.545,321.134l-23.273,33.617L4.138,382.39C1.444,386.281,0,390.903,0,395.636v93.091 C0,501.58,10.42,512,23.273,512H256h232.727C501.58,512,512,501.58,512,488.727v-93.091 C512,390.639,510.391,385.775,507.412,381.763z"
L182.044,180.693z"/> id="path4" />
<circle style="fill:#FFB655;" cx="302.545" cy="155.152" r="54.303"/> <circle
style="fill:#ededed;fill-opacity:1"
cx="302.545"
cy="155.152"
r="54.303"
id="circle10" />
</svg> </svg>

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 1.7 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.2 KiB

Wyświetl plik

@ -101,14 +101,14 @@ a:hover {
text-align: center; text-align: center;
width: 100%; width: 100%;
grid-gap: 1em; grid-gap: 1em;
box-sizing: content-box; box-sizing: border-box;
header { header {
grid-column: start / end; grid-column: start / end;
grid-row: start / message; grid-row: start / message;
display: grid; display: grid;
grid-template-columns: [start] auto [text] auto [end]; grid-template-columns: [start] 4em [text] auto [end];
grid-template-rows: [start] auto [end]; grid-template-rows: [start] auto [end];
grid-gap: 1em; grid-gap: 1em;
@ -172,7 +172,7 @@ form {
} }
svg { svg {
vertical-align: middle; vertical-align: baseline;
width: 1em; width: 1em;
max-width: 1em; max-width: 1em;
max-height: 1em; max-height: 1em;
@ -270,6 +270,7 @@ img {
display: none; display: none;
} }
img,svg{ img,svg{
width: 100%;
max-width: 1em; max-width: 1em;
max-height: 1em; max-height: 1em;
display: inline; display: inline;
@ -279,7 +280,7 @@ img {
} }
.badge{ .badge{
display: inline; display: inline-block;
margin-right: 1em; margin-right: 1em;
white-space: nowrap; white-space: nowrap;
} }