Added default logo to the page

This commit is contained in:
Brian Peacock 2014-05-12 09:35:53 -05:00
parent daaee2b971
commit f5b9e0e0d5
3 changed files with 3 additions and 12 deletions

View File

@ -11,9 +11,7 @@
<body>
<header>
<div id='header-inner'>
{{#if logo}}
<a href='/'><img id='logo' alt='{{ name }}' title='{{ name }}' src='/-/logo' /></a>
{{/if}}
<div class='center'>
<article id='setup'>

View File

@ -138,8 +138,7 @@ module.exports = function(config_hash) {
res.send(template({
name: config.title || "Sinopia",
packages: packages,
baseUrl: config.root || req.protocol + '://' + req.get('host') + '/',
logo: config.logo
baseUrl: config.root || req.protocol + '://' + req.get('host') + '/'
}));
});
});
@ -247,13 +246,7 @@ module.exports = function(config_hash) {
});
app.get('/-/logo', function(req, res, next) {
if(config.logo) {
res.sendfile(config.logo);
}
else {
res.status(404);
res.send("File Not Found");
}
res.sendfile(config.logo ? config.logo : __dirname + "/static/logo.png");
});
// Search

BIN
lib/static/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB