Skip to content

Commit 62d0453

Browse files
committed
Added burger menu to the website
1 parent c4c3d0e commit 62d0453

File tree

5 files changed

+86
-2
lines changed

5 files changed

+86
-2
lines changed

docs/css/bm.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* Position and sizing of burger button */
2+
.bm-burger-button {
3+
position: absolute;
4+
width: 24px;
5+
height: 20px;
6+
right: 36px;
7+
top: 42px;
8+
}
9+
10+
/* Color/shape of burger icon bars */
11+
.bm-burger-bars {
12+
background: white;
13+
}
14+
15+
/* Color of close button cross */
16+
.bm-cross {
17+
background: #bdc3c7;
18+
margin-top: -1px;
19+
width: 1px!important;
20+
height: 18px!important;
21+
}
22+
23+
/* Background color of sidebar */
24+
.bm-menu {
25+
background: #3c3c3c;
26+
box-shadow: -1px 0 5px rgba(0,0,0,.15);
27+
}
28+
29+
/* Morph shape necessary with bubble or elastic */
30+
.bm-morph-shape {
31+
fill: white;
32+
}
33+
34+
.bm-menu-wrap {
35+
z-index: 10000!important;
36+
}
37+
/* General menu styles */
38+
.bm-menu {
39+
padding: 2.5em 1.5em 0;
40+
font-size: 1.15em;
41+
}

docs/css/main.styl

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@import 'jeet'
33

44
@import 'hljs.css'
5+
@import 'bm.css'
56
@import 'https://fonts.googleapis.com/css?family=Raleway:400,500,600,200,100&.css'
67

78
normalize-css()
@@ -104,7 +105,36 @@ html, body
104105
left 50%
105106
margin-left -3px
106107
bottom -24px
107-
108+
109+
+below(600px)
110+
display none
111+
112+
.bm-burger-button, .bm-menu-wrap, .bm-overlay
113+
display none
114+
+below(600px)
115+
display block
116+
117+
.bm-burger-button
118+
z-index 300!important
119+
120+
.bm-overlay
121+
z-index 1000!important
122+
123+
.bm-item-list
124+
a
125+
font-family 'Raleway'
126+
display block
127+
font-size 15px
128+
color #CCC
129+
margin 6px 0
130+
padding 10px 6px
131+
text-transform uppercase
132+
font-weight 500
133+
line-height 20px
134+
position relative
135+
&:hover
136+
color white
137+
108138
.header-logo
109139
font-family 'Raleway'
110140
font-size 22px
@@ -254,6 +284,8 @@ $title
254284
.markdown
255285
.wrapper
256286
margin-top 60px
287+
+below(600px)
288+
margin-top 30px
257289

258290
h1, h2, h3, h4, h5, h6
259291
@extend $title
@@ -313,6 +345,9 @@ $title
313345
color: #585858;
314346
line-height: 50px;
315347

348+
+below(600px)
349+
padding 30px 0
350+
316351
.docs
317352
@extend $wrapper
318353

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"lodash": "^3.10.1",
2121
"nib": "^1.1.0",
2222
"react": "^0.14.3",
23+
"react-burger-menu": "^1.4.2",
2324
"react-document-title": "^2.0.1",
2425
"react-router": "^0.13.5",
2526
"rupture": "^0.6.1",

docs/pages/_template.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { RouteHandler, Link, State } from 'react-router';
33
import Icon from 'assets/icon'
4+
import {stack as Menu} from 'react-burger-menu';
45

56
import Header from './_header'
67
import logo from '!raw!assets/logo.svg'
@@ -12,6 +13,12 @@ class Template extends React.Component {
1213
var isIndex = path == '/';
1314
return (
1415
<div>
16+
<Menu width={200} right>
17+
<span><Link to="/try/">Try it out</Link></span>
18+
<span><Link to="/docs/quickstart/" className={path.indexOf('/docs')==0?"active":null}>Docs</Link></span>
19+
<span><Link to="/community/">Community</Link></span>
20+
<a href="https://github.com/graphql-python/graphene/">Github</a>
21+
</Menu>
1522
<header className="header">
1623
<div className="header-wrapper">
1724
<Link className="header-logo" to="/">

docs/pages/docs/_template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Template extends React.Component {
3737
<div className="docs">
3838
<aside className="docs-aside">
3939
{aside_links}
40-
<select className="docs-aside-navselect" onChange={this.goToPage.bind(this)}>
40+
<select className="docs-aside-navselect" value={this.props.page.path} onChange={this.goToPage.bind(this)}>
4141
{aside_options}
4242
</select>
4343
</aside>

0 commit comments

Comments
 (0)