Skip to content

Commit c11a704

Browse files
author
Josh Price
committed
Initial commit copied from graphql-python/graphene/docs
0 parents  commit c11a704

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+7444
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"stage": 0
3+
}

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27+
node_modules
28+
29+
public/

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Graphene Docs
2+
3+
Graphene docs are powered by [gatsby](https://github.com/gatsbyjs/gatsby).
4+
5+
6+
## Installation
7+
8+
For running locally this docs. You have to execute
9+
```bash
10+
npm install -g gatsby && npm install
11+
```
12+
13+
And then
14+
15+
```bash
16+
gatsby develop
17+
```
18+
19+
## Playground
20+
21+
If you want to have the playground running too, just execute
22+
23+
```
24+
./playground/graphene-js/build.sh
25+
```
26+
27+
This command will clone the [pypyjs-release-nojit](https://github.com/pypyjs/pypyjs-release-nojit) repo, update it with the latest graphene, graphql-core and graphql-relay code, and make it available for the `/playground` view in the docs.
28+
29+
30+
## Build
31+
32+
For building the docs into the `public` dir, just run:
33+
34+
```bash
35+
npm run build
36+
```
37+
38+
39+
## Automation
40+
41+
Thanks to [Travis](https://github.com/graphql-python/graphene/blob/master/.travis.yml#L39-L58), we automated the way documentation is updated in the `gh-pages` branch.
42+
43+
Each time we modify the docs in the `master` branch the travis job runs and updates the `gh-pages` branch with the latest code, so [Graphene's website](http://graphene-python.org) have always the latest docs.

app.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
exports.loadContext = function(callback) {
2+
var context;
3+
context = require.context('./pages', true);
4+
if (module.hot) {
5+
module.hot.accept(context.id, function() {
6+
context = require.context('./pages', true);
7+
return callback(context);
8+
});
9+
}
10+
return callback(context);
11+
};
12+
13+
exports.onRouteChange = function(state) {
14+
if (typeof window !== "undefined" && window.ga) {
15+
window.ga('send', 'pageview', {
16+
page: state.pathname
17+
});
18+
}
19+
}

assets/icon.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
export default class Icon extends React.Component {
4+
render() {
5+
return <span {...this.props} src={null} dangerouslySetInnerHTML={{__html:this.props.src}} />
6+
}
7+
}

assets/logo.svg

Lines changed: 10 additions & 0 deletions
Loading

config.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
siteTitle = "Graphene"
2+
ga = "UA-12613282-7"
3+
4+
[docs.quickstart]
5+
name = "Quickstart"
6+
pages = [
7+
"/docs/quickstart/",
8+
]
9+
10+
[docs.walkthrough]
11+
name = "Walkthrough"
12+
pages = [
13+
"/docs/interfaces/",
14+
"/docs/objecttypes/",
15+
"/docs/mutations/",
16+
"/docs/basic-types/",
17+
"/docs/relay/",
18+
]
19+
20+
[docs.django]
21+
name = "Django"
22+
pages = [
23+
"/docs/django/tutorial/",
24+
"/docs/django/filtering/",
25+
]

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+
}

0 commit comments

Comments
 (0)