First draft graphql docs

This commit is contained in:
Aaron Carlino 2020-08-27 00:53:47 +12:00
parent b18754670b
commit 43bb6e1951
3 changed files with 12 additions and 5 deletions

View File

@ -3,11 +3,12 @@ module.exports = [
resolve: `gatsby-source-git`,
options: {
name: `docs--4`,
remote: `https://github.com/silverstripe/silverstripe-framework.git`,
branch: `4`,
remote: `https://github.com/unclecheese/silverstripe-framework.git`,
branch: `pulls/4/schemageddon`,
patterns: `docs/en/**`
}
},
},
{
resolve: `gatsby-source-git`,
options: {

View File

@ -31,7 +31,7 @@ const createList = (children: SilverstripeDocument[]): ReactElement[] => {
return children.map(({ summary, slug, title }) => {
return (
<React.Fragment key={slug}>
<dt><Link to={slug}>{title}</Link></dt>
<dt><Link activeClassName="active" to={slug}>{title}</Link></dt>
<dd>{summary || ''}</dd>
</React.Fragment>
);
@ -75,7 +75,7 @@ const ChildrenOf: StatelessComponent<ChildrenOfProps> = ({ folderName, exclude,
return (
<div className="docs-overview py-5">
{asList &&
<dl>{children}</dl>
<dl className="cards-list">{children}</dl>
}
{!asList &&
<div className="row">

View File

@ -217,6 +217,12 @@ h1, h2, h3 {
}
}
.cards-list {
a.active {
border-left: 5px solid #999;
padding-left: 5px;
}
}
.github-edit {
display: flex;
align-items: center;