removed chevrons and optionality of container, those things are better managed by css

This commit is contained in:
Jacob Parker 2012-02-24 16:39:01 -05:00
parent 19d617e864
commit bb457c2fc3
2 changed files with 4 additions and 7 deletions

View File

@ -4,8 +4,6 @@ const string site_title = "This is a Title";
const string site_subtitle = "but this is a subtitle"; const string site_subtitle = "but this is a subtitle";
const bool nav_tree_vert = false; const bool nav_tree_vert = false;
const bool nav_tree_chev = true;
const bool page_container = true;
string[string] handlers; string[string] handlers;

View File

@ -11,10 +11,9 @@ void html_push(string s) { html(s); indent ~= " "; }
void write_link(string to, bool expand) { void write_link(string to, bool expand) {
bool isdir = dirExists(dweb_root ~ "/srv/" ~ to[url_root.length..$]); bool isdir = dirExists(dweb_root ~ "/srv/" ~ to[url_root.length..$]);
string flair = nav_tree_chev? (expand? "» " : "› ") : "";
html_push("<li" ~ (expand? " class=\"thisPage\" " : "") ~ ">"); html_push("<li" ~ (expand? " class=\"thisPage\" " : "") ~ ">");
html("<a href=\"" ~ to ~ (isdir ? "/" : "") ~ "\">" html("<a href=\"" ~ to ~ (isdir ? "/" : "") ~ "\">"
~ flair ~ baseName(to) ~ (isdir ? "/" : "") ~ "</a>"); ~ baseName(to) ~ (isdir ? "/" : "") ~ "</a>");
html_pop("</li>"); html_pop("</li>");
} }
@ -160,13 +159,13 @@ void main(string[] args) {
html("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"); html("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
html_pop("</head>\n"); html_pop("</head>\n");
html_push("<body" ~ (page_container? " style=\"text-align: center\"" : "")~ ">"); html_push("<body style=\"text-align: center\">");
if (page_container) html_push("<div id=\"container\">"); html_push("<div id=\"container\">");
do_header(); do_header();
do_nav_tree(url); do_nav_tree(url);
do_content(url); do_content(url);
do_footer(); do_footer();
if (page_container) html_pop("</div>"); html_pop("</div>");
html_pop("</body>\n"); html_pop("</body>\n");
html_pop("</html>"); html_pop("</html>");