summaryrefslogtreecommitdiffabout
path: root/htdocs
authorMichael Krelin <hacker@klever.net>2005-02-03 00:17:58 (UTC)
committer Michael Krelin <hacker@klever.net>2005-02-03 00:17:58 (UTC)
commitd379841850daab4693d596784b790b13e20e3a03 (patch) (side-by-side diff)
treeeafa246cd99308ea349aef90a708ef9f6d7a0418 /htdocs
parent870963df2dac72e433fd7f94cd1cccc8cd6ea2d0 (diff)
downloadsitecing-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
Diffstat (limited to 'htdocs') (more/less context) (ignore whitespace changes)
-rw-r--r--htdocs/ancestry/layout.chtml24
-rw-r--r--htdocs/exceptions/compile.chtml2
-rw-r--r--htdocs/exceptions/index.chtml4
-rw-r--r--htdocs/exceptions/preprocess.chtml2
-rw-r--r--htdocs/exceptions/runtime.chtml2
-rw-r--r--htdocs/index.chtml3
-rw-r--r--htdocs/simple.chtml2
-rw-r--r--htdocs/sources.chtml1
-rw-r--r--htdocs/style.css28
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,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;
+</%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");
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");
</%constructor>
<%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");
+</%constructor>
<%codemethod string title() %>
return "exceptions handling";
</%codemethod>
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");
</%constructor>
<%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");
</%constructor>
<%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");
+</%constructor>
<%codemethod string title() %>
return "introduction";
</%codemethod>
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");
</%constructor>
<%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 @@
</%impl>
<%constructor>
b_strict = false;
+ PN_PREV("/exceptions/runtime","runtime","runtime exceptions");
</%constructor>
<%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;
+}