summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorcaalador <mikael.grankvist@gmail.com>2017-01-31 13:25:44 +0200
committerGitHub <noreply@github.com>2017-01-31 13:25:44 +0200
commit07098d1f4bc80bb9048998fc4786da527a83f084 (patch)
tree5e14b39d979f23a354c4fc168db4be530e5c7636 /server
parent2e593fcceca0163115e85bf28e342dded3618e7a (diff)
downloadvaadin-framework-07098d1f4bc80bb9048998fc4786da527a83f084.tar.gz
vaadin-framework-07098d1f4bc80bb9048998fc4786da527a83f084.zip
Add styling to the unsupported browser page (#570) (#8354)
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java48
1 files changed, 47 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java b/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java
index 7dd7e5ce59..1a648a7751 100644
--- a/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java
+++ b/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java
@@ -65,7 +65,53 @@ public class UnsupportedBrowserHandler extends SynchronizedRequestHandler {
WebBrowser b = VaadinSession.getCurrent().getBrowser();
page.write(
- "<html><body><h1>I'm sorry, but your browser is not supported</h1>"
+ "<html>"
+ + "<head>"
+ + " <style>"
+ + " html {"
+ + " background: #fff;"
+ + " color: #444;"
+ + " font: 400 1em/1.5 \"Helvetica Neue\", Roboto, \"Segoe UI\", sans-serif;"
+ + " padding: 2em;"
+ + " }"
+ + " body {"
+ + " margin: 2em auto;"
+ + " width: 27em;"
+ + " max-width: 100%;"
+ + " }"
+ + " h1 {"
+ + " line-height: 1.1;"
+ + " margin: 2em 0 1em;"
+ + " color: #000;"
+ + " font-weight: 400;"
+ + " }"
+ + " em {"
+ + " font-size: 1.2em;"
+ + " font-style: normal;"
+ + " display: block;"
+ + " margin-bottom: 1.2em;"
+ + " }"
+ + " p {"
+ + " margin: 0.5em 0 0;"
+ + " }"
+ + " a {"
+ + " text-decoration: none;"
+ + " color: #007df0;"
+ + " }"
+ + " sub {"
+ + " display: block;"
+ + " margin-top: 2.5em;"
+ + " text-align: center;"
+ + " border-top: 1px solid #eee;"
+ + " padding-top: 2em;"
+ + " }"
+ + " sub,"
+ + " small {"
+ + " color: #999;"
+ + " }"
+ + " </style>"
+ + "</head>"
+ + "<body><h1>I'm sorry, but your browser is not supported</h1>"
+ "<p>The version (" + b.getBrowserMajorVersion()
+ "." + b.getBrowserMinorVersion()
+ ") of the browser you are using "