diff --git a/client/css/style.css b/client/css/style.css
index 6586869..ea2021e 100644
--- a/client/css/style.css
+++ b/client/css/style.css
@@ -451,3 +451,16 @@ input:hover {
}
+
+.notice-bar {
+ xbackground-color: #ccc;
+ opacity: .2;
+ padding: 0;
+ margin: 0;
+ xtext-align: center;
+ margin-left: 300px;
+}
+
+.notice-bar a {
+ color: #333;
+}
diff --git a/server.js b/server.js
index 016d573..d04c5b3 100644
--- a/server.js
+++ b/server.js
@@ -60,9 +60,16 @@ app.get('/', function(req, res) {
});
});
-app.get('/:id', function(req, res){
+app.get('/demo', function(req, res) {
res.render('index.jade', {
- locals: {pageTitle: 'scrumblr'}
+ locals: {pageTitle: 'scrumblr - demo', demo: true}
+ });
+});
+
+app.get('/:id', function(req, res){
+
+ res.render('index.jade', {
+ locals: {pageTitle: ('scrumblr - ' + req.params.id) }
});
});
@@ -572,33 +579,34 @@ function setUserName ( client, name )
}
+function cleanAndInitializeDemoRoom()
+{
+ // DUMMY DATA
+ redisClient.del(REDIS_PREFIX + '-room:/demo-cards', function (err, res) {
+ redisClient.del(REDIS_PREFIX + '-room:/demo-columns', function (err, res) {
+ createColumn( '/demo', 'Not Started' );
+ createColumn( '/demo', 'Started' );
+ createColumn( '/demo', 'Testing' );
+ createColumn( '/demo', 'Review' );
+ createColumn( '/demo', 'Complete' );
-// DUMMY DATA
-redisClient.del(REDIS_PREFIX + '-room:/demo-cards', function (err, res) {
- redisClient.del(REDIS_PREFIX + '-room:/demo-columns', function (err, res) {
- createColumn( '/demo', 'Not Started' );
- createColumn( '/demo', 'Started' );
- createColumn( '/demo', 'Testing' );
- createColumn( '/demo', 'Review' );
- createColumn( '/demo', 'Complete' );
+ createCard('/demo', 'card1', 'Hello this is fun', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'yellow');
+ createCard('/demo', 'card2', 'Hello this is a new story.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'white');
+ createCard('/demo', 'card3', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'blue');
+ createCard('/demo', 'card4', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'green');
-
- createCard('/demo', 'card1', 'Hello this is fun', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'yellow');
- createCard('/demo', 'card2', 'Hello this is a new story.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'white');
- createCard('/demo', 'card3', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'blue');
- createCard('/demo', 'card4', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'green');
-
- createCard('/demo', 'card5', 'Hello this is fun', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'yellow');
- createCard('/demo', 'card6', 'Hello this is a new card.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'yellow');
- createCard('/demo', 'card7', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'blue');
- createCard('/demo', 'card8', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'green');
+ createCard('/demo', 'card5', 'Hello this is fun', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'yellow');
+ createCard('/demo', 'card6', 'Hello this is a new card.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'yellow');
+ createCard('/demo', 'card7', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'blue');
+ createCard('/demo', 'card8', '.', roundRand(600), roundRand(300), Math.random() * 10 - 5, 'green');
+ });
});
-});
+}
//
-
+cleanAndInitializeDemoRoom();
diff --git a/views/index.jade b/views/index.jade
index 079f1ea..2706ad3 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -1,3 +1,6 @@
+- if (locals.demo)
+ div.notice-bar this is a demo board. to make a private board, go to scrumblr.ca
+
h1 scrumblr by aliasaria
div.board-outline
diff --git a/views/layout.jade b/views/layout.jade
index 5e17d20..4d06738 100644
--- a/views/layout.jade
+++ b/views/layout.jade
@@ -20,6 +20,6 @@ html(lang="en")
- title scrumblr
+ title= locals.pageTitle
body!= body