diff --git a/client/homebrew/homebrew.jsx b/client/homebrew/homebrew.jsx
index 27d39ff..f1bc168 100644
--- a/client/homebrew/homebrew.jsx
+++ b/client/homebrew/homebrew.jsx
@@ -4,7 +4,7 @@ var cx = require('classnames');
var CreateRouter = require('pico-router').createRouter;
-var MainPage = require('./pages/mainPage/mainPage.jsx');
+var HomePage = require('./pages/homePage/homePage.jsx');
var EditPage = require('./pages/editPage/editPage.jsx');
var SharePage = require('./pages/sharePage/sharePage.jsx');
var NewPage = require('./pages/newPage/newPage.jsx');
@@ -41,7 +41,7 @@ var Homebrew = React.createClass({
'/homebrew/new' : (args) => {
return
},
- '/homebrew*' : ,
+ '/homebrew*' : ,
});
},
render : function(){
diff --git a/client/main/main.jsx b/client/main/main.jsx
index 54bd35d..541db02 100644
--- a/client/main/main.jsx
+++ b/client/main/main.jsx
@@ -5,40 +5,61 @@ var cx = require('classnames');
var Router = require('pico-router');
var Main = React.createClass({
+ getDefaultProps: function() {
+ return {
+ tools : [
+ {
+ id : 'homebrew',
+ path : '/homebrew',
+ name : 'The Homebrewery',
+ icon :
+
+
+
+ ,
+ desc : 'Make authentic-looking 5e homebrews using Markdown',
+
+ show : true,
+ beta : false
+ }
+
+ ]
+ };
+ },
+
+ naturalCritLogo : ,
+
+ renderTool : function(tool){
+ return
+
+ {tool.icon}
+
{tool.name}
+
{tool.desc}
+
+ ;
+ },
+
+ renderTools : function(){
+ return _.map(this.props.tools, (tool)=>{
+ return this.renderTool(tool);
+ });
+ },
render : function(){
return
-
-
-
-
+
+ {this.naturalCritLogo}
+
+ Natural
+ Crit
+
+
Top-tier tools for the discerning DM
-
-
- {/* Replace with anchor tag */}
-
-
-
- {/*
*/}
-
The Homebrewery
-
Make authentic-looking 5e homebrews using Markdown
-
-
-
- {/*
-
-
-
-
Combat Manager
-
Easily create and manage complex encouters for your party
-
-
- */}
+ {this.renderTools()}
-
}
});
diff --git a/client/main/main.less b/client/main/main.less
index 66d0da3..76d7db4 100644
--- a/client/main/main.less
+++ b/client/main/main.less
@@ -1,9 +1,18 @@
+/*
@import 'naturalcrit/styles/reset.less';
//@import 'naturalcrit/styles/elements.less';
@import 'naturalcrit/styles/animations.less';
@import 'naturalcrit/styles/colors.less';
@import 'naturalcrit/styles/tooltip.less';
+@font-face {
+ font-family : CodeLight;
+ src : url('/assets/naturalcrit/logo/CODE Light.otf');
+}
+@font-face {
+ font-family : CodeBold;
+ src : url('/assets/naturalcrit/logo/CODE Bold.otf');
+}
html,body, #reactContainer{
min-height: 100vh;
height: 100vh;
@@ -11,6 +20,10 @@ html,body, #reactContainer{
font-family : 'Open Sans', sans-serif;
}
+*/
+
+@import 'naturalcrit/styles/core.less';
+
.main{
height : 100vh;
@@ -26,6 +39,15 @@ html,body, #reactContainer{
color : black;
svg{
fill : black;
+ height: .9em;
+ margin-right: .2em;
+ cursor: pointer;
+ }
+ .name{
+ font-family: 'CodeLight';
+ .crit{
+ font-family: 'CodeBold';
+ }
}
}
p{
@@ -38,7 +60,7 @@ html,body, #reactContainer{
.tools{
width : 100%;
text-align : center;
- .toolContainer{
+ .tool{
.sequentialDelay(0.5s, 1s);
.fadeInDown(1s);
.keep();
@@ -46,10 +68,13 @@ html,body, #reactContainer{
cursor : pointer;
opacity : 0;
text-align : center;
- border-right : 1px solid #333;
- &:last-child{
- border : none;
+ text-decoration: none;
+ color : black;
+
+ &+.tool{
+ border-left : 1px solid #333;
}
+
.content{
.addSketch(360px);
.animateAll(0.5s);
diff --git a/gulpfile.js b/gulpfile.js
index 21b3c83..a06b07b 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -8,21 +8,15 @@ var gulp = vitreumTasks(gulp, {
entryPoints: [
'./client/main',
'./client/homebrew',
-
'./client/admin'
],
DEV: true,
-
buildPath: "./build/",
pageTemplate: "./client/template.dot",
-
projectModules: ["./shared/naturalcrit","./shared/codemirror"],
-
additionalRequirePaths : ['./shared', './node_modules'],
-
assetExts: ["*.svg", "*.png", "*.jpg", "*.pdf", "*.eot", "*.otf", "*.woff", "*.woff2", "*.ico", "*.ttf"],
-
serverWatchPaths: ["server"],
serverScript: "server.js",
libs: [
@@ -36,13 +30,8 @@ var gulp = vitreumTasks(gulp, {
"codemirror/mode/gfm/gfm.js",
'codemirror/mode/javascript/javascript.js',
-
- //"jsoneditor",
-
"moment",
-
"superagent",
-
"marked",
"pico-router",
"pico-flux"
diff --git a/server.js b/server.js
index 793ddfc..ebd6f4a 100644
--- a/server.js
+++ b/server.js
@@ -49,9 +49,9 @@ app = require('./server/homebrew.server.js')(app);
app.get('*', function (req, res) {
vitreumRender({
- page: './build/home/bundle.dot',
+ page: './build/main/bundle.dot',
globals:{},
- prerenderWith : './client/home/home.jsx',
+ prerenderWith : './client/main/main.jsx',
initialProps: {
url: req.originalUrl
},
diff --git a/shared/naturalcrit/homebrewIcon.svg.jsx b/shared/naturalcrit/homebrewIcon.svg.jsx
deleted file mode 100644
index 69e33eb..0000000
--- a/shared/naturalcrit/homebrewIcon.svg.jsx
+++ /dev/null
@@ -1,13 +0,0 @@
-var React = require('react');
-
-var Logo = React.createClass({
- render : function(){
- return
-
-
-
-
- }
-});
-
-module.exports = Logo;
diff --git a/shared/naturalcrit/logo/logo.jsx b/shared/naturalcrit/logo/logo.jsx
deleted file mode 100644
index 2885b37..0000000
--- a/shared/naturalcrit/logo/logo.jsx
+++ /dev/null
@@ -1,21 +0,0 @@
-var React = require('react');
-var Icon = require('naturalcrit/icon.svg.jsx');
-
-var Logo = React.createClass({
- getDefaultProps: function() {
- return {
- hoverSlide : false
- };
- },
-
- render : function(){
- return
-
-
- NaturalCrit
-
-
- }
-});
-
-module.exports = Logo;
diff --git a/shared/naturalcrit/logo/logo.less b/shared/naturalcrit/logo/logo.less
deleted file mode 100644
index 72acf04..0000000
--- a/shared/naturalcrit/logo/logo.less
+++ /dev/null
@@ -1,38 +0,0 @@
-@font-face {
- font-family : CodeLight;
- src : url('/assets/naturalcrit/logo/CODE Light.otf');
-}
-@font-face {
- font-family : CodeBold;
- src : url('/assets/naturalcrit/logo/CODE Bold.otf');
-}
-
-
-.logo{
- color : white;
- text-decoration: none;
- display: block;
-
- svg{
- //vertical-align : middle;
- height : 0.9em;
- margin-right : 0.2em;
- cursor : pointer;
- fill : white;
- }
-
- span.name{
- //font-size: 1em;
- //line-height: 0.3em;
- font-family : 'CodeLight';
- span.crit{
- font-family : 'CodeBold';
- }
- small{
- font-size: 0.3em;
- font-family : 'Open Sans';
- font-weight: 800;
- text-transform: uppercase;
- }
- }
-}
\ No newline at end of file
diff --git a/shared/naturalcrit/logo/CODE Bold.otf b/shared/naturalcrit/styles/CODE Bold.otf
similarity index 100%
rename from shared/naturalcrit/logo/CODE Bold.otf
rename to shared/naturalcrit/styles/CODE Bold.otf
diff --git a/shared/naturalcrit/logo/CODE Light.otf b/shared/naturalcrit/styles/CODE Light.otf
similarity index 100%
rename from shared/naturalcrit/logo/CODE Light.otf
rename to shared/naturalcrit/styles/CODE Light.otf
diff --git a/shared/naturalcrit/styles/core.less b/shared/naturalcrit/styles/core.less
new file mode 100644
index 0000000..8b481b1
--- /dev/null
+++ b/shared/naturalcrit/styles/core.less
@@ -0,0 +1,20 @@
+@import 'naturalcrit/styles/reset.less';
+//@import 'naturalcrit/styles/elements.less';
+@import 'naturalcrit/styles/animations.less';
+@import 'naturalcrit/styles/colors.less';
+@import 'naturalcrit/styles/tooltip.less';
+
+@font-face {
+ font-family : CodeLight;
+ src : url('/assets/naturalcrit/styles/CODE Light.otf');
+}
+@font-face {
+ font-family : CodeBold;
+ src : url('/assets/naturalcrit/styles/CODE Bold.otf');
+}
+html,body, #reactContainer{
+ min-height: 100vh;
+ height: 100vh;
+ margin: 0;
+ font-family : 'Open Sans', sans-serif;
+}
\ No newline at end of file
diff --git a/shared/naturalcrit/combatIcon.svg.jsx b/shared/naturalcrit/svg/combat.svg.jsx
similarity index 100%
rename from shared/naturalcrit/combatIcon.svg.jsx
rename to shared/naturalcrit/svg/combat.svg.jsx
diff --git a/shared/naturalcrit/svg/homebrew.svg.jsx b/shared/naturalcrit/svg/homebrew.svg.jsx
new file mode 100644
index 0000000..bf863e5
--- /dev/null
+++ b/shared/naturalcrit/svg/homebrew.svg.jsx
@@ -0,0 +1,10 @@
+var React = require('react');
+
+var Logo = React.createClass({
+ render : function(){
+ return
+ {tool.name}
+ }
+});
+
+module.exports = Logo;
diff --git a/shared/naturalcrit/icon.svg.jsx b/shared/naturalcrit/svg/naturalcrit.svg.jsx
similarity index 100%
rename from shared/naturalcrit/icon.svg.jsx
rename to shared/naturalcrit/svg/naturalcrit.svg.jsx
diff --git a/todo.md b/todo.md
index 8bc244c..dc4b58e 100644
--- a/todo.md
+++ b/todo.md
@@ -17,14 +17,14 @@ X Partial rendering kills style tags on unrendered pages. Detect if pages have s
- Add in window.resize handlers for the elements that need it
X Add in a localstorage fallback on the `/new` page, clear it when they save
X Rename `/client/naturalCrit` -> `/client/main`
-- Move snippets into their new groups
+X Move snippets into their new groups
- Replace pseudo-elements with encoded images
- Make hybrid editor and brewRenderer (with resize listeners)
- add /source/shareId route
- Add stats nav item
- make both ids indexes in mongoose
- Fix main Page
-
+- Write new welcome message
## v1.6
- Add in brew title, use for metadata?