Add ability to display author on header
This commit is contained in:
parent
0101221ea8
commit
81da5bf68c
2 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
|||
export interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
author?: {
|
||||
name: string;
|
||||
};
|
||||
comp: any;
|
||||
}
|
||||
|
||||
|
@ -8,6 +11,7 @@ export default function(props: Props) {
|
|||
return (
|
||||
<header className="page-header">
|
||||
<h1>{ props.title }</h1>
|
||||
{props.author && <p>By {props.author.name}</p>}
|
||||
{props.comp.separator()}
|
||||
<p className="subheading">{ props.description }</p>
|
||||
</header>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default function({ title, description, children, comp, metas, links }) {
|
||||
export default function({ title, description, children, comp, metas, links, author }) {
|
||||
return (
|
||||
<html lang="en-CA">
|
||||
<head>
|
||||
|
@ -25,7 +25,7 @@ export default function({ title, description, children, comp, metas, links }) {
|
|||
</head>
|
||||
<body>
|
||||
{ comp.navbar() }
|
||||
{ comp.header({title, description}) }
|
||||
{ comp.header({title, description, author}) }
|
||||
<main>{children}</main>
|
||||
{ comp.footer() }
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue