Merge branch 'master' of https://github.com/j3parker/dweb
Conflicts: src/config.d.sample
This commit is contained in:
commit
377b3a9c7e
|
@ -15,7 +15,7 @@ body {
|
|||
text-align: center;
|
||||
color: black;
|
||||
background-color: white;
|
||||
font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif;
|
||||
font-family: Helvetica, Verdana, Arial, DejaVu Sans, sans-serif;
|
||||
font-size: 84%; /* Enables font size scaling in MSIE */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -330,7 +330,7 @@ li ul {
|
|||
padding: 2mm 5mm 2mm 5mm;
|
||||
}
|
||||
|
||||
#main-copy p {
|
||||
#main-copy p, #main-copy li {
|
||||
margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
const string url_root = "/";
|
||||
|
||||
const string site_title = "This is a Title";
|
||||
const string site_subtitle = "but this is a subtitle";
|
||||
|
||||
const bool nav_tree_vert = false;
|
||||
|
||||
string[string] handlers;
|
||||
|
||||
void init_handlers() {
|
||||
handlers["*.md"] = "contrib/Markdown.pl";
|
||||
handlers["changelog"] = "changelog.sh";
|
||||
}
|
|
@ -11,10 +11,9 @@ void html_push(string s) { html(s); indent ~= " "; }
|
|||
|
||||
void write_link(string to, bool expand) {
|
||||
bool isdir = dirExists(dweb_root ~ "/srv/" ~ to[url_root.length..$]);
|
||||
string flair = nav_tree_chev? (expand? "» " : "› ") : "";
|
||||
html_push("<li" ~ (expand? " class=\"thisPage\" " : "") ~ ">");
|
||||
html("<a href=\"" ~ to ~ (isdir ? "/" : "") ~ "\">"
|
||||
~ flair ~ baseName(to) ~ (isdir ? "/" : "") ~ "</a>");
|
||||
~ baseName(to) ~ (isdir ? "/" : "") ~ "</a>");
|
||||
html_pop("</li>");
|
||||
}
|
||||
|
||||
|
@ -167,13 +166,13 @@ void main(string[] args) {
|
|||
html("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
|
||||
html_pop("</head>\n");
|
||||
|
||||
html_push("<body" ~ (page_container? " style=\"text-align: center\"" : "")~ ">");
|
||||
if (page_container) html_push("<div id=\"container\">");
|
||||
html_push("<body style=\"text-align: center\">");
|
||||
html_push("<div id=\"container\">");
|
||||
do_header();
|
||||
do_nav_tree(url);
|
||||
do_content(url);
|
||||
do_footer();
|
||||
if (page_container) html_pop("</div>");
|
||||
html_pop("</div>");
|
||||
html_pop("</body>\n");
|
||||
|
||||
html_pop("</html>");
|
||||
|
|
Loading…
Reference in New Issue