summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-07 15:12:35 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-07 15:12:35 +0200
commit50f7b15d8eae33cfd7963de3ad95680359357abb (patch)
treedbbf0f924bba87cee75445e397ac3b8a49b1b788
parentHomePage style fixes. (diff)
parentbetter homepage with nav bar on top (diff)
downloadrekonq-50f7b15d8eae33cfd7963de3ad95680359357abb.tar.xz
Fixing merge operation
Merge commit 'refs/merge-requests/1715' of git://gitorious.org/rekonq/mainline into matgicMerge Conflicts: data/home.html src/homepage.cpp
-rw-r--r--data/CMakeLists.txt2
-rw-r--r--data/category.pngbin0 -> 695 bytes
-rw-r--r--data/home.html94
-rw-r--r--src/homepage.cpp47
-rw-r--r--src/homepage.h2
5 files changed, 104 insertions, 41 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 9eb59933..34676cf0 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,5 +1,5 @@
INSTALL(
- FILES bg.png bot.gif busywidget.gif closed.png loading.mng open.png tile.gif top.png webkit-icon.png
+ FILES bg.png bot.gif busywidget.gif closed.png loading.mng open.png tile.gif top.png webkit-icon.png category.png
DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics
)
diff --git a/data/category.png b/data/category.png
new file mode 100644
index 00000000..52df230d
--- /dev/null
+++ b/data/category.png
Binary files differ
diff --git a/data/home.html b/data/home.html
index 8ad4a7ce..1a193b07 100644
--- a/data/home.html
+++ b/data/home.html
@@ -9,26 +9,26 @@
/* ------------------------------------------------------- */
/* generic styles */
-html{
+html, body, div, h1, h2, h3, h4, a, p{
margin:0;
padding:0;
+border:0;
}
body{
background: url(%1/tile.gif) repeat-x #fff;
-margin:0;
-padding:0;
font-family: sans-serif;
-font-size: 100%;
+font-size: 90%;
text-align: center;
}
h1{
font: normal bold 1.5em sans-serif;
text-align:right;
-color: #FFF;
-margin-right:1%;
-margin-bottom: 15px;
+color: #3F7AB7;
+margin-right:3%;
+margin-top: 0.5%;
+float:right;
}
h2{
@@ -38,6 +38,27 @@ text-align: left;
margin: 20px 20px 20px 22px;
}
+h3{
+background: url(%1/category.png) no-repeat;
+padding: 0.2em;
+margin-top: 1em;
+margin-bottom: 0.5em;
+padding-left: 0.4em;
+}
+
+h4{
+font-size: 1em;
+margin-top: 0.5em;
+}
+
+a{
+color: #3F7AB7;
+text-decoration: none;
+}
+a:hover{
+color: black;
+}
+
/* ------------------------------------------------------- */
/* page sections */
@@ -46,47 +67,56 @@ width: 100%;
}
#navigation {
-float: right;
-width: 20%;
-text-align:center;
+margin-top: 1%;
+text-align: center;
}
#content {
-width: 80%;
text-align: left;
-margin: 20px;
+margin: 2%;
}
-.link {
-text-align:left;
-margin: 10px;
-background-color:#6096CF;
-padding: 10px 10px 20px 10px;
-border-width: 10px;
-}
/* -------------------------------------------------------- */
/* div navigations styles */
-div.link a{
-color:#FFF;
+.link{
+display: inline-block;
+padding: 0 2%;
+}
+
+.link img{
+float:left;
+}
+
+.link a{
+color: black;
text-decoration:none;
-font: normal bold 1em sans-serif;
+font: normal bold 1.2em/2.5em sans-serif;
+vertical-align: middle;
}
-div.link a:hover{
-color: #ff0;
+#navigation .link:not(.current):not(.link:hover){
+-webkit-opacity: 0.3;
}
+
/* -------------------------------------------------------- */
/* Thumbnail class */
.thumbnail {
-background: url(%1/bg.png) no-repeat;
text-align: center;
float:left;
-width:228px;
-padding: 11px 0px 0px 0px;
-margin: 10px 10px 10px 0;
+width: 25%;
+min-width: 235px;
+margin-bottom: 3%;
+}
+
+.thumbnail object{
+background: url(%1/bg.png) no-repeat;
+text-align: center;
+padding: 14px 16px;
+-webkit-background-size: 100% 100%;
+-webkit-background-clip: padding;
cursor: pointer;
}
@@ -99,6 +129,14 @@ text-decoration:none;
}
/* -------------------------------------------------------- */
+/* Bookmarks page*/
+
+.bookfolder{
+margin-left: 2em;
+margin-bottom: 0.5em;
+}
+
+/* -------------------------------------------------------- */
</style>
</head>
diff --git a/src/homepage.cpp b/src/homepage.cpp
index a9c51c9a..98060bed 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -72,7 +72,7 @@ QString HomePage::rekonqHomePage(const KUrl &url)
}
QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics");
- QString menu = homePageMenu();
+ QString menu = homePageMenu(url);
QString title, speed;
if(url == KUrl("rekonq:lastSites"))
@@ -173,15 +173,40 @@ QString HomePage::lastVisitedSites()
}
-QString HomePage::homePageMenu()
+QString HomePage::homePageMenu(KUrl currentUrl)
{
- QString menu = "<div class=\"link\">";
- menu += "<h1>rekonq</h1>";
- menu += "<a href=\"rekonq:lastSites\">Last Visited Sites</a><br />";
- menu += "<a href=\"rekonq:history\">History</a><br />";
- menu += "<a href=\"rekonq:bookmarks\">Bookmarks</a><br /";
- menu += "<a href=\"rekonq:favorites\">Favorites</a><br />";
- menu += "</div>";
+ QString menu = "";
+
+ KIconLoader *loader = KIconLoader::global();
+
+ menu += "<div class=\"link";
+ if(currentUrl == "rekonq:lastSites")
+ menu += " current";
+ menu += "\"><a href=\"rekonq:lastSites\">";
+ menu += "<img src=\"file:///" + loader->iconPath("edit-undo", KIconLoader::Desktop) + "\" />";
+ menu += "Last Visited</a></div>";
+
+ menu += "<div class=\"link";
+ if(currentUrl == "rekonq:history")
+ menu += " current";
+ menu += "\"><a href=\"rekonq:history\">";
+ menu += "<img src=\"file:///" + loader->iconPath("view-history", KIconLoader::Desktop) + "\" />";
+ menu += "History</a></div>";
+
+ menu += "<div class=\"link";
+ if(currentUrl == "rekonq:bookmarks")
+ menu += " current";
+ menu += "\"><a href=\"rekonq:bookmarks\">";
+ menu += "<img src=\"file:///" + loader->iconPath("bookmarks-organize", KIconLoader::Desktop) + "\" />";
+ menu += "Bookmarks</a></div>";
+
+ menu += "<div class=\"link";
+ if(currentUrl == "rekonq:favorites" || currentUrl == "rekonq:home")
+ menu += " current";
+ menu += "\"><a href=\"rekonq:favorites\">";
+ menu += "<img src=\"file:///" + loader->iconPath("rating", KIconLoader::Desktop) + "\" />";
+ menu += "Favorites</a></div>";
+
return menu;
}
@@ -243,8 +268,8 @@ QString HomePage::createBookItem(const KBookmark &bookmark)
QString result = QString("");
KBookmarkGroup group = bookmark.toGroup();
KBookmark bm = group.first();
- result += "<h3>" + bookmark.text() + "</h3>";
- result += "<p style=\"padding-left: 30px;\">";
+ result += "<h4>" + bookmark.text() + "</h4>";
+ result += "<p class=\"bookfolder\">";
while (!bm.isNull())
{
result += createBookItem(bm);
diff --git a/src/homepage.h b/src/homepage.h
index b1202cb0..73bb5859 100644
--- a/src/homepage.h
+++ b/src/homepage.h
@@ -48,7 +48,7 @@ public:
~HomePage();
QString rekonqHomePage(const KUrl &url = KUrl("rekonq:home"));
- QString homePageMenu();
+ QString homePageMenu(KUrl currentUrl);
private:
QString fillFavorites();