From b734ee5c50c8b362b64542d807b11c0e81c3854c Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 7 May 2013 20:49:27 +0000 Subject: [PATCH] homepage complete, hero unit et al. --- app.js | 35 ++++++----------------------------- public/css/style.less | 33 +++++++++++++++++++++++++++++++-- public/templates/home.tpl | 9 +++++++++ 3 files changed, 46 insertions(+), 31 deletions(-) diff --git a/app.js b/app.js index 39edfd5d6b..0aa624af0e 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,6 @@ global.modules = modules; modules.templates.init(); modules.websockets.init(); - //setup scripts to be moved outside of the app in future. @@ -32,34 +31,12 @@ global.modules = modules; if (data.categories.length === 0) { console.log('Setting up default categories...'); - modules.categories.create({ - 'name': 'Announcements', - 'description': 'A place to talk about whateeeever you want', - 'blockclass': 'category-purple', - 'icon' : 'icon-bullhorn' - }); - - modules.categories.create({ - 'name': 'General Discussion', - 'description': 'A place to talk about whateeeever you want', - 'blockclass': 'category-purple', - 'icon' : 'icon-comment' - }); - - - modules.categories.create({ - 'name': 'NodeBB Development', - 'description': 'Bugs? Dont worry, we dont read this thread, so post them here.', - 'blockclass': 'category-purple', - 'icon' : 'icon-github-alt' - }); - - - modules.categories.create({ - 'name': 'Blogs', - 'description': 'In future an example of how a hidden category should look like.', - 'blockclass': 'category-purple', - 'icon' : 'icon-pencil' + modules.fs.readFile(config.ROOT_DIRECTORY + '/install/data/categories.json', function(err, categories) { + categories = JSON.parse(categories); + + for (var category in categories) { + modules.categories.create(categories[category]); + } }); } else console.log('Good.'); diff --git a/public/css/style.less b/public/css/style.less index 0dccfdfdf0..91443bc029 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -34,7 +34,7 @@ body { @media (min-width: 979px) { body { - padding-top: 60px; + padding-top: 70px; } } @@ -310,13 +310,17 @@ footer.footer { text-align: center; border-radius: 5px; margin: 0; - padding-top:20px; + padding-top:25px; cursor: pointer; + margin-bottom: 20px; } .category-row h4 { font-weight: 700; text-align: center; color: #555; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .category-row a { text-decoration: none; @@ -326,4 +330,29 @@ footer.footer { .category-purple { background: #ab1290; color: white; +} + +.category-darkblue { + background: #004C66; + color: white; +} + +.category-blue { + background: #0059B2; + color: white; +} + +.category-darkgreen { + background: #004000; + color: white; +} +.category-orange { + color: white; + background: #FF7A4D; +} + +.hero-unit { + background: #56BCDA; + color: white; + padding: 30px; } \ No newline at end of file diff --git a/public/templates/home.tpl b/public/templates/home.tpl index b99a57954e..b8b7b9692e 100644 --- a/public/templates/home.tpl +++ b/public/templates/home.tpl @@ -1,3 +1,12 @@ +
+

NodeBB

+

Welcome to NodeBB, the discussion platform of the future.

+

+ Get NodeBB + Fork us on Github + @dcplabs +

+