playing around with libcwa and webgit .. added a tiny bit of css
authorCillian <cillian@monster.(none)>
Sun, 20 Jan 2008 21:46:47 +0000 (21:46 +0000)
committerCillian <cillian@monster.(none)>
Sun, 20 Jan 2008 21:46:47 +0000 (21:46 +0000)
mini-httpd.sh
skins/default/css/webgit.css [new file with mode: 0644]
skins/skins [new symlink]
src/actions.c
src/webgit.c
webgit.conf

index af988b8..61cf43e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 rm minihttpd.log
 
diff --git a/skins/default/css/webgit.css b/skins/default/css/webgit.css
new file mode 100644 (file)
index 0000000..eed3df4
--- /dev/null
@@ -0,0 +1,3 @@
+#container {
+       border: 1px solid black;
+}
diff --git a/skins/skins b/skins/skins
new file mode 120000 (symlink)
index 0000000..5d76732
--- /dev/null
@@ -0,0 +1 @@
+skins
\ No newline at end of file
index 080943d..4e15173 100644 (file)
@@ -46,7 +46,17 @@ static Html
 webgit_main_menu_action (struct webgit_query* query)
 {
   (void) query;
-  return html ("TODO: main menu sidebar");
+  return html ("TODO: main menu");
+}
+
+static Html
+webgit_header_action (struct webgit_query* query)
+{
+  (void) query;
+  return html (
+               html_tag("h1", html_attr("id", "page-heading")),
+               "webgit"
+             );
 }
 
 static Html
@@ -141,7 +151,8 @@ static Html
 webgit_main_action (struct webgit_query* query)
 {
   return html(
-              html(html_tag("div"), webgit_main_menu_action (query)), html_nl (),
+              html(html_tag("div", html_attr("id", "header")), webgit_header_action (query)) , html_nl (),
+              html(html_tag("div", html_attr("id", "main-menu")), webgit_main_menu_action (query)), html_nl (),
               html(html_tag("div"), webgit_main_content_action (query)), html_nl ()
               );
 }
@@ -154,7 +165,7 @@ static Html
 webgit_summary_menu_action (struct webgit_repo_info* repo)
 {
   (void) repo;
-  return html ("TODO: summary sidebar");
+  return html ("TODO: summary");
 }
 
 
index 9caf85a..896d84e 100644 (file)
@@ -193,13 +193,16 @@ main (int argc, char**argv)
                                              html(
                                                   html(html_tag("title"), "webgit"),
                                                   html_nl(),
-                                                  html_meta("generator", "webgit")//,
-                                                  //html_link_rel("stylesheet", "text/css", cgit_page.stylesheet)
+                                                  html_meta("generator", "webgit"),
+                                                  html_link_rel("stylesheet", "text/css", query.stylesheet),
+                                                  html_link_rel("Shortcut Icon", "image/x-icon", "/favicon.ico")
                                                   ),
                                              /*body*/
                                              html (
                                                    html (
-                                                         html_tag("div"),
+                                                         html_tag("div",
+                                                               html_attr("id", "container")
+                                                                ),
                                                          content
                                                          ),
                                                    html(
index 1abb5c7..c4887ce 100644 (file)
@@ -1,7 +1,7 @@
 # example config file, see src/options.h for more options
 # src/repo.h for git-config options [web] ...
 count 10
-repo /home/ct/src/ctgit
-repo /home/ct/src/ctgit/git
-repo /home/ct/src/libcwa
-repo /usr/src/linux-2.6
+stylesheet /skins/default/css/webgit.css
+repo /home/cillian/webgit
+repo /home/cillian/webgit/git
+repo /home/cillian/libcwa