Skip to content

Commit 0fc5521

Browse files
committed
three points above the fold
1 parent 4314958 commit 0fc5521

File tree

4 files changed

+119
-62
lines changed

4 files changed

+119
-62
lines changed

site/_core/Marked.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ var React = require('react');
88
var Prism = require('./Prism');
99
var Header = require('./Header');
1010

11+
export default function Marked(props) {
12+
return <div>{marked(props.children, props)}</div>;
13+
}
14+
1115
/**
1216
* Block-Level Grammar
1317
*/
@@ -1084,11 +1088,3 @@ marked.InlineLexer = InlineLexer;
10841088
marked.inlineLexer = InlineLexer.output;
10851089

10861090
marked.parse = marked;
1087-
1088-
var Marked = React.createClass({
1089-
render: function() {
1090-
return <div>{marked(this.props.children, this.props)}</div>;
1091-
}
1092-
});
1093-
1094-
module.exports = Marked;

site/_css/graphql.less

Lines changed: 74 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ footer {
139139
box-shadow: inset 0 10px 10px -5px darken(@dark-color, 5%);
140140
padding-top: 2em;
141141
padding-bottom: 2em;
142+
-webkit-font-smoothing: antialiased;
142143

143144
.copyright {
144145
text-align: center;
@@ -192,20 +193,6 @@ body.index {
192193
}
193194
}
194195

195-
h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor {
196-
margin-top: -50px;
197-
position: absolute;
198-
}
199-
200-
h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-link, h5:hover .hash-link, h6:hover .hash-link {
201-
visibility: visible;
202-
}
203-
204-
.hash-link {
205-
color: #aaa;
206-
visibility: hidden;
207-
}
208-
209196
.fixedSearch {
210197
position: fixed;
211198
right: 0;
@@ -222,6 +209,7 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
222209
z-index: 11;
223210
margin-top: -50px;
224211
padding-top: 50px;
212+
-webkit-font-smoothing: antialiased;
225213

226214
header {
227215
background: none;
@@ -262,15 +250,66 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
262250

263251
h1 {
264252
color: @rhodamine-color;
265-
font-size: 64px;
266-
line-height: 100px;
267253
margin: 0;
268254
}
269255

270-
h3 {
256+
h2, h3, h4 {
271257
color: white;
258+
margin: 1em 0;
259+
text-align: center;
260+
}
261+
262+
.prism {
263+
-webkit-font-smoothing: auto;
264+
color: white;
265+
background: transparent;
266+
box-shadow: none;
267+
padding: 0;
272268
margin: 0;
273269
}
270+
271+
.marketing-col:last-child > .prism {
272+
margin-right: -20px;
273+
}
274+
275+
.marketing-col:nth-child(1) {
276+
-webkit-animation: fade 1.1s ease-in-out;
277+
-moz-animation: fade 1.1s ease-in-out;
278+
animation: fade 1.1s ease-in-out;
279+
-webkit-animation-fill-mode: both;
280+
-moz-animation-fill-mode: both;
281+
animation-fill-mode: both;
282+
}
283+
284+
.marketing-col:nth-child(2) {
285+
-webkit-animation: fade 1.1s 0.8s ease-in-out;
286+
-moz-animation: fade 1.1s 0.8s ease-in-out;
287+
animation: fade 1.1s 0.8s ease-in-out;
288+
-webkit-animation-fill-mode: both;
289+
-moz-animation-fill-mode: both;
290+
animation-fill-mode: both;
291+
}
292+
293+
.marketing-col:nth-child(3) {
294+
-webkit-animation: fade 1.1s 1.6s ease-in-out;
295+
-moz-animation: fade 1.1s 1.6s ease-in-out;
296+
animation: fade 1.1s 1.6s ease-in-out;
297+
-webkit-animation-fill-mode: both;
298+
-moz-animation-fill-mode: both;
299+
animation-fill-mode: both;
300+
}
301+
302+
@keyframes fade {
303+
from {
304+
opacity: 0;
305+
transform: translate(0, 30px);
306+
}
307+
308+
to {
309+
opacity: 1;
310+
transform: translate(0, 0);
311+
}
312+
}
274313
}
275314

276315
.buttons-unit {
@@ -288,6 +327,20 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
288327
}
289328
}
290329

330+
h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor {
331+
margin-top: -50px;
332+
position: absolute;
333+
}
334+
335+
h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-link, h5:hover .hash-link, h6:hover .hash-link {
336+
visibility: visible;
337+
}
338+
339+
.hash-link {
340+
color: #aaa;
341+
visibility: hidden;
342+
}
343+
291344
.nav-docs {
292345
color: @text-color;
293346
font-size: 13px;
@@ -349,38 +402,13 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
349402
}
350403

351404
.marketing-row {
352-
*zoom: 1;
353-
margin: 50px auto;
354-
}
355-
356-
.marketing-row:before, .marketing-row:after {
357-
content: " ";
358-
display: table;
359-
}
360-
361-
.marketing-row:after {
362-
clear: both;
405+
display: flex;
406+
justify-content: space-between;
363407
}
364408

365409
.marketing-col {
366-
float: left;
367-
margin-left: 40px;
368-
width: 300px;
369-
}
370-
371-
.marketing-col h3 {
372-
color: @text-color;
373-
font-size: 24px;
374-
font-weight: 300;
375-
text-transform: uppercase;
376-
}
377-
378-
.marketing-col p {
379-
font-size: 16px;
380-
}
381-
382-
.marketing-col:first-child {
383-
margin-left: 0;
410+
flex: 1;
411+
width: 320px;
384412
}
385413

386414
.home-bottom-section {
@@ -554,7 +582,6 @@ section.black content {
554582
margin-top: 5em;
555583
}
556584

557-
small code,
558585
li code,
559586
p code {
560587
.code-font(15px);

site/_css/prism.less

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
.prism {
2222
.code-font();
23-
text-shadow: 0 1px white;
2423
direction: ltr;
2524
text-align: left;
2625
white-space: pre;
@@ -53,10 +52,13 @@
5352
position: absolute;
5453
right: 0;
5554
}
55+
}
56+
57+
.not(code) > pre.prism {
58+
text-shadow: 0 1px white;
5659

57-
::-moz-selection, ::selection {
60+
&::-moz-selection, &::selection {
5861
text-shadow: none;
59-
background: #b3d4fc;
6062
}
6163
}
6264

site/index.html.js

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var Site = require('./_core/Site');
33
var SiteData = require('./_core/SiteData');
44
var HeaderLinks = require('./_core/HeaderLinks');
55
var Marked = require('./_core/Marked');
6+
var Prism = require('./_core/Prism');
67
var Search = require('./_core/Search');
78

89
var index = React.createClass({
@@ -22,12 +23,43 @@ var index = React.createClass({
2223
</header>
2324

2425
<div className="content">
25-
<img className="main-logo" src="/img/logo.svg" width="240" height="240" />
26+
<img className="main-logo" src="/img/logo.svg" width="120" height="120" />
2627
<h1>GraphQL</h1>
27-
<h3>
28-
{SiteData.description}
29-
</h3>
3028
</div>
29+
30+
<section className="marketing-row">
31+
<div className="marketing-col">
32+
<h4>Describe your data</h4>
33+
<Prism>
34+
{`type Project {
35+
name: String
36+
tagline: String
37+
contributors: [User]
38+
}`}
39+
</Prism>
40+
</div>
41+
<div className="marketing-col">
42+
<h4>Ask for what you want</h4>
43+
<Prism>
44+
{`{
45+
project(name: "GraphQL") {
46+
tagline
47+
}
48+
}`}
49+
</Prism>
50+
</div>
51+
<div className="marketing-col">
52+
<h4>Get predictable results</h4>
53+
<Prism>
54+
{`{
55+
"project": {
56+
"tagline": "A query language for APIs"
57+
}
58+
}`}
59+
</Prism>
60+
</div>
61+
</section>
62+
3163
</div>
3264
</div>
3365

0 commit comments

Comments
 (0)