summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/home.html62
-rw-r--r--src/homepage.cpp28
2 files changed, 43 insertions, 47 deletions
diff --git a/data/home.html b/data/home.html
index 1c9cf733..d709a1dc 100644
--- a/data/home.html
+++ b/data/home.html
@@ -24,57 +24,53 @@ text-align: center;
}
h1{
+font: normal bold 2em sans-serif;
+text-align:right;
color: #3F7AB7;
+margin-right:3%;
+margin-bottom: 20px;
}
+h2{
+font: normal bold 1.2em sans-serif;
+color: #3F7AB7;
+margin-top: 2em;
+}
/* ------------------------------------------------------- */
/* page sections */
#container {
-width: 90%;
-margin: auto;
-}
-
-
-#header{
-/* width: 95%; */
-text-align:right;
+width: 100%;
}
#navigation {
-/* width: 95%; */
-/* background: #3F7AB7; */
-margin: 2em 0;
+float: right;
+width: 20%;
+text-align:center;
}
#content {
-/* width: 100%; */
+width: 80%;
text-align: left;
+margin: 20px;
}
+.link {
+width:96%;
+margin: 10px 0;
+background-color:#3F7AB7;
+}
/* -------------------------------------------------------- */
/* div navigations styles */
-div#navigation ul{
-margin: 0;
-padding: 0;
-list-style-type: none;
-}
-
-div#navigation li{
-display: inline;
-margin: 0 1em;
-border-right: solid 1px;
-padding: 0 1em;
-}
-
-div#navigation a{
-/* color:#FFF; */
-font: normal bold 1.2em/2.5em arial,sans-serif;
+div.link a{
+color:#FFF;
+text-decoration:none;
+font: normal bold 1.2em/2.5em sans-serif;
}
-div#navigation a:hover{
+div.link a:hover{
color: #ff0;
}
@@ -87,7 +83,7 @@ text-align: center;
float:left;
width:228px;
padding: 11px 0px 0px 0px;
-margin: 15px;
+margin: 10px 10px 10px 0;
}
.thumbnail a {
@@ -105,8 +101,10 @@ text-decoration:none;
<body>
<div id="container">
-<div id="header"><h1>rekonq</h1></div>
-<div id="navigation">%2</div>
+<div id="navigation">
+<h1>rekonq</h1>
+%2
+</div>
<div id="content">%3</div>
</div>
diff --git a/src/homepage.cpp b/src/homepage.cpp
index e3af4cc2..bfbf0400 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -99,7 +99,7 @@ QString HomePage::fillFavorites()
QStringList names = ReKonfig::previewNames();
QStringList urls = ReKonfig::previewUrls();
- QString speed = "";
+ QString speed = "<h2>Favorites</h2>";
for(int i=0; i<8; ++i)
{
QString text = names.at(i);
@@ -124,14 +124,15 @@ QString HomePage::lastVisitedSites()
{
HistoryTreeModel *model = Application::historyManager()->historyTreeModel();
- QString last = "";
+ QString last = "<h2>Last Visited Sites</h2>";
+ int sites = 0;
int i = 0;
do
{
QModelIndex index = model->index(i, 0, QModelIndex() );
if(model->hasChildren(index))
{
- for(int j=0; j< model->rowCount(index) && j<8; ++j)
+ for(int j=0; j< model->rowCount(index) && sites<8; ++j)
{
QModelIndex son = model->index(j, 0, index );
@@ -147,13 +148,12 @@ QString HomePage::lastVisitedSites()
last += "</object>";
last += "<br /><br />";
last += "<a href=\"" + son.data(HistoryModel::UrlStringRole).toString() + "\">" + text + "</a></div>";
-
- i++;
+ sites++;
}
}
i++;
}
- while( i<8 || model->hasIndex( i , 0 , QModelIndex() ) );
+ while( sites<8 || model->hasIndex( i , 0 , QModelIndex() ) );
return last;
@@ -162,21 +162,20 @@ QString HomePage::lastVisitedSites()
QString HomePage::homePageMenu()
{
- QString menu = "<ul>";
- menu += "<li><a href=\"about:lastSites\">Last Visited Sites</a></li>";
- menu += "<li><a href=\"about:history\">History</a></li>";
- menu += "<li><a href=\"about:bookmarks\">Bookmarks</a></li>";
- menu += "<li><a href=\"about:favorites\">Favorites</a></li>";
- menu += "</ul>";
+ QString menu = "";
+ menu += "<div class=\"link\"><a href=\"about:lastSites\">Last Visited Sites</a></div>";
+ menu += "<div class=\"link\"><a href=\"about:history\">History</a></div>";
+ menu += "<div class=\"link\"><a href=\"about:bookmarks\">Bookmarks</a></div>";
+ menu += "<div class=\"link\"><a href=\"about:favorites\">Favorites</a></div>";
return menu;
}
QString HomePage::fillHistory()
{
- QString history = "";
HistoryTreeModel *model = Application::historyManager()->historyTreeModel();
+ QString history = "<h2>History</h2>";
int i = 0;
do
{
@@ -200,7 +199,6 @@ QString HomePage::fillHistory()
history += "</table>";
return history;
-
}
@@ -212,7 +210,7 @@ QString HomePage::fillBookmarks()
return QString("Error retrieving bookmarks!");
}
- QString str = QString("");
+ QString str = "<h2>Bookmarks</h2>";
KBookmark bookmark = bookGroup.first();
while (!bookmark.isNull())
{