Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha Greif committed Dec 29, 2016
0 parents commit aff5d14
Show file tree
Hide file tree
Showing 45 changed files with 1,828 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
.gatsby-context.js
.sass-cache/
38 changes: 38 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# back to language cpp to try to bypass osx node failure
language: cpp
sudo: false
env:
- export NODE_VERSION="0.12"
- export NODE_VERSION="4"
- export NODE_VERSION="5"
os:
- linux
- osx
# pre-install to bring in the correct version of node via nvm
before_install:
- git submodule update --init --recursive
- git clone https://github.com/creationix/nvm.git ./.nvm
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- npm config set python `which python`
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CC="gcc-4.8";
export CXX="g++-4.8";
export LINK="gcc-4.8";
export LINKXX="g++-4.8";
fi
- gcc --version
- g++ --version
# node 4 depends on gcc 4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- gcc-4.8
# script needed to test, because defaults don't work on osx
script:
- npm install
- npm run lint
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 gatsbyjs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# gatsby-starter-default
The default Gatsby starter

Install this starter (assuming Gatsby is installed) by running from your CLI:
```
gatsby new gatsby-example-site
```
14 changes: 14 additions & 0 deletions components/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'
import {FooterContainer} from './styled/styled.js';
import MarkdownIt from 'markdown-it'
const md = new MarkdownIt()

const contents = `
Made with [Gatsby](https://github.com/gatsbyjs/gatsby).
`

const Footer = () =>

<FooterContainer dangerouslySetInnerHTML={{ __html: md.render(contents) }} />

export default Footer
13 changes: 13 additions & 0 deletions components/item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'
import MarkdownIt from 'markdown-it'
const md = new MarkdownIt()

import {ItemTitle, ItemDescription, ItemBlock} from './styled/styled.js';

const Item = ({title, description, url}) =>
<ItemBlock className="item">
<ItemTitle className="item-title"><a href={url}>{title}</a></ItemTitle>
{description ? <ItemDescription className="item-description" dangerouslySetInnerHTML={{ __html: md.render(description) }} /> : null }
</ItemBlock>

export default Item
19 changes: 19 additions & 0 deletions components/menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'
import {MenuContainer, LogoBlock, Logo, MenuLink} from './styled/styled.js';

import icons from '../data/icons.yaml'

const Menu = () =>

<MenuContainer>

<LogoBlock><a href="#"><Logo dangerouslySetInnerHTML={{__html: icons.sg}}/><span>Sacha Greif</span></a></LogoBlock>

<MenuLink href="#"><span dangerouslySetInnerHTML={{__html: icons.smiley}}/></MenuLink>
<MenuLink href="#"><span dangerouslySetInnerHTML={{__html: icons.robot}}/></MenuLink>
<MenuLink href="#"><span dangerouslySetInnerHTML={{__html: icons.writing}}/></MenuLink>
<MenuLink href="#"><span dangerouslySetInnerHTML={{__html: icons.robot}}/></MenuLink>
<MenuLink href="#"><span dangerouslySetInnerHTML={{__html: icons.robot}}/></MenuLink>
</MenuContainer>

export default Menu
27 changes: 27 additions & 0 deletions components/section-about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react'
import MarkdownIt from 'markdown-it'
const md = new MarkdownIt()

import {LogoBlock, Logo, SectionBlock, SectionContents, SectionTitle, AboutDescription, SocialIcon, SocialLinks} from './styled/styled.js';

import Item from './item.js'
import icons from '../data/icons.yaml'

const SectionAbout = ({title, description, social, index}) =>

<SectionBlock className="section" index={index}>

{/*<LogoBlock><Logo dangerouslySetInnerHTML={{__html: icons.sg}}/><span>Sacha Greif</span></LogoBlock>*/}

<SectionContents>
{description ? <AboutDescription dangerouslySetInnerHTML={{ __html: md.render(description) }} /> : null }

<SocialLinks className="social-links">

{social.map((item, index) => <SocialIcon key={index}><a title={item.title} href={item.url} dangerouslySetInnerHTML={{__html: icons[item.title.toLowerCase()]}}/></SocialIcon>)}

</SocialLinks>
</SectionContents>
</SectionBlock>

export default SectionAbout
105 changes: 105 additions & 0 deletions components/section.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import React from 'react'
import {SectionBlock, SectionContents, SectionTitle, SectionDescription, Items} from './styled/styled.js';

import * as d3 from "d3";
import textures from 'textures'
import d3Wrap from 'react-d3-wrap'

console.log(d3)
console.log(textures)

import MarkdownIt from 'markdown-it'
const md = new MarkdownIt()

import Item from './item.js'

const Texture = d3Wrap({

update (svg, data, options) {

const d3svg = d3.select(svg)
// .attr("viewBox", "0 0 100 100")
// .attr("preserveAspectRatio", "none")
let t

switch(options.index) {
case 1:
t = textures.paths()
.d("woven")
.lighter()
.stroke("rgba(0,0,0,0.1)")
.size(20)
break

case 2:
t = textures.paths()
.d("nylon")
.lighter()
.stroke("rgba(0,0,0,0.1)")
.size(30)
break

case 3:
t = textures.paths()
.d("caps")
.lighter()
.stroke("rgba(0,0,0,0.1)")
.size(20)
break

case 4:
// t = textures.paths()
// .d("hexagons")
// .lighter()
// .stroke("rgba(0,0,0,0.1)")
// .size(20)
t = textures.lines()
.lighter()
.stroke("rgba(0,0,0,0.1)")
break

case 5:
t = textures.paths()
.d("crosses")
.lighter()
.stroke("rgba(0,0,0,0.1)")
.size(20)
break
}

d3svg.call(t);

d3svg.append("rect")
.attr("x", 0)
.attr("y", 0)
.attr("height", 3000)
.attr("width", 3000)
.style("fill", t.url())

},
})


const Section = ({title, description, items, index, background, text}) =>

<SectionBlock className="section" style2={{background: `rgba(0,0,0,${0+index/30})`, backgroundColor: background, color: text}} index={index}>

<Texture className="svg-background" width={100} height={100} data={{}} options={{index}}/>

<SectionContents>

<SectionTitle className="section-title">{title}</SectionTitle>

{description ? <SectionDescription className="item-description" dangerouslySetInnerHTML={{ __html: md.render(description) }} /> : null }

<Items>

{items.map((item, index) => <Item {...item} key={index}/>)}

</Items>

</SectionContents>

</SectionBlock>

export default Section
Empty file added components/styled/item-title.js
Empty file.
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit aff5d14

Please sign in to comment.