Some css clean up for backlink section.

This commit is contained in:
Tuan Cao 2022-04-13 14:30:00 +07:00
parent 9766844614
commit b4f27edd5d
2 changed files with 19 additions and 21 deletions

View File

@ -7,27 +7,24 @@ import Link from 'next/link'
function BackLinks({linkList}) { function BackLinks({linkList}) {
return (<div className="note-footer"> return (<div className="note-footer">
{(linkList != null && linkList.length > 0) {(linkList != null && linkList.length > 0)
? ?
<> <>
<h3 className="backlink-heading">Link to this note</h3> <h3 className="backlink-heading">Link to this note</h3>
<div className="backlink-container">
<div className="backlink-container">
{linkList.map(aLink => {linkList.map(aLink =>
<div className="backlink"> <div className="backlink">
<Link href={aLink.slug}> <Link href={aLink.slug}>
<a > <a>
<p className="backlink-title">{aLink.title}</p> <p className="backlink-title">{aLink.title}</p>
<p className="backlink-preview">{aLink.shortSummary} </p> <p className="backlink-preview">{aLink.shortSummary} </p>
</a> </a>
</Link> </Link>
</div>
</div>
)} )}
</div> </div>
</> </>
: <></>}
: <></>}
</div>); </div>);
} }

View File

@ -43,8 +43,9 @@ a:hover {
.backlink-container .backlink { .backlink-container .backlink {
/*background-color: #f8f2f2;*/ /*background-color: #f8f2f2;*/
margin: 8px; margin: 8px -8px 0px;
height: 118px; padding: 8px;
height: 116px;
width: 318px; width: 318px;
text-decoration: none; text-decoration: none;
display: block; display: block;
@ -58,8 +59,8 @@ a:hover {
} }
.backlink-container .backlink-title { .backlink-container .backlink-title {
font-size: 12px; font-size: 14px;
line-height: 16px; line-height: 18px;
font-weight: 600; font-weight: 600;
text-decoration: none; text-decoration: none;
} }