From 7a1160b2572ac4a232acd8cd4b7ecee107e06e18 Mon Sep 17 00:00:00 2001 From: Rowan Manning Date: Fri, 15 Nov 2013 16:27:13 +0000 Subject: [PATCH] Add the ability to have a site-wide message --- README.md | 3 +++ app.js | 3 ++- view/index.html | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dacf03c..f6d3201 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ The boot configurations for pa11y-dashboard are as follows. Look at the sample J ### readonly *(boolean)* If set to `true`, users will not be able to add, delete or run URLs (defaults to `false`). +### siteMessage +*(string)* A message to display prominently on the site home page. Defaults to `null`. + Development ----------- diff --git a/app.js b/app.js index b271c00..3fafba4 100644 --- a/app.js +++ b/app.js @@ -54,7 +54,8 @@ function initApp (config, callback) { repo: pkg.homepage, bugtracker: pkg.bugs, noindex: config.noindex, - readonly: config.readonly + readonly: config.readonly, + siteMessage: config.siteMessage }); app.express.use(function (req, res, next) { diff --git a/view/index.html b/view/index.html index 0288a9f..a2b8a3f 100644 --- a/view/index.html +++ b/view/index.html @@ -1,5 +1,13 @@ {{#content "title"}}pa11y-dashboard{{/content}} +{{#if siteMessage}} +
+
+

{{siteMessage}}

+
+
+{{/if}} + {{#deleted}}