Skip to content

Commit b80c40f

Browse files
committed
faux graphiql
1 parent b499781 commit b80c40f

File tree

3 files changed

+63
-17
lines changed

3 files changed

+63
-17
lines changed

site/_css/index.less

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,12 @@ body.index {
152152
text-align: center;
153153
max-width: 760px;
154154
padding-top: 4em;
155-
padding-bottom: 4em;
155+
padding-bottom: 2em;
156156
}
157157

158158
.grayWash {
159159
background: #f3f4f6;
160+
position: relative;
160161
}
161162

162163
section.point1 {
@@ -169,6 +170,36 @@ body.index {
169170
.prose {
170171
max-width: 415px;
171172
}
173+
174+
.faux-graphiql {
175+
border: 1px solid transparent;
176+
border-image: url(http://github.com/%3Cspan%20class=%22pl-s%22%3E/img/terminal.png%3C/span%3E) repeat;
177+
border-image-slice: 190 210 190 234;
178+
border-image-width: 95px 105px 95px 117px;
179+
padding: 54px 55px 79px 55px;
180+
margin-bottom: -40px;
181+
margin-left: -70px;
182+
width: 570px;
183+
height: 450px;
184+
display: flex;
185+
flex-direction: column;
186+
pointer-events: none;
187+
188+
.query, .response {
189+
flex: 1;
190+
}
191+
192+
.query {
193+
border-bottom: solid 5px #e0e0e0;
194+
}
195+
196+
.prism {
197+
box-shadow: none;
198+
background: none;
199+
margin: 0;
200+
padding: 1ch;
201+
}
202+
}
172203
}
173204

174205
section.point2 {
@@ -186,6 +217,7 @@ body.index {
186217
width: 476px;
187218
height: 370px;
188219
position: relative;
220+
pointer-events: none;
189221

190222
& > img {
191223
position: absolute;
@@ -194,23 +226,25 @@ body.index {
194226
right: -10px;
195227
}
196228

229+
.prism {
230+
box-shadow: none;
231+
background: none;
232+
margin: 0;
233+
padding: 0;
234+
}
235+
197236
.query, .response {
198237
position: absolute;
199-
200-
.prism {
201-
box-shadow: none;
202-
background: none;
203-
}
204238
}
205239

206240
.query {
207241
animation: query-up 6s 0s infinite ease-in both;
208-
left: 155px;
242+
left: 165px;
209243

210244
@keyframes query-up {
211245
from {
212246
opacity: 0;
213-
top: 160px;
247+
top: 170px;
214248
}
215249

216250
5%, 25% {
@@ -222,20 +256,20 @@ body.index {
222256
}
223257

224258
50%, 100% {
225-
top: 90px;
259+
top: 100px;
226260
opacity: 0;
227261
}
228262
}
229263
}
230264

231265
.response {
232266
animation: response-down 6s 2.3s infinite ease-out both;
233-
left: 115px;
267+
left: 125px;
234268

235269
@keyframes response-down {
236270
0% {
237271
opacity: 0;
238-
top: 70px;
272+
top: 80px;
239273
}
240274

241275
10% {
@@ -248,7 +282,7 @@ body.index {
248282

249283
50%, 100% {
250284
opacity: 0;
251-
top: 130px;
285+
top: 140px;
252286
}
253287
}
254288
}

site/img/terminal.png

16.4 KB
Loading

site/index.html.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,27 @@ var index = React.createClass({
7474
developer&nbsp;tools.</p>
7575
</section>
7676

77-
7877
<section className="point1">
79-
<Prism>
80-
{`{
78+
<div className="faux-graphiql" aria-hidden>
79+
<div className="query">
80+
<Prism>
81+
{`{
8182
me {
8283
name
8384
}
8485
}`}
85-
</Prism>
86+
</Prism>
87+
</div>
88+
<div className="response">
89+
<Prism>
90+
{`{
91+
"me": {
92+
"name": "Luke Skywalker"
93+
}
94+
}`}
95+
</Prism>
96+
</div>
97+
</div>
8698
<div className="prose">
8799
<h2>Ask for what you need,<br />get exactly that</h2>
88100
{/*[Illustration: just a simple query and response?]*/}
@@ -106,7 +118,7 @@ var index = React.createClass({
106118
your app needs in a single request. Apps using GraphQL are quick
107119
even on slow mobile network&nbsp;connections.</p>
108120
</div>
109-
<div className="app-to-server">
121+
<div className="app-to-server" aria-hidden>
110122
<img src="/img/phone.svg" width="496" height="440" />
111123
<div className="query">
112124
<Prism>

0 commit comments

Comments
 (0)