Skip to content

Commit

Permalink
Merge pull request #15 from gturri/custom
Browse files Browse the repository at this point in the history
Don't hard code Fabelier's name
  • Loading branch information
AlexFaraino committed Mar 3, 2014
2 parents 661746d + effa17d commit e42d9a2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions config.js.template
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
var config = {}

//The name of your place / your group
//Will be display on the web pages
config.place_name = "Local user group";

//On which port Node will listen
config.node_port = 8081;

//Url on which visitor are supposed to ring (don't specify a port here)
config.url = "http://localhost";

//Logo which will be displayed on the web pages
config.logo_url = "http://fabelier.org/f/Sticker0.png";

//Should the server be talkative on the console
config.verbose = false;

//Potential reverse proxy parameters
config.reverse_proxy = false;
config.reverse_proxy_port = 80;

//Should only visitors with the password be able to ring
config.use_password = false;
config.password = 123456;

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function sendTemplatedFile(req, res, filename, optionalJson){
fs.readFile(filename, function(err, data){
res.set('Content-Type', 'text/html');
if (err) res.send(err);
res.send(mustache.render(data.toString(), mergeJSON({url: url, logo_url: config.logo_url, password: config.use_password}, optionalJson)));
res.send(mustache.render(data.toString(), mergeJSON({url: url, logo_url: config.logo_url, password: config.use_password, config.place_name: config.place_name}, optionalJson)));
});
}

Expand Down
4 changes: 2 additions & 2 deletions monitor.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Fabelier Doorbell</title>
<title>{{place_name}} Doorbell</title>
<script src="/socket.io/socket.io.js"></script>

</head>
<body>
<h1>Fabelier door bell Monitor</h1>
<h1>{{place_name}} door bell Monitor</h1>

<div id="content" style='width: 500px; height: 300px; margin: 0 0 20px 0; border: solid 1px #999; overflow-y: scroll;'>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ring.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Fabelier Doorbell</title>
<title>{{place_name}} Doorbell</title>
<script src="/socket.io/socket.io.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<img src="{{logo_url}}" style="float: left; padding-right: 50px" alt="logo">
<div id=content>
<h1>Fabelier door bell</h1>
<h1>{{plac_name}} door bell</h1>
<p>Please, ring here ...and wait, please :)</p>
<div id="state" style="visibility: hidden;">Feedback...</div><br/>
{{#password}}
Expand Down

0 comments on commit e42d9a2

Please sign in to comment.