Skip to content

Commit bff2e91

Browse files
committed
Add layout and css pre-reqs for foundation site
Signed-off-by: Brian Warner <[email protected]>
1 parent 81e0d68 commit bff2e91

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

src/assets/css/_css/foundation.less

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.foundation {
2+
.foundation-hero {
3+
background: url(http://github.com/%3Cspan%20class=%22pl-s%22%3E/img/graphql_foundation-hero.jpg%3C/span%3E) top left;
4+
height: 35vmin;
5+
position: relative;
6+
width: 100%;
7+
8+
.foundation-hero-inner-content {
9+
background-color: rgba(221,23,151,0.75);
10+
height: 35vmin;
11+
width: 100%;
12+
position: absolute;
13+
}
14+
15+
img {
16+
padding: 4vmin 0 1vmin;
17+
height: 20vmin;
18+
display: block;
19+
margin: 0 auto;
20+
}
21+
22+
h2 {
23+
color: #FFF;
24+
display: block;
25+
margin: auto;
26+
padding: 2vmin 5vmin;
27+
height: 15vmin;
28+
width: 100%;
29+
text-align: center;
30+
font-size: 2.5vmin;
31+
line-height: 3vmin;
32+
}
33+
}
34+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import React from "react"
2+
import { Link } from "gatsby"
3+
import DocsSidebar from "../DocsSidebar"
4+
import Marked from '../Marked'
5+
6+
interface Props {
7+
title: string
8+
heroText: string
9+
nextDoc: any
10+
permalink: string
11+
sideBarData: any
12+
rawMarkdownBody: string
13+
pageContext: any
14+
}
15+
16+
const index = ({ title, heroText, nextDoc, sideBarData, rawMarkdownBody, pageContext }: Props) => {
17+
return (
18+
<section>
19+
<div class="foundation">
20+
<div className="foundation-hero">
21+
<div className="foundation-hero-inner-content">
22+
<img src="/img/graphql_foundation-logo-white.svg" alt="GraphQL Foundation logo" />
23+
<h2>{heroText}</h2>
24+
</div>
25+
</div>
26+
<div className="documentationContent">
27+
<div className="inner-content">
28+
<h1>{title}</h1>
29+
<Marked pageContext={pageContext}>{rawMarkdownBody}</Marked>
30+
{nextDoc?.frontmatter?.permalink && (
31+
<Link className="read-next" to={nextDoc.frontmatter.permalink}>
32+
<span className="read-next-continue">
33+
Continue Reading &rarr;
34+
</span>
35+
<span className="read-next-title">
36+
{nextDoc.frontmatter.title}
37+
</span>
38+
</Link>
39+
)}
40+
</div>
41+
<DocsSidebar sideBarData={sideBarData} />
42+
</div>
43+
</div>
44+
</section>
45+
)
46+
}
47+
48+
export default index

0 commit comments

Comments
 (0)