Skip to content

Commit d44f18e

Browse files
author
Brandon Johnson
committed
Initial commit
0 parents  commit d44f18e

File tree

30 files changed

+627
-0
lines changed

30 files changed

+627
-0
lines changed

.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+
.gatsby-context.js
29+
.sass-cache/

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# back to language cpp to try to bypass osx node failure
2+
language: cpp
3+
sudo: false
4+
env:
5+
- export NODE_VERSION="0.12"
6+
- export NODE_VERSION="4"
7+
- export NODE_VERSION="5"
8+
os:
9+
- linux
10+
- osx
11+
# pre-install to bring in the correct version of node via nvm
12+
before_install:
13+
- git submodule update --init --recursive
14+
- git clone https://github.com/creationix/nvm.git ./.nvm
15+
- source ./.nvm/nvm.sh
16+
- nvm install $NODE_VERSION
17+
- nvm use $NODE_VERSION
18+
- npm config set python `which python`
19+
- if [ $TRAVIS_OS_NAME == "linux" ]; then
20+
export CC="gcc-4.8";
21+
export CXX="g++-4.8";
22+
export LINK="gcc-4.8";
23+
export LINKXX="g++-4.8";
24+
fi
25+
- gcc --version
26+
- g++ --version
27+
# node 4 depends on gcc 4.8
28+
addons:
29+
apt:
30+
sources:
31+
- ubuntu-toolchain-r-test
32+
packages:
33+
- g++-4.8
34+
- gcc-4.8
35+
# script needed to test, because defaults don't work on osx
36+
script:
37+
- npm install
38+
- npm run lint

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# JavaScriptMN
2+
This site is generated with [Gatsby.js]().
3+
4+
## Prerequisites
5+
Install the Gatsby command line tool with `npm i -g gatsby`.
6+
7+
## Develop
8+
Run `npm develop` and access the dev server at the address it reports.
9+
10+
## Build
11+
Run `npm build`, and a built version will be written to `/build`

components/meetup.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react'
2+
3+
export default class meetup extends React.Component {
4+
render () {
5+
const meetupStyles = {
6+
container: {
7+
textAlign: 'center',
8+
border: '1px solid black',
9+
display: 'inline block',
10+
margin: '8rem'
11+
},
12+
title: {
13+
fontSize: '2rem',
14+
margin: '1rem'
15+
},
16+
bug: {},
17+
rsvpButton: {}
18+
}
19+
20+
return (
21+
<div style={ meetupStyles.container }>
22+
<strong style={ meetupStyles.title }><p>{ this.props.title }</p></strong>
23+
<p style={ meetupStyles.bug }>{ this.props.date } | { this.props.location }</p>
24+
<a style={ meetupStyles.rsvpButton } target='_blank' href={ this.props.url }><p>RSVP</p></a>
25+
</div>
26+
)
27+
}
28+
}

config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
siteTitle="JavaScriptMN"

css/markdown-styles.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.warning {
2+
color: #9F6000;
3+
background-color: #FEEFB3;
4+
padding: 18px;
5+
}
6+
.warning:before {
7+
content:'\26A0';
8+
margin-right: 9px;
9+
}
10+
11+
.rfc-page pre {
12+
font-family: inherit;
13+
}
14+
15+
.hljs-comment,
16+
.hljs-quote {
17+
color: #998;
18+
font-style: italic;
19+
}
20+
21+
.hljs-keyword,
22+
.hljs-selector-tag,
23+
.hljs-subst {
24+
color: #333;
25+
font-weight: bold;
26+
}
27+
28+
.hljs-number,
29+
.hljs-literal,
30+
.hljs-variable,
31+
.hljs-template-variable,
32+
.hljs-tag .hljs-attr {
33+
color: #008080;
34+
}
35+
36+
.hljs-string,
37+
.hljs-doctag {
38+
color: #d14;
39+
}
40+
41+
.hljs-title,
42+
.hljs-section,
43+
.hljs-selector-id {
44+
color: #900;
45+
font-weight: bold;
46+
}
47+
48+
.hljs-subst {
49+
font-weight: normal;
50+
}
51+
52+
.hljs-type,
53+
.hljs-class .hljs-title {
54+
color: #458;
55+
font-weight: bold;
56+
}
57+
58+
.hljs-tag,
59+
.hljs-name,
60+
.hljs-attribute {
61+
color: #000080;
62+
font-weight: normal;
63+
}
64+
65+
.hljs-regexp,
66+
.hljs-link {
67+
color: #009926;
68+
}
69+
70+
.hljs-symbol,
71+
.hljs-bullet {
72+
color: #990073;
73+
}
74+
75+
.hljs-built_in,
76+
.hljs-builtin-name {
77+
color: #0086b3;
78+
}
79+
80+
.hljs-meta {
81+
color: #999;
82+
font-weight: bold;
83+
}
84+
85+
.hljs-deletion {
86+
background: #fdd;
87+
}
88+
89+
.hljs-addition {
90+
background: #dfd;
91+
}
92+
93+
.hljs-emphasis {
94+
font-style: italic;
95+
}
96+
97+
.hljs-strong {
98+
font-weight: bold;
99+
}

