Split about.css from error.html for about:private

This commit is contained in:
Christian Dywan 2012-01-27 23:06:37 +01:00
parent f1e168b569
commit ce527689c6
3 changed files with 11 additions and 62 deletions

View file

@ -2,67 +2,11 @@
Error page template for Midori.
This file is licensed under the terms of the expat license, see the file EXPAT.
-->
<html>
<head>
<title>{title}</title>
<link rel="shortcut icon" href="{icon}" />
<style type="text/css">
body {
background-color: #eee;
margin: 0;
padding: 0;
}
#container {
background: #f6fff3;
min-width: 70%;
max-width: 70%;
margin: 2em auto 1em;
padding: 1em;
border: 0.2em solid #9acb7f;
-webkit-border-radius: 1em;
}
icon {
float: left;
padding-left: 1%;
padding-top: 1%;
}
#main {
float: right;
width: 90%;
}
h1 {
font-size: 1.4em;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#logo {
position: absolute; right: 15px; bottom: 15px;
z-index: -1;
}
button span,
button img {
vertical-align: middle;
padding: 2px 1px;
}
message {
font-size: 1.1em;
}
description {
font-size: 1em;
}
</style>
<link rel="stylesheet" type="text/css" href="res://about.css" />
</head>
<body>
<div id="container">

View file

@ -1089,7 +1089,7 @@ midori_view_web_view_resource_request_cb (WebKitWebView* web_view,
const gchar* uri = webkit_network_request_get_uri (request);
/* Only apply custom URIs to special pages for security purposes */
if (!view->special)
if (!view->special && !midori_view_is_blank (view))
return;
if (g_str_has_prefix (uri, "res://"))
@ -3979,10 +3979,15 @@ midori_view_set_uri (MidoriView* view,
{
katze_assign (view->uri, g_strdup (uri));
data = g_strdup_printf (
"<html><head><title>%s</title></head>"
"<body><h1>%s</h1>"
"<html><head><title>%s</title>"
"<link rel=\"stylesheet\" type=\"text/css\" href=\"res://about.css\">"
"</head><body><div id=\"container\">"
"<img id=\"logo\" src=\"res://logo-shade.png\">"
"<img id=\"icon\" src=\"stock://gtk-dialog-info\">"
"<div id=\"main\"><h1>%s</h1>"
"<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li></ul>"
"<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>",
"<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>"
"</div><br style=\"clear: both\"></div></body></html>",
_("Private Browsing"), _("Private Browsing"),
_("Midori doesn't store any personal data:"),
_("No History or web cookies are being saved."),

View file

@ -500,7 +500,7 @@ def build (bld):
else:
Utils.pprint ('BLUE', "logo-shade could not be rasterized.")
for res_file in ['error.html', 'close.png']:
for res_file in ['about.css', 'error.html', 'close.png']:
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/' + res_file)
bld.install_as ( \
'${MDATADIR}/' + APPNAME + '/res/speeddial-head-%s.html' % VERSION, \