-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sascha Becker
committed
Apr 20, 2016
1 parent
9b28798
commit 618de6e
Showing
43 changed files
with
1,610 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"presets": [ | ||
"meteor" | ||
], | ||
"plugins": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file contains information which helps Meteor properly upgrade your | ||
# app when you run 'meteor update'. You should check it into version control | ||
# with your project. | ||
|
||
notices-for-0.9.0 | ||
notices-for-0.9.1 | ||
0.9.4-platform-file | ||
notices-for-facebook-graph-api-2 | ||
1.2.0-standard-minifiers-package | ||
1.2.0-meteor-platform-split | ||
1.2.0-cordova-changes | ||
1.2.0-breaking-changes | ||
1.3.0-split-minifiers-package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file contains a token that is unique to your project. | ||
# Check it into your repository along with the rest of this directory. | ||
# It can be used for purposes such as: | ||
# - ensuring you don't accidentally deploy one app on top of another | ||
# - providing package authors with aggregated statistics | ||
|
||
jtrb9d5dyqx14nvzjk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Meteor packages used by this project, one per line. | ||
# Check this file (and the other files in this directory) into your repository. | ||
# | ||
# 'meteor add' and 'meteor remove' will edit this file for you, | ||
# but you can also edit it by hand. | ||
|
||
meteor-base # Packages every Meteor app needs to have | ||
mobile-experience # Packages for a great mobile UX | ||
mongo # The database Meteor supports right now | ||
blaze-html-templates # Compile .html files into Meteor Blaze views | ||
session # Client-side reactive dictionary for your app | ||
jquery # Helpful client-side library | ||
tracker # Meteor's client-side reactive programming library | ||
|
||
es5-shim # ECMAScript 5 compatibility for older browsers. | ||
gadicc:ecmascript-hot # Enable ECMAScript2015+ syntax in app code | ||
|
||
accounts-password | ||
constellation:console | ||
kadira:dochead | ||
random | ||
standard-minifier-js | ||
standard-minifier-css | ||
kadira:flow-router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
server | ||
browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { configure } from '@kadira/storybook'; | ||
import { disable } from 'react-komposer'; | ||
|
||
disable(); | ||
|
||
function loadStories() { | ||
require('../client/modules/core/components/.stories'); | ||
// require as many as .stories you need. | ||
} | ||
|
||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "../.babelrc", | ||
|
||
"env": { | ||
"development": { | ||
"plugins": [ | ||
["react-transform", { | ||
"transforms": [{ | ||
"transform": "react-transform-hmr", | ||
"imports": ["react"], | ||
"locals": ["module"] | ||
}, { | ||
"transform": "react-transform-catch-errors", | ||
"imports": ["react", "redbox-react"] | ||
}] | ||
}] | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { Tracker } from 'meteor/tracker'; | ||
import { FlowRouter } from 'meteor/kadira:flow-router'; | ||
// Redux | ||
import { createStore } from 'redux'; | ||
|
||
const defaultState = { time: new Date().toString() }; | ||
|
||
export default function ({ reducer }) { | ||
return { | ||
Meteor, | ||
Tracker, | ||
FlowRouter, | ||
Store: createStore(reducer, defaultState), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { createApp } from 'mantra-core'; | ||
import initContext from './configs/context'; | ||
|
||
// Redux | ||
import { combineReducers } from 'redux'; | ||
|
||
// Modules | ||
import coreModule from './modules/core'; | ||
//import userModule from './modules/user'; | ||
|
||
import injectTapEventPlugin from 'react-tap-event-plugin'; | ||
injectTapEventPlugin(); | ||
|
||
const coreReducers = coreModule.reducer; | ||
//const userReducers = userModule.reducer; | ||
|
||
// Combine Reducers | ||
const reducer = combineReducers({ | ||
...coreReducers, | ||
//...userReducers, | ||
}); | ||
|
||
console.log("coreModule Reducer"); | ||
console.log(coreModule.reducer); | ||
|
||
console.log("combined reducer"); | ||
console.log(reducer); | ||
|
||
// Init Context | ||
const context = initContext({ reducer }); | ||
|
||
console.log("context"); | ||
console.log(context); | ||
|
||
// Create App | ||
const app = createApp(context); | ||
app.loadModule(coreModule); | ||
// app.loadModule(userModule); | ||
app.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const SET_USER = 'SET_USER'; | ||
const MENU_TOGGLE = 'MENU_TOGGLE'; | ||
const SNACKBAR_TOGGLE = 'SNACKBAR_TOGGLE'; | ||
|
||
export const post = { | ||
setUser(user) { | ||
return { type: SET_USER, user }; | ||
}, | ||
toggleMenu(open) { | ||
console.log("togglemenu action"); | ||
console.log(open); | ||
return { type: MENU_TOGGLE, open }; | ||
}, | ||
toggleSnackbar(open) { | ||
return { type: SNACKBAR_TOGGLE, open }; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//import './test'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import AppBar from 'material-ui/AppBar'; | ||
import { useDeps } from 'mantra-core'; | ||
|
||
const styles = { | ||
content: { | ||
// position: "fixed", | ||
// minHeight: 0, | ||
height: 300, | ||
backgroundSize: 'cover', | ||
backgroundPosition: '50% 50%', | ||
backgroundImage: 'url(http://lorempixel.com/1600/300/nature)', | ||
}, | ||
title: {}, | ||
}; | ||
|
||
class DefaultToolbarImpl extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
mobileView: window.innerWidth < 1024, | ||
}; | ||
|
||
this.handleResize = () => { | ||
this.setState({ | ||
mobileView: window.innerWidth < 1024, | ||
}); | ||
}; | ||
} | ||
|
||
componentDidMount() { | ||
window.addEventListener('resize', this.handleResize); | ||
} | ||
|
||
componentWillUnmount() { | ||
window.removeEventListener('resize', this.handleResize); | ||
} | ||
|
||
toggleMenu() { | ||
console.log(this.props.menuOpen); | ||
if (this.state.mobileView) { | ||
this.props.store.dispatch(this.props.toggleMenu(this.props.menuOpen)); | ||
} | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<AppBar | ||
style={styles.content} | ||
title={this.props.title} | ||
titleStyle={styles.title} | ||
onLeftIconButtonTouchTap={() => this.toggleMenu()} | ||
showMenuIconButton={this.state.mobileView} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
const depsToPropsMapper = (context, actions) => ({ | ||
menuOpen: context.Store.getState().menu.menuOpen, | ||
store: context.Store, | ||
toggleMenu: actions.post.toggleMenu, | ||
}); | ||
|
||
export const DefaultToolbar = useDeps(depsToPropsMapper)(DefaultToolbarImpl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
|
||
export class Home extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="home"> | ||
<h1>HTML Ipsum Presents</h1> | ||
|
||
<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis | ||
egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit | ||
amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit | ||
amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, | ||
ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis | ||
tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p> | ||
|
||
<h2>Header Level 2</h2> | ||
|
||
<ol> | ||
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li> | ||
<li>Aliquam tincidunt mauris eu risus.</li> | ||
</ol> | ||
|
||
<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis | ||
aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis | ||
mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p> | ||
</blockquote> | ||
|
||
<h3>Header Level 3</h3> | ||
|
||
<ul> | ||
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li> | ||
<li>Aliquam tincidunt mauris eu risus.</li> | ||
</ul> | ||
</div> | ||
); | ||
} | ||
} |
Oops, something went wrong.