author | Michael Krelin <hacker@klever.net> | 2005-02-03 00:17:58 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-02-03 00:17:58 (UTC) |
commit | d379841850daab4693d596784b790b13e20e3a03 (patch) (side-by-side diff) | |
tree | eafa246cd99308ea349aef90a708ef9f6d7a0418 /htdocs/ancestry | |
parent | 870963df2dac72e433fd7f94cd1cccc8cd6ea2d0 (diff) | |
download | sitecing-d379841850daab4693d596784b790b13e20e3a03.zip sitecing-d379841850daab4693d596784b790b13e20e3a03.tar.gz sitecing-d379841850daab4693d596784b790b13e20e3a03.tar.bz2 |
1. added a 'browse-through' navigation
2. improved performance by passing -flush to FastCgiExternalServer
3. emphasized links in text
-rw-r--r-- | htdocs/ancestry/layout.chtml | 24 |
1 files changed, 24 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,38 +1,62 @@ % 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> <div id="sidepanel"> % sidepanel(); </div> </%method> <%method void content() %> </%method> <%method void sidepanel() %> <h1><% PACKAGE_STRING %></h1> % if(b_svn) { <h2>The site is running source from the source repository which may differ from the one available for download. You can check it out from the <a href="http://kin.klever.net/sitecing/repository">source repository</a>.</h2> % } % /* thank MSIE for this awful formatting */ <ul><li><a href="/" title="introduction to site-C-ing">overview</a><ul><li><a href="/simple" title="building a really simple page">simple page</a></li></ul></li><li><a href="/exceptions/" title="exceptions handling">exceptions</a><ul><li><a href="/exceptions/preprocess" title="preprocessor errors">preprocess</a></li><li><a href="/exceptions/compile" title="compiler errors">compile-time</a></li><li><a href="/exceptions/runtime" title="runtime exceptions">runtime</a></li></ul></li><li><a href="/sources" title="browse this site source files">sources</a></li></ul> <%code> if(!access(WEB_RUN_ROOT "/conf/banner_side",R_OK)) { pass_file_through(WEB_RUN_ROOT "/conf/banner_side"); |