]> Pileus Git - site/commitdiff
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 602ae5cc8e8e486682a05bf6d27e39ff12b2126f..d69fb112bdb57dfd36274179839c942e02831c87 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 71f8b40254e9dfc4845772d90e5bf30a9a81a62d..7887528ca44066a75ef68ad37866f33f806e23b7 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 cb11975dfdd98c0d3c58dff24fcb6faa0aa42595..5d79eef39259a8c26437e241654376a8912dc783 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;