mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-13 13:16:49 +03:00
Added burger menu to the website
This commit is contained in:
parent
c4c3d0ef28
commit
62d045301a
41
docs/css/bm.css
Normal file
41
docs/css/bm.css
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/* Position and sizing of burger button */
|
||||||
|
.bm-burger-button {
|
||||||
|
position: absolute;
|
||||||
|
width: 24px;
|
||||||
|
height: 20px;
|
||||||
|
right: 36px;
|
||||||
|
top: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Color/shape of burger icon bars */
|
||||||
|
.bm-burger-bars {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Color of close button cross */
|
||||||
|
.bm-cross {
|
||||||
|
background: #bdc3c7;
|
||||||
|
margin-top: -1px;
|
||||||
|
width: 1px!important;
|
||||||
|
height: 18px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Background color of sidebar */
|
||||||
|
.bm-menu {
|
||||||
|
background: #3c3c3c;
|
||||||
|
box-shadow: -1px 0 5px rgba(0,0,0,.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Morph shape necessary with bubble or elastic */
|
||||||
|
.bm-morph-shape {
|
||||||
|
fill: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bm-menu-wrap {
|
||||||
|
z-index: 10000!important;
|
||||||
|
}
|
||||||
|
/* General menu styles */
|
||||||
|
.bm-menu {
|
||||||
|
padding: 2.5em 1.5em 0;
|
||||||
|
font-size: 1.15em;
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
@import 'jeet'
|
@import 'jeet'
|
||||||
|
|
||||||
@import 'hljs.css'
|
@import 'hljs.css'
|
||||||
|
@import 'bm.css'
|
||||||
@import 'https://fonts.googleapis.com/css?family=Raleway:400,500,600,200,100&.css'
|
@import 'https://fonts.googleapis.com/css?family=Raleway:400,500,600,200,100&.css'
|
||||||
|
|
||||||
normalize-css()
|
normalize-css()
|
||||||
|
@ -104,7 +105,36 @@ html, body
|
||||||
left 50%
|
left 50%
|
||||||
margin-left -3px
|
margin-left -3px
|
||||||
bottom -24px
|
bottom -24px
|
||||||
|
|
||||||
|
+below(600px)
|
||||||
|
display none
|
||||||
|
|
||||||
|
.bm-burger-button, .bm-menu-wrap, .bm-overlay
|
||||||
|
display none
|
||||||
|
+below(600px)
|
||||||
|
display block
|
||||||
|
|
||||||
|
.bm-burger-button
|
||||||
|
z-index 300!important
|
||||||
|
|
||||||
|
.bm-overlay
|
||||||
|
z-index 1000!important
|
||||||
|
|
||||||
|
.bm-item-list
|
||||||
|
a
|
||||||
|
font-family 'Raleway'
|
||||||
|
display block
|
||||||
|
font-size 15px
|
||||||
|
color #CCC
|
||||||
|
margin 6px 0
|
||||||
|
padding 10px 6px
|
||||||
|
text-transform uppercase
|
||||||
|
font-weight 500
|
||||||
|
line-height 20px
|
||||||
|
position relative
|
||||||
|
&:hover
|
||||||
|
color white
|
||||||
|
|
||||||
.header-logo
|
.header-logo
|
||||||
font-family 'Raleway'
|
font-family 'Raleway'
|
||||||
font-size 22px
|
font-size 22px
|
||||||
|
@ -254,6 +284,8 @@ $title
|
||||||
.markdown
|
.markdown
|
||||||
.wrapper
|
.wrapper
|
||||||
margin-top 60px
|
margin-top 60px
|
||||||
|
+below(600px)
|
||||||
|
margin-top 30px
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6
|
h1, h2, h3, h4, h5, h6
|
||||||
@extend $title
|
@extend $title
|
||||||
|
@ -313,6 +345,9 @@ $title
|
||||||
color: #585858;
|
color: #585858;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
|
|
||||||
|
+below(600px)
|
||||||
|
padding 30px 0
|
||||||
|
|
||||||
.docs
|
.docs
|
||||||
@extend $wrapper
|
@extend $wrapper
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"lodash": "^3.10.1",
|
"lodash": "^3.10.1",
|
||||||
"nib": "^1.1.0",
|
"nib": "^1.1.0",
|
||||||
"react": "^0.14.3",
|
"react": "^0.14.3",
|
||||||
|
"react-burger-menu": "^1.4.2",
|
||||||
"react-document-title": "^2.0.1",
|
"react-document-title": "^2.0.1",
|
||||||
"react-router": "^0.13.5",
|
"react-router": "^0.13.5",
|
||||||
"rupture": "^0.6.1",
|
"rupture": "^0.6.1",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { RouteHandler, Link, State } from 'react-router';
|
import { RouteHandler, Link, State } from 'react-router';
|
||||||
import Icon from 'assets/icon'
|
import Icon from 'assets/icon'
|
||||||
|
import {stack as Menu} from 'react-burger-menu';
|
||||||
|
|
||||||
import Header from './_header'
|
import Header from './_header'
|
||||||
import logo from '!raw!assets/logo.svg'
|
import logo from '!raw!assets/logo.svg'
|
||||||
|
@ -12,6 +13,12 @@ class Template extends React.Component {
|
||||||
var isIndex = path == '/';
|
var isIndex = path == '/';
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<Menu width={200} right>
|
||||||
|
<span><Link to="/try/">Try it out</Link></span>
|
||||||
|
<span><Link to="/docs/quickstart/" className={path.indexOf('/docs')==0?"active":null}>Docs</Link></span>
|
||||||
|
<span><Link to="/community/">Community</Link></span>
|
||||||
|
<a href="https://github.com/graphql-python/graphene/">Github</a>
|
||||||
|
</Menu>
|
||||||
<header className="header">
|
<header className="header">
|
||||||
<div className="header-wrapper">
|
<div className="header-wrapper">
|
||||||
<Link className="header-logo" to="/">
|
<Link className="header-logo" to="/">
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Template extends React.Component {
|
||||||
<div className="docs">
|
<div className="docs">
|
||||||
<aside className="docs-aside">
|
<aside className="docs-aside">
|
||||||
{aside_links}
|
{aside_links}
|
||||||
<select className="docs-aside-navselect" onChange={this.goToPage.bind(this)}>
|
<select className="docs-aside-navselect" value={this.props.page.path} onChange={this.goToPage.bind(this)}>
|
||||||
{aside_options}
|
{aside_options}
|
||||||
</select>
|
</select>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user