From de368235a985ac538bd3dcad2401e3ec545da38c Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 7 Jan 2013 08:03:46 +0000 Subject: [PATCH] Misc updates.. --- .htaccess | 4 ++-- src/main.c | 6 ++++-- theme/style.css | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index 602ae5c..d69fb11 100644 --- 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' diff --git a/src/main.c b/src/main.c index 71f8b40..7887528 100644 --- a/src/main.c +++ b/src/main.c @@ -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: diff --git a/theme/style.css b/theme/style.css index cb11975..5d79eef 100644 --- a/theme/style.css +++ b/theme/style.css @@ -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; -- 2.41.0