-rw-r--r-- | htdocs/ancestry/layout.chtml | 24 | ||||
-rw-r--r-- | htdocs/exceptions/compile.chtml | 2 | ||||
-rw-r--r-- | htdocs/exceptions/index.chtml | 4 | ||||
-rw-r--r-- | htdocs/exceptions/preprocess.chtml | 2 | ||||
-rw-r--r-- | htdocs/exceptions/runtime.chtml | 2 | ||||
-rw-r--r-- | htdocs/index.chtml | 3 | ||||
-rw-r--r-- | htdocs/simple.chtml | 2 | ||||
-rw-r--r-- | htdocs/sources.chtml | 1 | ||||
-rw-r--r-- | htdocs/style.css | 28 |
9 files changed, 68 insertions, 0 deletions
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,20 +1,44 @@ % 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; +</%decl> +%%impl #include <sitecing/util.h> %%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; </%constructor> +<%method void prevnext() %> +% if(urlPrev.empty() && urlNext.empty()) return; +% if(descPrev.empty() && descNext.empty()) return; + <div class="prevnext"> +% if(!(urlPrev.empty() || descPrev.empty())) { + <a class="prevnext-prev" href="<% urlPrev %>" title="<% sitecing::html_escape(titlePrev.empty()?descPrev:titlePrev) %>"><% sitecing::html_escape(descPrev) %></a> +% } +% if(!(urlNext.empty() || descNext.empty())) { + <a class="prevnext-next" href="<% urlNext %>" title="<% sitecing::html_escape(titleNext.empty()?descNext:titleNext) %>"><% sitecing::html_escape(descNext) %></a> +% } + </div> +</%method> <%method void body() %> <div id="content"> <%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"); } </%code> </div> 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 @@ -1,10 +1,12 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/exceptions/preprocess","preprocess","preprocessing errors"); + PN_NEXT("/exceptions/runtime","runtime","runtime exceptions"); </%constructor> <%codemethod string title() %> return "compile-time exceptions handling"; </%codemethod> <%method void content() %> <h1>site-C-ing compile-time exception handling</h1> 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,8 +1,12 @@ % 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"); +</%constructor> <%codemethod string title() %> return "exceptions handling"; </%codemethod> <%method void content() %> <h1>site-C-ing exception handling</h1> <p> 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 @@ -1,10 +1,12 @@ % html(); return; /* vim:set ft=sitecing: */ %%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"); </%constructor> <%codemethod string title() %> return "preprocessor exceptions handling"; </%codemethod> <%method void content() %> <h1>site-C-ing preprocessor exception handling</h1> 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 @@ -1,10 +1,12 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/exceptions/compile","compile-time","compile-time errors"); + PN_NEXT("/sources","sources","source browser"); </%constructor> <%codemethod string title() %> return "runtime exceptions handling"; </%codemethod> <%method void content() %> <h1>site-C-ing runtime exception handling</h1> diff --git a/htdocs/index.chtml b/htdocs/index.chtml index aa0979a..e8cedda 100644 --- a/htdocs/index.chtml +++ b/htdocs/index.chtml @@ -1,8 +1,11 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive layout = "/ancestry/layout.chtml"; +<%constructor> + PN_NEXT("/simple","simple page","building a really simple page"); +</%constructor> <%codemethod string title() %> return "introduction"; </%codemethod> <%method void content() %> <h1>introduction to site-C-ing</h1> <p> diff --git a/htdocs/simple.chtml b/htdocs/simple.chtml index 9900f00..845b840 100644 --- a/htdocs/simple.chtml +++ b/htdocs/simple.chtml @@ -1,10 +1,12 @@ % html(); return; /* vim:set ft=sitecing: */ %%derive layout = "/ancestry/layout.chtml"; <%constructor> b_strict = false; + PN_PREV("/","overview","introduction to site-C-ing"); + PN_NEXT("/exceptions","exceptions","exception handling overview"); </%constructor> <%codemethod string title() %> return "simple page"; </%codemethod> <%method void content() %> <h1>building a really simple page</h1> diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml index b1eeed3..6341f49 100644 --- a/htdocs/sources.chtml +++ b/htdocs/sources.chtml @@ -3,12 +3,13 @@ %%derive sources = "/ancestry/sources.chtml"; <%impl> #include <sitecing/sitecing_util.h> </%impl> <%constructor> b_strict = false; + PN_PREV("/exceptions/runtime","runtime","runtime exceptions"); </%constructor> <%codemethod string title() %> return "runtime exceptions handling"; </%codemethod> <%method void content() %> <h1>browse this site sources</h1> diff --git a/htdocs/style.css b/htdocs/style.css index 3ab1b6f..83e308f 100644 --- a/htdocs/style.css +++ b/htdocs/style.css @@ -113,12 +113,16 @@ div#sidepanel div.copyright { div#content h1 { font-size: 140%; color: gray; font-weight: bold; text-align: center; margin: 1em; + clear: both; +} +div#content p a { + font-weight: bold; } div.insert { text-align: center; } iframe#insert { @@ -172,6 +176,30 @@ ul.sourcebrowser li.file a { } ul.sourcebrowser li.file a:hover { background: gray; 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; +} |