Commit 258b19a539624ebb4eee8dc0f21241dc288e7c9c

Authored by Antonio Terceiro
1 parent 07c37293

ActionItem978: better yet screens (preciosism)

  * make the error screens valid XHTML
    * had to change default theme's error screen to fix its layout
  * also change the title of the document based on the language chosen.
public/500.html
1   -<html>
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 +<html xmlns="http://www.w3.org/1999/xhtml" >
2 3 <head>
3 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4 5 <meta http-equiv="refresh" content="60"/>
... ...
public/500.html.erb
1   -<html>
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 +<html xmlns="http://www.w3.org/1999/xhtml" >
2 3 <head>
3 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4 5 <meta http-equiv="refresh" content="60"/>
... ...
public/503.html
1   -<html>
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 +<html xmlns="http://www.w3.org/1999/xhtml" >
2 3 <head>
3 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4 5 <meta http-equiv="refresh" content="60"/>
... ...
public/503.html.erb
1   -<html>
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 +<html xmlns="http://www.w3.org/1999/xhtml" >
2 3 <head>
3 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4 5 <meta http-equiv="refresh" content="60"/>
... ...
public/designs/themes/noosfero/stylesheets/errors.css
1 1 body {
2 2 font-family: sans-serif;
3 3 margin: 0px;
4   - padding: 0% 3%;
  4 + padding: 0% 0%;
5 5 height: 100%;
  6 +}
  7 +div#wrap {
6 8 background: #CCC url(/503.jpg) 100% 100% no-repeat;
  9 + position: absolute;
  10 + top: 0px;
  11 + bottom: 0px;
  12 + left: 0px;
  13 + right: 0px;
  14 + padding: 1em 3em 1em 3em;
7 15 }
8 16  
9 17 h1 {
... ...
public/javascripts/errors.js
... ... @@ -7,6 +7,7 @@ function display_error_message(language) {
7 7 element = $('en');
8 8 }
9 9 $$('.message').each(function(item) { item.hide() });
  10 + element.getElementsBySelector('h1').each(function(title) { document.title = title.innerHTML; });
10 11 element.show();
11 12 }
12 13  
... ...