html.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React from 'react'
2+
import Helmet from 'react-helmet'
3+
4+
import { prefixLink } from 'gatsby-helpers'
5+
import { TypographyStyle, GoogleFont } from 'react-typography'
6+
import typography from './utils/typography'
7+
8+
const BUILD_TIME = new Date().getTime()
9+
10+
module.exports = React.createClass({
11+
propTypes () {
12+
return {
13+
body: React.PropTypes.string,
14+
}
15+
},
16+
render () {
17+
const head = Helmet.rewind()
18+
19+
let css
20+
if (process.env.NODE_ENV === 'production') {
21+
css = <style dangerouslySetInnerHTML={{ __html: require('!raw!./public/styles.css') }} />
22+
}
23+
24+
return (
25+
<html lang="en">
26+
<head>
27+
<meta charSet="utf-8" />
28+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
29+
<meta
30+
name="viewport"
31+
content="width=device-width, initial-scale=1.0"
32+
/>
33+
{head.title.toComponent()}
34+
{head.meta.toComponent()}
35+
<TypographyStyle typography={typography} />
36+
<GoogleFont typography={typography} />
37+
{css}
38+
</head>
39+
<body>
40+
<div id="react-mount" dangerouslySetInnerHTML={{ __html: this.props.body }} />
41+
<script src={prefixLink(`/bundle.js?t=${BUILD_TIME}`)} />
42+
</body>
43+
</html>
44+
)
45+
},
46+
})

loaders/markdown-loader/index.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
var frontMatter = require('front-matter')
2+
var markdownIt = require('markdown-it')
3+
var hljs = require('highlight.js')
4+
var objectAssign = require('object-assign')
5+
6+
var highlight = function (str, lang) {
7+
if ((lang !== null) && hljs.getLanguage(lang)) {
8+
try {
9+
return hljs.highlight(lang, str).value
10+
} catch (_error) {
11+
console.error(_error)
12+
}
13+
}
14+
try {
15+
return hljs.highlightAuto(str).value
16+
} catch (_error) {
17+
console.error(_error)
18+
}
19+
return ''
20+
}
21+
22+
var md = markdownIt({
23+
html: true,
24+
linkify: true,
25+
typographer: true,
26+
highlight,
27+
})
28+
.use(require('markdown-it-sub'))
29+
.use(require('markdown-it-footnote'))
30+
.use(require('markdown-it-deflist'))
31+
.use(require('markdown-it-abbr'))
32+
.use(require('markdown-it-attrs'))
33+
34+
module.exports = function (content) {
35+
this.cacheable()
36+
const meta = frontMatter(content)
37+
const body = md.render(meta.body)
38+
const result = objectAssign({}, meta.attributes, {
39+
body,
40+
})
41+
this.value = result
42+
return `module.exports = ${JSON.stringify(result)}`
43+
}

package.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "javascriptmn",
3+
"description": "JavaScriptMN website",
4+
"version": "1.0.0",
5+
"private": true,
6+
"author": "JavaScriptMN Organizers <javascriptmn@gmail.com",
7+
"dependencies": {
8+
"front-matter": "^2.1.1",
9+
"gatsby": "^0.12.20",
10+
"highlight.js": "^9.8.0",
11+
"history": "^2.0.2",
12+
"js-yaml": "^3.7.0",
13+
"markdown-it": "^7.0.1",
14+
"markdown-it-abbr": "^1.0.3",
15+
"markdown-it-attrs": "^0.6.3",
16+
"markdown-it-deflist": "^2.0.1",
17+
"markdown-it-footnote": "^3.0.1",
18+
"markdown-it-sub": "^1.0.0",
19+
"object-assign": "^4.1.0",
20+
"react-headroom": "^2.1.2",
21+
"react-helmet": "^3.2.2",
22+
"react-responsive-grid": "^0.3.3",
23+
"react-typography": "^0.15.0",
24+
"toml-js": "0.0.8",
25+
"typography": "^0.15.0",
26+
"typography-plugin-code": "^0.15.0"
27+
},
28+
"devDependencies": {
29+
"gh-pages": "^0.12.0"
30+
},
31+
"license": "MIT",
32+
"main": "n/a",
33+
"scripts": {
34+
"build": "gatsby build",
35+
"deploy": "gatsby build --prefix-links && gh-pages -d public",
36+
"develop": "gatsby develop",
37+
"test": "echo \"Error: no test specified\" && exit 1"
38+
}
39+
}

pages/404.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
path: /404.html
3+
---
4+
# NOT FOUND
5+
6+
You just hit a route that doesn't exist... the sadness.

0 commit comments

Comments
 (0)