Skip to content

Commit

Permalink
add a notice that the demo is only a demo
Browse files Browse the repository at this point in the history
this is for visitors who don't read the docs and just arrive at the demo site -- i want them to know that the demo is not the whole product, just an example
  • Loading branch information
aliasaria committed Mar 12, 2011
1 parent 6749ffb commit 7f98cac
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 25 deletions.
13 changes: 13 additions & 0 deletions client/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
56 changes: 32 additions & 24 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ app.get('/', function(req, res) {
});
});

app.get('/demo', function(req, res) {
res.render('index.jade', {
locals: {pageTitle: 'scrumblr - demo', demo: true}
});
});

app.get('/:id', function(req, res){

res.render('index.jade', {
locals: {pageTitle: 'scrumblr'}
locals: {pageTitle: ('scrumblr - ' + req.params.id) }
});
});

Expand Down Expand Up @@ -572,33 +579,34 @@ function setUserName ( client, name )
}




// 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', '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');
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' );


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');
});
});
});
}
//



cleanAndInitializeDemoRoom();



Expand Down
3 changes: 3 additions & 0 deletions views/index.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- if (locals.demo)
div.notice-bar this is a demo board. to make a private board, go to <a href="http://scrumblr.ca">scrumblr.ca</a>

h1 <a href="http://scrumblr.ca">scrumblr</a> by <a href="http://aliasaria.ca">aliasaria</a>

div.board-outline
Expand Down
2 changes: 1 addition & 1 deletion views/layout.jade
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ html(lang="en")
<link href='http://fonts.googleapis.com/css?family=Rock+Salt' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Covered+By+Your+Grace' rel='stylesheet' type='text/css'>

title scrumblr
title= locals.pageTitle

body!= body

0 comments on commit 7f98cac

Please sign in to comment.