simpler meta tag logic and added meta container
This commit is contained in:
parent
4c894c13aa
commit
f794f19ef6
1 changed files with 11 additions and 5 deletions
|
@ -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[]) {
|
||||
return (
|
||||
<ol>
|
||||
|
@ -307,10 +315,8 @@ export default class Page extends React.Component<PageProps, PageState> {
|
|||
)}
|
||||
</TagList>
|
||||
<br />
|
||||
{this.state.isUnsearchable ? (
|
||||
<></>
|
||||
) : (
|
||||
<>
|
||||
{!this.state.isUnsearchable && (
|
||||
<StyledMetaContainer>
|
||||
<FontAwesomeIcon icon={faCalendar} />{" "}
|
||||
Published on {this.state.fetchedPage.date}
|
||||
|
||||
|
@ -319,7 +325,7 @@ export default class Page extends React.Component<PageProps, PageState> {
|
|||
|
||||
<FontAwesomeIcon icon={faBook} />{" "}
|
||||
{this.state.fetchedPage.wordCount} words
|
||||
</>
|
||||
</StyledMetaContainer>
|
||||
)}
|
||||
</small>
|
||||
{/* Horizontal Separator */}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue