From 2ca3619057e2c48324dd30a0632c83e363b8678c Mon Sep 17 00:00:00 2001 From: Gunther Brunner Date: Tue, 3 Jun 2014 21:00:00 +0900 Subject: [PATCH] Starting to add error status pages. --- lib/roles/app.js | 1 + res/common/status/404.jade | 14 ++++++++++++++ res/common/status/maintenance.jade | 15 +++++++++++++++ res/common/status/partials/styles.jade | 5 +++++ 4 files changed, 35 insertions(+) create mode 100644 res/common/status/404.jade create mode 100644 res/common/status/maintenance.jade create mode 100644 res/common/status/partials/styles.jade diff --git a/lib/roles/app.js b/lib/roles/app.js index cfdbc216..ae16bf84 100644 --- a/lib/roles/app.js +++ b/lib/roles/app.js @@ -71,6 +71,7 @@ module.exports = function(options) { serveStatic(pathutil.resource('bower_components/stf-site/v2-features'))) app.use('/static/data', serveStatic(pathutil.resource('data'))) app.use('/static/build', serveStatic(pathutil.resource('build'))) + app.use('/static/status', serveStatic(pathutil.resource('common/status'))) app.use('/static/browsers', browserIconMiddleware()) app.use('/static/devices', deviceIconMiddleware()) app.use('/static', serveStatic(pathutil.resource('app'))) diff --git a/res/common/status/404.jade b/res/common/status/404.jade new file mode 100644 index 00000000..ecf77d0d --- /dev/null +++ b/res/common/status/404.jade @@ -0,0 +1,14 @@ +doctype html +html + head + title STF Not Found + meta(charset='utf-8') + meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui') + include partials/styles + body(ng-cloak).forofour.bg-danger + script(src='/static/bower_components/stf-analytics/analytics.js') + div(ng-view) + .forofour-container + h1 + i.fa.fa-unlink.fa-4x + h2 アクセスしようとしたページが見つかりません。 diff --git a/res/common/status/maintenance.jade b/res/common/status/maintenance.jade new file mode 100644 index 00000000..9830f00a --- /dev/null +++ b/res/common/status/maintenance.jade @@ -0,0 +1,15 @@ +doctype html +html + head + title STF Maintenance + meta(charset='utf-8') + meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui') + include partials/styles + body(ng-cloak).forofour.bg-danger + script(src='/static/bower_components/stf-analytics/analytics.js') + div(ng-view) + .forofour-container + h1 + i.fa.fa-unlink.fa-4x + h2 しばらくお待ちください + h3 STFをアップデート中です。 diff --git a/res/common/status/partials/styles.jade b/res/common/status/partials/styles.jade new file mode 100644 index 00000000..f21b94b7 --- /dev/null +++ b/res/common/status/partials/styles.jade @@ -0,0 +1,5 @@ +link(href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700', media='all', rel='stylesheet', type='text/css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/se7en-font.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/style.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/font-awesome.min.css')