refactor(blog): improve meta tags styling #76
2 changed files with 24 additions and 23 deletions
|
@ -40,7 +40,7 @@ export default function PostCard({ postData, className }: Props) {
|
||||||
))}
|
))}
|
||||||
</TagList>
|
</TagList>
|
||||||
<hr />
|
<hr />
|
||||||
<div className="flex flex-wrap items-center gap-2">
|
<div className="flex flex-wrap items-center gap-x-4">
|
||||||
<div className="flex items-center gap-2 whitespace-nowrap">
|
<div className="flex items-center gap-2 whitespace-nowrap">
|
||||||
<FontAwesomeIcon icon={faCalendar} />
|
<FontAwesomeIcon icon={faCalendar} />
|
||||||
{date || "Unknown date"}
|
{date || "Unknown date"}
|
||||||
|
|
|
@ -9,37 +9,38 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||||
|
|
||||||
export default function Meta(props: { fetchedPage: PageData }) {
|
export default function Meta(props: { fetchedPage: PageData }) {
|
||||||
return (
|
return (
|
||||||
<div className="text-light-text-gray dark:text-dark-text-gray">
|
<div className="flex flex-wrap gap-x-4 text-light-text-gray dark:text-dark-text-gray">
|
||||||
{/* posts count */}
|
{/* posts count */}
|
||||||
{props.fetchedPage.length > 0 && (
|
{props.fetchedPage.length > 0 && (
|
||||||
<>
|
<div className="flex flex-nowrap items-center gap-2 whitespace-nowrap">
|
||||||
<FontAwesomeIcon icon={faFile} />
|
<FontAwesomeIcon icon={faFile} />
|
||||||
|
|
||||||
{props.fetchedPage.length} post
|
{props.fetchedPage.length} post
|
||||||
{props.fetchedPage.length > 1 && "s"}{" "}
|
{props.fetchedPage.length > 1 && "s"}{" "}
|
||||||
|
</div>
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
{/* date */}
|
{/* date */}
|
||||||
<FontAwesomeIcon icon={faCalendar} />
|
<div className="flex flex-nowrap items-center gap-2 whitespace-nowrap">
|
||||||
|
<FontAwesomeIcon icon={faCalendar} />
|
||||||
{props.fetchedPage.date || "Unknown date"}
|
{props.fetchedPage.date || "Unknown date"}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* read time */}
|
{/* read time */}
|
||||||
<FontAwesomeIcon icon={faHourglass} />
|
<div className="flex flex-nowrap items-center gap-2 whitespace-nowrap">
|
||||||
|
<FontAwesomeIcon icon={faHourglass} />
|
||||||
{props.fetchedPage.readTime
|
{props.fetchedPage.readTime
|
||||||
? props.fetchedPage.readTime + " read"
|
? props.fetchedPage.readTime + " read"
|
||||||
: "unknown length"}
|
: "unknown length"}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* word count */}
|
{/* word count */}
|
||||||
<FontAwesomeIcon icon={faBook} />
|
<div className="flex flex-nowrap items-center gap-2 whitespace-nowrap">
|
||||||
|
<FontAwesomeIcon icon={faBook} />
|
||||||
{props.fetchedPage.wordCount
|
{props.fetchedPage.wordCount
|
||||||
? props.fetchedPage.wordCount +
|
? props.fetchedPage.wordCount +
|
||||||
" word" +
|
" word" +
|
||||||
(props.fetchedPage.wordCount > 1 && "s")
|
(props.fetchedPage.wordCount > 1 && "s")
|
||||||
: "unknown words"}
|
: "unknown words"}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue