# HG changeset patch # User Christophe Lincoln # Date 1302835526 -7200 # Node ID f8ecd3ad885b57e655427d146dabbd209a4611f8 # Parent 74112b6139208b13bc280917cde1b41231dca3f5 Add degault bookmark file with separated CSS file also for doc diff -r 74112b613920 -r f8ecd3ad885b Makefile --- a/Makefile Fri Apr 15 01:59:38 2011 +0200 +++ b/Makefile Fri Apr 15 04:45:26 2011 +0200 @@ -20,14 +20,14 @@ $(DESTDIR)$(PREFIX)/share/pixmaps \ $(DESTDIR)$(PREFIX)/share/applications install -m 0755 $(PACKAGE) $(DESTDIR)$(PREFIX)/bin - cp -d doc/*.html $(DESTDIR)$(DOCDIR)/$(PACKAGE) + cp -d doc/* $(DESTDIR)$(DOCDIR)/$(PACKAGE) install -m 0644 data/tazweb-icon.png \ $(DESTDIR)$(PREFIX)/share/pixmaps/tazweb.png install -m 0644 data/tazweb.desktop \ $(DESTDIR)$(PREFIX)/share/applications - install -m 0644 data/bookmarks.html \ + install -m 0644 data/page.html \ $(DESTDIR)$(PREFIX)/share/tazweb - install -m 0644 data/bookmarks.html \ + install -m 0644 data/style.css \ $(DESTDIR)$(PREFIX)/share/tazweb clean: diff -r 74112b613920 -r f8ecd3ad885b README --- a/README Fri Apr 15 01:59:38 2011 +0200 +++ b/README Fri Apr 15 04:45:26 2011 +0200 @@ -8,6 +8,11 @@ motivated and want to add some entries to the context menu, please talk to the AUTHOR before commiting anything in the repos. +TazWeb use a custom page in user Freedesktop directory to let user add +any content in it and get with one click from the toolbar. We may have +a external apps/script to handle that file for user who dont manage to +edit pure xHTML. + This application have been created for Tazpanel and future SliTaz integrated Web applications. The goal is by far to have a fully-featured web browser. But if you find a way to provide a simple plugins mechanism, that would be great. diff -r 74112b613920 -r f8ecd3ad885b data/page.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/page.html Fri Apr 15 04:45:26 2011 +0200 @@ -0,0 +1,70 @@ + + + + My Page + + + + + + + + +
+ + + + + + +
+

Bookmarks

+ +
+ + +
+ + + diff -r 74112b613920 -r f8ecd3ad885b data/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/style.css Fri Apr 15 04:45:26 2011 +0200 @@ -0,0 +1,45 @@ +/* CSS style for TazWeb page */ + +body { + font: 88% sans-serif, vernada, arial; + margin: 0; +} + +h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; } +h2 { color: #444; } +h3 { color: #666; font-size: 140%; } +ul { list-style-type: square; line-height: 140%; } +img { vertical-align: middle; } +a { color: #215090; } +a:hover { text-decoration: none; color: blue; } + +#header { + background: #351a0a; + height: 40px; + border-bottom: 8px solid #d66018; +} + +#content { + margin: 80px; +} + +#cloud { + padding: 10px; + margin: 0 0 40px; + line-height: 3em; + text-align: center; + background: #f8f8f8; + border: 1px solid #ddd; + border-radius: 8px; +} + +#cloud a { padding: 0 6px; color: #444444; } +#cloud a.tag1 { font-size: 0.6em; font-weight: 100; } +#cloud a.tag2 { font-size: 0.8em; font-weight: 200; } +#cloud a.tag3 { font-size: 1.0em; font-weight: 300; } +#cloud a.tag4 { font-size: 1.2em; font-weight: 400; } +#cloud a.tag5 { font-size: 1.4em; font-weight: 500; } +#cloud a.tag6 { font-size: 1.6em; font-weight: 600; } +#cloud a.tag7 { font-size: 1.8em; font-weight: 700; } +#cloud a.tag8 { font-size: 2.0em; font-weight: 800; } + diff -r 74112b613920 -r f8ecd3ad885b doc/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/style.css Fri Apr 15 04:45:26 2011 +0200 @@ -0,0 +1,28 @@ +/* CSS style for SliTaz Doc */ + +body { font: 88% sans-serif, vernada, arial; margin: 0; } +h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; } +h2 { color: #444; } h3 { color: #666; font-size: 140%; } +pre { + background-color: #f8f8f8; + border: 1px solid #ddd; + padding: 10px; + border-radius: 4px; +} + +#header { + background: #351a0a; + height: 40px; + border-bottom: 8px solid #d66018; +} + +#content { + margin: 40px 80px; + text-align: justify; +} + +#footer { + text-align: center; + padding: 20px; + border-top: 1px solid #ddd; +} diff -r 74112b613920 -r f8ecd3ad885b doc/tazweb.en.html --- a/doc/tazweb.en.html Fri Apr 15 01:59:38 2011 +0200 +++ b/doc/tazweb.en.html Fri Apr 15 04:45:26 2011 +0200 @@ -3,16 +3,7 @@ TazWeb Documentation - + @@ -46,24 +37,30 @@ all latest web standards as well as Javascript.

-

Bookmarks

+

My TazWeb Page

- TazWeb can handle a bookmarks file located in your Freedesktop standard - configuration directory, the path is: $HOME/.config/tazweb/bookmarks.html + TazWeb handle a personnal page located in your Freedesktop standard + configuration directory, the path is: $HOME/.config/tazweb/page.html + It let you have a custom page with bookmarks and other content. The + CSS style is defined in $HOME/.config/tazweb/style.css

- The file is a simple xHTML 5 document with, by default, a list of links. - You can edit this file with you favorite editor and add bookmarks entries - or change the look and feel as you want. You will find the default - bookmarks.html in: /usr/share/tazweb. You can get an original copy - with the following commands in a terminal: + The file is a simple xHTML 5 document with, by default, a list of + links and a box. You can edit this file with you favorite editor + and add content such as bookmarks entries or change the look and + feel as you want. At first start TazWeb will create and copy your + personnal page and style in your config directory. +

+

+Note: You will find the default page.html in: /usr/share/tazweb and +can get an original copy with the following commands in a terminal:

 $ mkdir -p $HOME/.config/tazweb
-$ cp /usr/share/tazweb/bookmarks.html $HOME/.config/tazweb
+$ cp /usr/share/tazweb/*.html $HOME/.config/tazweb
+$ cp /usr/share/tazweb/*.css $HOME/.config/tazweb
 
-

Home page and url in argument

diff -r 74112b613920 -r f8ecd3ad885b doc/tazweb.fr.html --- a/doc/tazweb.fr.html Fri Apr 15 01:59:38 2011 +0200 +++ b/doc/tazweb.fr.html Fri Apr 15 04:45:26 2011 +0200 @@ -3,16 +3,7 @@ Documentation TazWeb - + diff -r 74112b613920 -r f8ecd3ad885b doc/tazweb.pt.html --- a/doc/tazweb.pt.html Fri Apr 15 01:59:38 2011 +0200 +++ b/doc/tazweb.pt.html Fri Apr 15 04:45:26 2011 +0200 @@ -3,16 +3,7 @@ Documentação do TazWeb - + diff -r 74112b613920 -r f8ecd3ad885b src/main.c --- a/src/main.c Fri Apr 15 01:59:38 2011 +0200 +++ b/src/main.c Fri Apr 15 04:45:26 2011 +0200 @@ -23,7 +23,7 @@ update_title (GtkWindow* window) { GString* string = g_string_new (main_title); - g_string_append (string, " - TazWeb"); + /* g_string_append (string, " - TazWeb"); */ if (load_progress < 100) g_string_append_printf (string, " (%f%%)", load_progress); gchar* title = g_string_free (string, FALSE); @@ -77,7 +77,7 @@ static void go_home_cb (GtkWidget* widget, gpointer data) { - const gchar* uri = ("file:///usr/share/webhome/index.html"); + const gchar* uri = ("file:///usr/share/webhome/index.html"); g_assert (uri); webkit_web_view_load_uri (web_view, uri); } @@ -86,8 +86,8 @@ static void bookmarks_cb (GtkWidget* widget, gpointer data) { - const gchar* uri = g_strdup_printf ("file://%s/.config/tazweb/bookmarks.html", - g_get_home_dir ()); + const gchar* uri = g_strdup_printf ("file://%s/.config/tazweb/page.html", + g_get_home_dir ()); g_assert (uri); webkit_web_view_load_uri (web_view, uri); } @@ -163,12 +163,11 @@ create_toolbar () { GtkWidget* toolbar = gtk_toolbar_new (); + GtkToolItem* item; gtk_toolbar_set_orientation (GTK_TOOLBAR (toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH_HORIZ); - GtkToolItem* item; - /* The back button */ item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_BACK); g_signal_connect (G_OBJECT (item), "clicked", G_CALLBACK (go_back_cb), NULL); @@ -190,7 +189,7 @@ uri_entry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (item), uri_entry); g_signal_connect (G_OBJECT (uri_entry), "activate", - G_CALLBACK (activate_uri_entry_cb), NULL); + G_CALLBACK (activate_uri_entry_cb), NULL); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); /* The Home button */ @@ -223,7 +222,7 @@ /* Default tazweb window size ratio to 3/4 ?? --> 720, 540*/ gtk_window_set_default_size (GTK_WINDOW (window), 800, 600); gtk_window_set_icon (GTK_WINDOW (window), - create_pixbuf ("/usr/share/pixmaps/tazweb.png")); + create_pixbuf ("/usr/share/pixmaps/tazweb.png")); gtk_widget_set_name (window, "TazWeb"); g_signal_connect (window, "destroy", G_CALLBACK (destroy_cb), NULL); @@ -241,7 +240,8 @@ const gchar* config = g_strdup_printf ("%s/.config/tazweb", g_get_home_dir ()); if (!g_file_test(config, G_FILE_TEST_EXISTS)) { g_mkdir(config, 0700); - system("cp /usr/share/tazweb/bookmarks.html $HOME/.config/tazweb"); + system("cp /usr/share/tazweb/*.html $HOME/.config/tazweb"); + system("cp /usr/share/tazweb/*.css $HOME/.config/tazweb"); } GtkWidget* vbox = gtk_vbox_new (FALSE, 2); @@ -253,7 +253,7 @@ /* Home page url or file */ gchar* uri = (gchar*) (argc > 1 ? argv[1] : - "file:///usr/share/webhome/index.html"); + "file:///usr/share/webhome/index.html"); webkit_web_view_load_uri (web_view, uri); gtk_widget_grab_focus (GTK_WIDGET (web_view));