Misc updates..
authorAndy Spencer <andy753421@gmail.com>
Mon, 7 Jan 2013 08:03:46 +0000 (08:03 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 7 Jan 2013 08:03:46 +0000 (08:03 +0000)
.htaccess
src/main.c
theme/style.css

index 602ae5c..d69fb11 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -4,9 +4,9 @@ RewriteEngine on
 
 # Indexes
 RewriteRule   ^$      '/home'
-#RewriteRule   ^$      '/home/about'
-#RewriteRule   ^home$  '/home/about'
 
 # Pileus rewrites
+RewriteCond   %{REQUEST_URI}      !^/[^/]*/files/
+RewriteCond   %{REQUEST_URI}      !^/(dev|git)/
 RewriteCond   %{REQUEST_FILENAME} !-f
 RewriteRule   .* 'pileus.cgi/$0'
index 71f8b40..7887528 100644 (file)
@@ -140,6 +140,8 @@ menu_t *get_menu_rec(char *prefix, char **parts)
                if (nameval) next->name = nameval;
                if (!next->path) next->path = g_strdup(entries[i]);
                if (!next->name) next->name = g_strdup(entries[i]);
+               if (!parts[0] && !strcmp(next->base, "index"))
+                       next->show = SHOW_ACTIVE;
                cur = cur->next = next;
        }
        g_strfreev(entries);
@@ -153,6 +155,8 @@ menu_t *get_menu_rec(char *prefix, char **parts)
                        continue;
                if ((next = get_menu_entry(prefix, entries[i])))
                        cur = cur->next = next;
+               if (!strcmp(cur->base, "index"))
+                       cur->show = SHOW_HIDDEN;
        }
        g_strfreev(entries);
        g_key_file_free(conf);
@@ -165,8 +169,6 @@ menu_t *get_menu_rec(char *prefix, char **parts)
                        cur->kids = get_menu_rec(cur->path, parts+1);
                        cur->show = SHOW_ACTIVE;
                }
-               if (!strcmp(cur->base, "index"))
-                       cur->show = SHOW_HIDDEN;
        }
 
 error:
index cb11975..5d79eef 100644 (file)
@@ -27,6 +27,13 @@ blockquote {
        padding-left:  4px
 }
 
+pre {
+       background:    #f8f8f8;
+       border:        solid 1px #bbbbbb;
+       padding:       0.4em;
+       margin-left:   3em;
+}
+
 /* Title */
 .title {
        padding:       10px 20px;