summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-05-08 11:07:48 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-05-15 09:53:42 +0200
commit6cebbd390593d315440d1ee939a6c7d44f317280 (patch)
tree81b98ed45c361ccc0a546267ac100e952e4e0b13 /src
parentnew background (diff)
downloadrekonq-6cebbd390593d315440d1ee939a6c7d44f317280.tar.xz
Add font: Nunito regular
Diffstat (limited to 'src')
-rw-r--r--src/data/CMakeLists.txt19
-rw-r--r--src/data/Nunito-Regular.ttfbin0 -> 49792 bytes
-rw-r--r--src/data/home.html35
-rw-r--r--src/newtabpage.cpp13
4 files changed, 48 insertions, 19 deletions
diff --git a/src/data/CMakeLists.txt b/src/data/CMakeLists.txt
index 6d5276c7..7c0f3cc3 100644
--- a/src/data/CMakeLists.txt
+++ b/src/data/CMakeLists.txt
@@ -1,13 +1,26 @@
# image files
INSTALL(
FILES
- bg2.png bg.png tile.gif category.png button.png
- busywidget.gif loading.mng
- webkit-icon.png autoscroll.png
+ bg2.png
+ bg.png
+ tile.gif
+ category.png
+ button.png
+ busywidget.gif
+ loading.mng
+ webkit-icon.png
+ autoscroll.png
background.jpg
DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics
)
+# fonts files
+INSTALL(
+ FILES
+ Nunito-Regular.ttf
+ DESTINATION ${DATA_INSTALL_DIR}/rekonq/fonts
+)
+
# default bookmarks
INSTALL(
FILES
diff --git a/src/data/Nunito-Regular.ttf b/src/data/Nunito-Regular.ttf
new file mode 100644
index 00000000..3b0f067c
--- /dev/null
+++ b/src/data/Nunito-Regular.ttf
Binary files differ
diff --git a/src/data/home.html b/src/data/home.html
index 03197d56..c46904dd 100644
--- a/src/data/home.html
+++ b/src/data/home.html
@@ -1,28 +1,39 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<!DOCTYPE HTML>
+<html>
<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
<title></title>
<style type="text/css">
/* -------------------------------------------------------- */
-/* css reset */
+/* generic styles */
+
* {
border: 0; padding: 0; margin: 0;
}
-/* -------------------------------------------------------- */
-/* generic styles */
+@font-face {
+ font-family: 'Nunito';
+ src: url(%2/fonts/Nunito-Regular.ttf);
+ font-weight: normal;
+ font-style: normal;
+
+}
body {
-background: url(%2/background.jpg) repeat-y #fff;
-font-family: sans-serif; font-size: 0.8em;
+background: url(%2/pics/background.jpg) repeat-y #fff;
+font-family: 'Nunito', sans-serif;
+font-size: 0.9em;
}
#rekonq-newtabpage {
-width: 100%;
+width: 96%;
text-align: center; /* center #navigation */
+margin: 0 2%;
}
#content {
@@ -32,7 +43,7 @@ margin: 0 1% 2% 1%;
h3 {
border-bottom-width: 1px;
--webkit-border-image: url(%2/category.png) 1 1 1 1 stretch stretch;
+-webkit-border-image: url(%2/pics/category.png) 1 1 1 1 stretch stretch;
padding: 0.2em; margin: 1.5em 0 0.5em;
font: normal bold 1em;
}
@@ -64,7 +75,7 @@ width: 15%;
}
#navigation {
--webkit-border-image: url(%2/bg2.png) 12 12 12 12 stretch stretch;
+-webkit-border-image: url(%2/pics/bg2.png) 12 12 12 12 stretch stretch;
display: table;
border-width: 5px;
margin-left: auto;
@@ -99,7 +110,7 @@ margin-right: 3px; width: 16px;
.current{
border-width: 6px;
--webkit-border-image: url(%2/button.png) 6 stretch stretch;
+-webkit-border-image: url(%2/pics/button.png) 6 stretch stretch;
}
.link:not(.current){
margin: 0 10px;
@@ -129,7 +140,7 @@ margin: auto;
display: table-cell; vertical-align: middle;
width: 200px; height: 150px;
padding: 14px 16px 12px;
-background: url(%2/bg.png) no-repeat;
+background: url(%2/pics/bg.png) no-repeat;
-webkit-background-size: 100% 100%;
}
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index aa38e37b..aadaf930 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -64,8 +64,10 @@ NewTabPage::NewTabPage(QWebFrame *frame)
, m_root(frame->documentElement())
{
QString htmlFilePath = KStandardDirs::locate("data", "rekonq/htmls/home.html");
- QString imagesPath = QL1S("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QL1S("rekonq/pics");
-
+ QString dataPath = QL1S("file://") + htmlFilePath;
+ dataPath.remove(QL1S("/htmls/home.html"));
+ kDebug() << "data path: " << dataPath;
+
QFile file(htmlFilePath);
bool isOpened = file.open(QIODevice::ReadOnly);
if (!isOpened)
@@ -75,7 +77,7 @@ NewTabPage::NewTabPage(QWebFrame *frame)
else
{
m_html = file.readAll();
- m_html.replace(QL1S("%2"), imagesPath);
+ m_html.replace(QL1S("%2"), dataPath);
}
}
@@ -198,6 +200,7 @@ void NewTabPage::generate(const KUrl &url)
m_root = parentFrame->documentElement().findFirst(QL1S("#content"));
+ kDebug() << "is null? " << m_root.isNull();
browsingMenu(url);
QString title;
@@ -240,6 +243,7 @@ void NewTabPage::generate(const KUrl &url)
}
m_root.document().findFirst(QL1S("title")).setPlainText(title);
+ kDebug() << "is null find title? " << m_root.document().findFirst(QL1S("title")).isNull();
}
@@ -297,6 +301,7 @@ void NewTabPage::browsingMenu(const KUrl &currentUrl)
else if (currentUrl == QL1S("about:home") && it.findFirst(aTagString).attribute(hrefAttributeString) == QL1S("about:favorites"))
it.addClass(QL1S("current"));
m_root.document().findFirst(QL1S("#navigation")).appendInside(it);
+ kDebug() << "is null find nav? " << m_root.document().findFirst(QL1S("#navigation")).isNull();
}
}
@@ -310,7 +315,7 @@ void NewTabPage::favoritesPage()
QL1S("list-add"),
KIconLoader::Toolbar);
m_root.document().findFirst("#actions").appendInside(add);
-
+
QStringList names = ReKonfig::previewNames();
QStringList urls = ReKonfig::previewUrls();