summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/CMakeLists.txt2
-rw-r--r--data/bg.pngbin0 -> 15218 bytes
-rw-r--r--data/bot.gifbin0 -> 644 bytes
-rw-r--r--data/home.html80
-rw-r--r--data/notfound.html95
-rw-r--r--data/tile.gifbin0 -> 514 bytes
-rw-r--r--data/top.pngbin0 -> 786 bytes
-rw-r--r--src/homepage.cpp2
-rw-r--r--src/webpage.cpp22
9 files changed, 129 insertions, 72 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 36b17ded..9eb59933 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,5 +1,5 @@
INSTALL(
- FILES closed.png loading.mng open.png webkit-icon.png busywidget.gif
+ FILES bg.png bot.gif busywidget.gif closed.png loading.mng open.png tile.gif top.png webkit-icon.png
DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics
)
diff --git a/data/bg.png b/data/bg.png
new file mode 100644
index 00000000..5ec669ac
--- /dev/null
+++ b/data/bg.png
Binary files differ
diff --git a/data/bot.gif b/data/bot.gif
new file mode 100644
index 00000000..2f9abde4
--- /dev/null
+++ b/data/bot.gif
Binary files differ
diff --git a/data/home.html b/data/home.html
index 0471e3a6..b5ca9b67 100644
--- a/data/home.html
+++ b/data/home.html
@@ -3,7 +3,8 @@
<head>
<title>rekonq home page</title>
-<style type="text/css">
+
+<style type="text/css">
html{
margin:0;
@@ -11,6 +12,7 @@ padding:0;
}
body{
+background: url(%1/tile.gif) repeat-x #fff;
margin:0;
padding:0;
font-family: sans-serif;
@@ -26,37 +28,79 @@ margin:5px;
/* ------------------------------------------------------- */
h1{
-color: #00f;
+color: #3F7AB7;
}
#float {
float: right;
-width: 30%;
+width: 275px;
clear: right;
+margin-right: 15px;
}
.block {
-background-color: #FFA500;
-border: 2px solid #000000;
-padding: 0.5em;
-margin:15px;
-font-weight: bold;
-color: white;
-clear: right;
+background: url(%1/bot.gif) bottom center no-repeat #f3f3f3;
+border-left: 1px solid #d9d9d9;
+border-right: 1px solid #d9d9d9;
+padding: 5px;
+width: 245px;
+margin: 0 15px 15px 0px;
+font-size: 0.8em;
+color: #444;
+
+/*font-weight: bold;
+clear: right;*/
+}
+
+.block h2 {
+background: url(%1/top.png) no-repeat;
+color: #333;
+line-height: 24px;
+padding: 0 7px;
+border: 0;
+margin: -6px -6px 0 -6px;
+font-size: 1em;
+}
+
+.block ul {
+padding-left: 1.5em;
+}
+
+.block ul a {
+color: #444;
+text-decoration: none;
+}
+
+.block ul a:hover {
+text-decoration: underline;
}
#left{
-width:70%;
-margin-right:30%;
+margin: 0 290px 0 0;
+background-color:#444;
+/*width:70%;
+margin-right:30%;*/
}
-.thumbnail
-{
+.thumbnail {
+background: url(%1/bg.png) no-repeat;
text-align: center;
float:left;
-width:230px;
-margin:15px;
+width:228px;
+padding: 11px 0px 0px 0px;
+margin: 0 15px;
}
+
+.thumbnail a {
+display: block;
+text-align: center;
+width:228px;
+padding: 11px 0px 5px 0px;
+color: #767676;
+font-size: 0.8em;
+text-decoration:none;
+}
+
</style>
<!-- =================================================================================== -->
@@ -71,10 +115,10 @@ margin:15px;
<div id="float">
-<div class="block">%1</div>
<div class="block">%2</div>
+<div class="block">%3</div>
</div>
-<div id="left">%3</div>
+<div id="left">%4</div>
</body>
</html>
diff --git a/data/notfound.html b/data/notfound.html
index 673ebe70..e34bfc6d 100644
--- a/data/notfound.html
+++ b/data/notfound.html
@@ -2,65 +2,64 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>%1</title>
-<style type="text/css">
-body {
- padding: 3em 0em;
- background: #eeeeee;
+
+<style type="text/css">
+
+html{
+margin:0;
+padding:0;
}
-hr {
- color: lightgray;
- width: 100%;
+
+body{
+background: url(%2/tile.gif) repeat-x #fff;
+margin:0;
+padding:0;
+font-family: sans-serif;
+font-size: 100%;
}
-img {
- float: left;
- opacity: .8;
+
+#block {
+/* background: url(%2/bot.gif) bottom center #f3f3f3; */
+border: 2px solid #d9d9d9;
+padding: 10px;
+width: 600px;
+margin: 150px auto;
+color: #444;
+
+/*font-weight: bold;
+clear: right;*/
}
-#box {
- background: white;
- border: 1px solid lightgray;
- width: 600px;
- padding: 60px;
- margin: auto;
+
+h1{
+font-size: 130%;
+font-weight: bold;
+border-bottom: 1px solid lightgray;
+margin-left: 48px;
}
-h1 {
- font-size: 130%;
- font-weight: bold;
- border-bottom: 1px solid lightgray;
- margin-left: 48px;
-}
-h2 {
- font-size: 100%;
- font-weight: normal;
- border-bottom: 1px solid lightgray;
- margin-left: 48px;
+
+h2{
+font-size: 100%;
+font-weight: normal;
+border-bottom: 1px solid lightgray;
+margin-left: 48px;
}
+
ul {
- font-size: 80%;
- padding-left: 48px;
- margin: 0;
+padding: 12px 48px;
+margin: 0;
}
+
#reloadButton {
- padding-left: 48px;
+margin-left: 48px;
+margin-bottom: 12px;
}
+
</style>
+
</head>
+
<body>
- <div id="box">
- <img src="%2" width="16" height="16" alt="Not found" />
- <h1>%3</h1>
- <h2>When connecting to: %4</h2>
- <ul>
- <li>Check the address for errors such as <b>ww</b>.kde.org
- instead of <b>www</b>.kde.org</li>
- <li>If the address is correct, try to check the network
- connection.</li>
- <li>If your computer or network is protected by a firewall or
- proxy, make sure that rekonq is permitted to access
- the network.</li>
- <li>Of course, if rekonq doesn't work properly, you can always
- say it's a programmer error ;)</li>
- </ul>
- <br/><br/>
- </div>
+<div id="block">%3</div>
</body>
+
</html>
diff --git a/data/tile.gif b/data/tile.gif
new file mode 100644
index 00000000..5f739e49
--- /dev/null
+++ b/data/tile.gif
Binary files differ
diff --git a/data/top.png b/data/top.png
new file mode 100644
index 00000000..9ebf0234
--- /dev/null
+++ b/data/top.png
Binary files differ
diff --git a/src/homepage.cpp b/src/homepage.cpp
index 8dccc3fd..103f018c 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -71,12 +71,14 @@ QString HomePage::rekonqHomePage()
return QString("");
}
+ QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics");
QString speed = speedDial();
QString search = searchEngines();
QString lastBlock = ReKonfig::showLastVisitedSites() ? fillRecentHistory() : recentlyClosedTabs() ;
QString html = QString(QLatin1String(file.readAll()))
+ .arg(imagesPath)
.arg(search)
.arg(lastBlock)
.arg(speed)
diff --git a/src/webpage.cpp b/src/webpage.cpp
index d5d1cd7c..7408b490 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -224,15 +224,27 @@ QString WebPage::errorPage(QNetworkReply *reply)
kWarning() << "Couldn't open the notfound.html file";
return QString("");
}
- QString title = i18n("Error loading page: ") + reply->url().toString();
- QString imagePath = KIconLoader::global()->iconPath("rekonq", KIconLoader::NoGroup, false);
+ QString title = i18n("Error loading: ") + reply->url().path();
+
+ QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics");
+ QString msg = "<h1>" + reply->errorString() + "</h1>";
+
+ msg += "<h2>" + i18n("When connecting to: ") + reply->url().toString() + "</h2>";
+ msg += "<ul><li>" + i18n("Check the address for errors such as <b>ww</b>.kde.org instead of <b>www</b>.kde.org");
+ msg += "</li><li>" + i18n("If the address is correct, try to check the network connection.") + "</li><li>" ;
+ msg += i18n("If your computer or network is protected by a firewall or proxy, make sure that rekonq is permitted to access the network.");
+ msg += "</li><li>" + i18n("Of course, if rekonq doesn't work properly, you can always say it's a programmer error ;)");
+ msg += "</li></ul><br/><br/>";
+ msg += "<input type=\"button\" id=\"reloadButton\" onClick=\"document.location.href='" + reply->url().path() + "';\" value=\"";
+ msg += i18n("Try Again") + "\" />";
+
QString html = QString(QLatin1String(file.readAll()))
.arg(title)
- .arg("file://" + imagePath)
- .arg(reply->errorString())
- .arg(reply->url().toString());
+ .arg(imagesPath)
+ .arg(msg)
+ ;
return html;
}