diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-02-13 00:31:05 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-02-13 00:31:05 +0100 |
commit | 76f0719394a0e0d74338375b24061feb1ad1386f (patch) | |
tree | 90987efe0bdea054ffbf130b99b99d5bf86cf7ad /src | |
parent | rekonq 0.3.90 (0.4 beta) (diff) | |
parent | workaround too big bottom border (diff) | |
download | rekonq-76f0719394a0e0d74338375b24061feb1ad1386f.tar.xz |
Merge commit 'refs/merge-requests/87' of git://gitorious.org/rekonq/mainline into mr87
Diffstat (limited to 'src')
-rw-r--r-- | src/data/home.html | 164 | ||||
-rw-r--r-- | src/rekonqpage/newtabpage.cpp | 6 |
2 files changed, 63 insertions, 107 deletions
diff --git a/src/data/home.html b/src/data/home.html index f9106642..50564d55 100644 --- a/src/data/home.html +++ b/src/data/home.html @@ -6,142 +6,111 @@ <style type="text/css"> -/* ------------------------------------------------------- */ -/* generic styles */ - -html, body, div, h1, h2, h3, h4, a, p{ -margin:0; -padding:0; -border:0; +/* -------------------------------------------------------- */ +/* css reset */ +* { +border: 0; padding: 0; margin: 0; } -body{ +/* -------------------------------------------------------- */ +/* generic styles */ + +body { background: url(%2/tile.gif) repeat-x #fff; -font-family: sans-serif; -font-size: 0.8em; -text-align: center; +font-family: sans-serif; font-size: 0.8em; } -h1{ -font: normal bold 2em sans-serif; -text-align:right; -color: #3F7AB7; -margin-right:3%; -margin-top: 0.5%; -float:right; +#rekonq-newtabpage { +width: 100%; +text-align: center; /* center #navigation */ } -h2{ -font: normal bold 1.2em sans-serif; -color: #3F7AB7; -margin-top: 2em; +#content { +text-align: left; +margin: 0 1% 2% 1%; } -h3{ +h3 { border-bottom-width: 1px; -webkit-border-image: url(%2/category.png) 1 1 1 1 stretch stretch; -padding: 0.2em; -margin-top: 0.5em; -margin-bottom: 0.5em; -font: normal bold 1em sans-serif; +padding: 0.2em; margin: 0.5em 0; +font: normal bold 1em; } -h4{ -font-size: 1em; -margin-top: 0.5em; -} - -a{ +a { color: #3F7AB7; text-decoration: none; -webkit-transition-property: color; -webkit-transition-duration: 0.5s; -webkit-transition-timing-function: ease; - } -a:hover{ +a:hover { color: black; } -/* ------------------------------------------------------- */ -/* page sections */ - -#rekonq-newtabpage { -width: 100%; -} +/* -------------------------------------------------------- */ +/* Navigation bar */ #navigation { display: inline-block; -margin-top: 2%; -margin-bottom: 2%; -text-align: center; +margin: 2%; border-width: 5px; -webkit-border-image: url(%2/bg2.png) 12 12 12 12 stretch stretch; } -#content { -text-align: left; -margin: 2%; -} - -/* -------------------------------------------------------- */ -/* div navigations styles */ - -.link{ +.link { display: inline-block; } - -.link img{ -vertical-align: middle; -margin-right: 5px; +.link img { +vertical-align: middle; margin-right: 5px; } - -.link a{ -color: black; -text-decoration:none; -font: normal 1em sans-serif; +.link a { +color: black; } .current{ border-width: 6px; -webkit-border-image: url(%2/button.png) 6 stretch stretch; } - -#navigation .link:not(.current){ -margin-right: 10px; -margin-left: 10px; +.link:not(.current){ +margin: 0 10px; } +/* -------------------------------------------------------- */ +/* Previews */ -.favorites{ +#content.favorites, #content.closedTabs { text-align: center; -margin-top: -5%; } -/* -------------------------------------------------------- */ -/* Thumbnail class */ - .thumbnail { display: inline-block; -width:25%; margin-top: 4%; -min-width:250px; min-height:192px; +width: 25%; min-width: 240px; +height: 170px; +margin: 3% 0 3% 0; } -.preview img { +.thumb-inner { +width: 232px; /* 200 + 16*2 */ +margin: auto; } + .preview { -display: table-cell; -vertical-align: middle; +display: table-cell; vertical-align: middle; width: 200px; height: 150px; -padding: 14px 16px; +padding: 14px 16px 12px; background: url(%2/bg.png) no-repeat; -webkit-background-size: 100% 100%; --webkit-background-clip: padding; } -.thumbnail:hover .preview , .thumbnail:hover .button img { -opacity: 0.8; + +.title { +padding: 0 12px; } +.thumbnail:hover .preview , +.thumbnail:hover .button img { +opacity: 0.8; +} .button img, .preview { -webkit-transition-property: opacity; -webkit-transition-duration: 0.8s; @@ -154,7 +123,6 @@ width: 16px; height: 16px; opacity: 0; } - .remove { float: right; } @@ -162,23 +130,12 @@ float: right; float: left; } -.title { -display: block; -width: 200px; -height: 15px; -padding: 0 14px; -text-align: center; -} - -.thumbnail a { -text-align:center; -} .thumbnail a:hover, span { color:#3F7AB7; } /* -------------------------------------------------------- */ -/* Bookmarks page*/ +/* Bookmarks page */ .bookfolder{ margin-left: 2em; @@ -192,11 +149,8 @@ margin-bottom: 0.5em; <body> <div id="rekonq-newtabpage"> - <div id="navigation"> - </div> - + <div id="navigation"></div> <div id="content"> - </div> </div> @@ -207,21 +161,23 @@ margin-bottom: 0.5em; </a> </div> <div class="thumbnail"> - <a> - <div class ="preview"> - <img /> - </div> + <div class ="thumb-inner"> + <a> + <div class ="preview"> + <img /> + </div> + </a> <div class="title"> <a class="button modify"><img /></a> <span><a></a></span> <a class="button remove"><img /></a> </div> - </a> + </div> </div> <h3></h3> <a></a> - </br> - <p class="bookfolder"></h3> + <br /> + <p class="bookfolder"></p> </div> </body> diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp index 3fd9fcc6..ca8ed35e 100644 --- a/src/rekonqpage/newtabpage.cpp +++ b/src/rekonqpage/newtabpage.cpp @@ -171,7 +171,7 @@ QWebElement NewTabPage::emptyPreview(int index) prev.findFirst(".preview img").setAttribute("src" , QString("file:///") + KIconLoader::global()->iconPath("insert-image", KIconLoader::Desktop)); - prev.findFirst("span").appendInside(i18n("Set a Preview...")); + prev.findFirst("span a").setPlainText(i18n("Set a Preview...")); prev.findFirst("a").setAttribute("href", QString("about:preview/modify/" + QVariant(index).toString())); setupPreview(prev, index); @@ -187,7 +187,7 @@ QWebElement NewTabPage::loadingPreview(int index, KUrl url) prev.findFirst(".preview img").setAttribute("src" , QString("file:///") + KStandardDirs::locate("appdata", "pics/busywidget.gif")); - prev.findFirst("span").appendInside(i18n("Loading Preview...")); + prev.findFirst("span a").setPlainText(i18n("Loading Preview...")); prev.findFirst("a").setAttribute("href", url.toMimeDataString()); setupPreview(prev, index); @@ -208,7 +208,7 @@ QWebElement NewTabPage::validPreview(int index, KUrl url, QString title) prev.findFirst(".preview img").setAttribute("src" , previewPath.toMimeDataString()); prev.findFirst("a").setAttribute("href", url.toMimeDataString()); prev.findFirst("span a").setAttribute("href", url.toMimeDataString()); - prev.findFirst("span").setPlainText(checkTitle(title)); + prev.findFirst("span a").setPlainText(checkTitle(title)); setupPreview(prev, index); showControls(prev); |