simpler meta tag logic and added meta container

This commit is contained in:
Kim, Jimin 2021-08-16 23:33:35 +09:00
parent 4c894c13aa
commit f794f19ef6

View file

@ -96,6 +96,14 @@ const StyledCollapseContainer = styled.div`
} }
` `
const StyledMetaContainer = styled.div`
color: ${(props) =>
theming.theme(props.theme.currentTheme, {
light: "#555",
dark: "#CCC",
})};
`
function parseToc(json: TocElement[]) { function parseToc(json: TocElement[]) {
return ( return (
<ol> <ol>
@ -307,10 +315,8 @@ export default class Page extends React.Component<PageProps, PageState> {
)} )}
</TagList> </TagList>
<br /> <br />
{this.state.isUnsearchable ? ( {!this.state.isUnsearchable && (
<></> <StyledMetaContainer>
) : (
<>
<FontAwesomeIcon icon={faCalendar} />{" "} <FontAwesomeIcon icon={faCalendar} />{" "}
Published on {this.state.fetchedPage.date} Published on {this.state.fetchedPage.date}
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
@ -319,7 +325,7 @@ export default class Page extends React.Component<PageProps, PageState> {
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<FontAwesomeIcon icon={faBook} />{" "} <FontAwesomeIcon icon={faBook} />{" "}
{this.state.fetchedPage.wordCount} words {this.state.fetchedPage.wordCount} words
</> </StyledMetaContainer>
)} )}
</small> </small>
{/* Horizontal Separator */} {/* Horizontal Separator */}