From d379841850daab4693d596784b790b13e20e3a03 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Thu, 03 Feb 2005 00:17:58 +0000 Subject: 1. added a 'browse-through' navigation 2. improved performance by passing -flush to FastCgiExternalServer 3. emphasized links in text --- diff --git a/conf/httpd.conf.in b/conf/httpd.conf.in index 5910620..2184627 100644 --- a/conf/httpd.conf.in +++ b/conf/httpd.conf.in @@ -1,4 +1,4 @@ -FastCgiExternalServer @web_run_root@/fastcgi-bin/site-c-ing -socket @web_run_root@/run/sitecing-socket +FastCgiExternalServer @web_run_root@/fastcgi-bin/site-c-ing -socket @web_run_root@/run/sitecing-socket -flush ServerName @v_hostname@ DocumentRoot @web_src_root@/htdocs diff --git a/htdocs/ancestry/layout.chtml b/htdocs/ancestry/layout.chtml index 6147d37..0c167bc 100644 --- a/htdocs/ancestry/layout.chtml +++ b/htdocs/ancestry/layout.chtml @@ -1,17 +1,41 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive page = "/ancestry/page.chtml"; +<%decl> + #define PN_PREV(h,d,t) urlPrev=h; descPrev=d; titlePrev=t; + #define PN_NEXT(h,d,t) urlNext=h; descNext=d; titleNext=t; + +%%impl #include %%impl #include "acconfig.h" %%var bool b_svn = false; +%%var std::string urlPrev; +%%var std::string descPrev; +%%var std::string titlePrev; +%%var std::string urlNext; +%%var std::string descNext; +%%var std::string titleNext; <%constructor> if(strstr(PACKAGE_STRING,"svn")) b_svn = true; +<%method void prevnext() %> +% if(urlPrev.empty() && urlNext.empty()) return; +% if(descPrev.empty() && descNext.empty()) return; +
+% if(!(urlPrev.empty() || descPrev.empty())) { + <% sitecing::html_escape(descPrev) %> +% } +% if(!(urlNext.empty() || descNext.empty())) { + <% sitecing::html_escape(descNext) %> +% } +
+ <%method void body() %>
<%code> if(!access(WEB_RUN_ROOT "/conf/banner_top",R_OK)) { pass_file_through(WEB_RUN_ROOT "/conf/banner_top"); } + prevnext(); content(); if(b_strict && !access(WEB_RUN_ROOT "/conf/banner_bottom",R_OK)) { pass_file_through(WEB_RUN_ROOT "/conf/banner_bottom"); diff --git a/htdocs/exceptions/compile.chtml b/htdocs/exceptions/compile.chtml index aa4c8df..68dd034 100644 --- a/htdocs/exceptions/compile.chtml +++ b/htdocs/exceptions/compile.chtml @@ -2,6 +2,8 @@ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/exceptions/preprocess","preprocess","preprocessing errors"); + PN_NEXT("/exceptions/runtime","runtime","runtime exceptions"); <%codemethod string title() %> return "compile-time exceptions handling"; diff --git a/htdocs/exceptions/index.chtml b/htdocs/exceptions/index.chtml index cc0ed8a..e66620a 100644 --- a/htdocs/exceptions/index.chtml +++ b/htdocs/exceptions/index.chtml @@ -1,5 +1,9 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive layout = "/ancestry/layout.chtml"; +<%constructor> + PN_PREV("/simple","simple page","building a really simple page"); + PN_NEXT("/exceptions/preprocess","preprocess","preprocessing errors"); + <%codemethod string title() %> return "exceptions handling"; diff --git a/htdocs/exceptions/preprocess.chtml b/htdocs/exceptions/preprocess.chtml index 8516139..88b8741 100644 --- a/htdocs/exceptions/preprocess.chtml +++ b/htdocs/exceptions/preprocess.chtml @@ -2,6 +2,8 @@ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/exceptions","exceptions","exception handling overview"); + PN_NEXT("/exceptions/compile","compile-time","compile-time errors"); <%codemethod string title() %> return "preprocessor exceptions handling"; diff --git a/htdocs/exceptions/runtime.chtml b/htdocs/exceptions/runtime.chtml index d0a8e14..9a72afd 100644 --- a/htdocs/exceptions/runtime.chtml +++ b/htdocs/exceptions/runtime.chtml @@ -2,6 +2,8 @@ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/exceptions/compile","compile-time","compile-time errors"); + PN_NEXT("/sources","sources","source browser"); <%codemethod string title() %> return "runtime exceptions handling"; diff --git a/htdocs/index.chtml b/htdocs/index.chtml index aa0979a..e8cedda 100644 --- a/htdocs/index.chtml +++ b/htdocs/index.chtml @@ -1,5 +1,8 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive layout = "/ancestry/layout.chtml"; +<%constructor> + PN_NEXT("/simple","simple page","building a really simple page"); + <%codemethod string title() %> return "introduction"; diff --git a/htdocs/simple.chtml b/htdocs/simple.chtml index 9900f00..845b840 100644 --- a/htdocs/simple.chtml +++ b/htdocs/simple.chtml @@ -2,6 +2,8 @@ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/","overview","introduction to site-C-ing"); + PN_NEXT("/exceptions","exceptions","exception handling overview"); <%codemethod string title() %> return "simple page"; diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml index b1eeed3..6341f49 100644 --- a/htdocs/sources.chtml +++ b/htdocs/sources.chtml @@ -6,6 +6,7 @@ <%constructor> b_strict = false; + PN_PREV("/exceptions/runtime","runtime","runtime exceptions"); <%codemethod string title() %> return "runtime exceptions handling"; diff --git a/htdocs/style.css b/htdocs/style.css index 3ab1b6f..83e308f 100644 --- a/htdocs/style.css +++ b/htdocs/style.css @@ -116,6 +116,10 @@ div#content h1 { font-weight: bold; text-align: center; margin: 1em; + clear: both; +} +div#content p a { + font-weight: bold; } div.insert { @@ -175,3 +179,27 @@ ul.sourcebrowser li.file a:hover { border: 1px solid black; color: white; } + +div.prevnext { + margin: 1ex; +} +div.prevnext a { + margin: 0.5ex 1em; padding: 0.2ex 0.5ex; + display: block; width: 30%; + border: solid 1px gray; + color: black; + text-decoration: none; +} +div.prevnext a.prevnext-prev { + float: left; + text-align: left; +} +div.prevnext a.prevnext-next { + float: right; + text-align: right; +} +div.prevnext a:hover { + background: gray; + border: black 1px solid; + color: white; +} -- cgit v0.9.0.2