styling headers, info on pages
This commit is contained in:
parent
e54ac1aa89
commit
03728eec75
|
@ -1,8 +1,11 @@
|
||||||
export default function (props){
|
export default function (props){
|
||||||
return(
|
return(
|
||||||
<header>
|
<header>
|
||||||
|
<h2>
|
||||||
|
{props.super}
|
||||||
|
</h2>
|
||||||
<h1>
|
<h1>
|
||||||
{props.text}
|
{props.heading}
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
)
|
)
|
||||||
|
|
|
@ -138,13 +138,17 @@ export default function Table(props) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return <table>
|
return (
|
||||||
|
<>
|
||||||
|
<h2>{props.header}</h2>
|
||||||
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{renderHeaders(data)}
|
{renderHeaders(data)}
|
||||||
{renderRows(data)}
|
{renderRows(data)}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,22 @@ const { filterList, highlights, clickables } = submissionsTableOptions
|
||||||
export default function Publication() {
|
export default function Publication() {
|
||||||
const { publicationId } = useParams()
|
const { publicationId } = useParams()
|
||||||
const { publications } = useLoaderData()
|
const { publications } = useLoaderData()
|
||||||
const publicationsData = publications.find(row => row.id == publicationId)
|
const publicationData = publications.find(row => row.id == publicationId)
|
||||||
return (
|
return (
|
||||||
<>
|
<> <div id="page">
|
||||||
<PageHeader text={'Publication#' + publicationId} />
|
<PageHeader super={'Publication#' + publicationId} heading={publicationData.title}/>
|
||||||
{JSON.stringify(publicationsData)}
|
<div>
|
||||||
<Table data={publicationsData.submissions}
|
Link:
|
||||||
filterList={filterList}
|
<a href={publicationData.link}>{publicationData.link}</a>
|
||||||
|
</div>
|
||||||
|
<Table data={publicationData.submissions}
|
||||||
|
filterList={[...filterList,'publication']}
|
||||||
highlights={highlights}
|
highlights={highlights}
|
||||||
clickables={clickables}
|
clickables={clickables}
|
||||||
sortByDefault='date_submitted'
|
sortByDefault='date_submitted'
|
||||||
|
header='Submissions:'
|
||||||
></Table>
|
></Table>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
|
@ -8,21 +8,20 @@ export default function Story(){
|
||||||
const { storyId } = useParams()
|
const { storyId } = useParams()
|
||||||
const { stories } = useLoaderData()
|
const { stories } = useLoaderData()
|
||||||
const storyData = stories.find(row=>row.id==storyId)
|
const storyData = stories.find(row=>row.id==storyId)
|
||||||
filterList.push(
|
|
||||||
'story',
|
|
||||||
|
|
||||||
)
|
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
<PageHeader text={'Story#'+storyId}/>
|
<div id="page">
|
||||||
{JSON.stringify(storyData)}
|
<PageHeader super={'Story#'+storyId} heading={storyData.title}/>
|
||||||
<Table
|
<Table
|
||||||
data={storyData.submissions}
|
data={storyData.submissions}
|
||||||
filterList={filterList}
|
filterList={[...filterList,'story']}
|
||||||
highlights={highlights}
|
highlights={highlights}
|
||||||
clickables={clickables}
|
clickables={clickables}
|
||||||
sortByDefault='date_submitted'
|
sortByDefault='date_submitted'
|
||||||
|
header='Submissions:'
|
||||||
></Table>
|
></Table>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
|
@ -55,3 +55,17 @@ html {
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h1{
|
||||||
|
font-size: 4rem;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
font-size: 2rem;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
#page{
|
||||||
|
font-size: 1.6rem;
|
||||||
|
width: fit-content;
|
||||||
|
margin:auto;
|
||||||
|
}
|
Loading…
Reference in New Issue