mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
Merge pull request #1124 from Wikinaut/fix-issue-377-add-favicon-url-settings-parameter
fix #377: add favicon url as optional settings.json parameter
This commit is contained in:
commit
28bcdcec25
6 changed files with 26 additions and 16 deletions
|
@ -6,6 +6,10 @@
|
||||||
{
|
{
|
||||||
// Name your instance!
|
// Name your instance!
|
||||||
"title": "Etherpad Lite",
|
"title": "Etherpad Lite",
|
||||||
|
|
||||||
|
// favicon default name
|
||||||
|
// alternatively, set up a fully specified Url to your own favicon
|
||||||
|
"favicon": "favicon.ico",
|
||||||
|
|
||||||
//Ip and port which etherpad should bind at
|
//Ip and port which etherpad should bind at
|
||||||
"ip": "0.0.0.0",
|
"ip": "0.0.0.0",
|
||||||
|
|
|
@ -24,8 +24,20 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//serve favicon.ico
|
//serve pad.html under /p
|
||||||
args.app.get('/favicon.ico', function(req, res)
|
args.app.get('/p/:pad', function(req, res, next)
|
||||||
|
{
|
||||||
|
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {req: req}));
|
||||||
|
});
|
||||||
|
|
||||||
|
//serve timeslider.html under /p/$padname/timeslider
|
||||||
|
args.app.get('/p/:pad/timeslider', function(req, res, next)
|
||||||
|
{
|
||||||
|
res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html", {req: req}));
|
||||||
|
});
|
||||||
|
|
||||||
|
//serve favicon.ico from all path levels except as a pad name
|
||||||
|
args.app.get( /\/favicon.ico$/, function(req, res)
|
||||||
{
|
{
|
||||||
var filePath = path.normalize(__dirname + "/../../../static/custom/favicon.ico");
|
var filePath = path.normalize(__dirname + "/../../../static/custom/favicon.ico");
|
||||||
res.sendfile(filePath, function(err)
|
res.sendfile(filePath, function(err)
|
||||||
|
@ -39,16 +51,5 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//serve pad.html under /p
|
|
||||||
args.app.get('/p/:pad', function(req, res, next)
|
|
||||||
{
|
|
||||||
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {req: req}));
|
|
||||||
});
|
|
||||||
|
|
||||||
//serve timeslider.html under /p/$padname/timeslider
|
|
||||||
args.app.get('/p/:pad/timeslider', function(req, res, next)
|
|
||||||
{
|
|
||||||
res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html", {req: req}));
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -34,6 +34,11 @@ exports.root = path.normalize(path.join(npm.dir, ".."));
|
||||||
*/
|
*/
|
||||||
exports.title = "Etherpad Lite";
|
exports.title = "Etherpad Lite";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The app favicon fully specified url, visible e.g. in the browser window
|
||||||
|
*/
|
||||||
|
exports.favicon = "favicon.ico";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The IP ep-lite should listen to
|
* The IP ep-lite should listen to
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
||||||
|
|
||||||
<link rel="shortcut icon" href="favicon.ico">
|
<link rel="shortcut icon" href="<%=settings.favicon%>">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
||||||
|
|
||||||
<link rel="shortcut icon" href="../favicon.ico">
|
<link rel="shortcut icon" href="<%=settings.favicon%>">
|
||||||
|
|
||||||
<% e.begin_block("styles"); %>
|
<% e.begin_block("styles"); %>
|
||||||
<link href="../static/css/pad.css" rel="stylesheet">
|
<link href="../static/css/pad.css" rel="stylesheet">
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
<link rel="shortcut icon" href="../../favicon.ico">
|
<link rel="shortcut icon" href="<%=settings.favicon%>">
|
||||||
<link rel="stylesheet" href="../../static/css/pad.css">
|
<link rel="stylesheet" href="../../static/css/pad.css">
|
||||||
<link rel="stylesheet" href="../../static/css/timeslider.css">
|
<link rel="stylesheet" href="../../static/css/timeslider.css">
|
||||||
<link rel="stylesheet" href="../../static/custom/timeslider.css">
|
<link rel="stylesheet" href="../../static/custom/timeslider.css">
|
||||||
|
|
Loading…
Reference in a new issue