summaryrefslogtreecommitdiffabout
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
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 (more/less context) (ignore whitespace changes)
-rw-r--r--conf/httpd.conf.in2
-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
10 files changed, 69 insertions, 1 deletions
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,3 +1,3 @@
-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
<VirtualHost *:80>
ServerName @v_hostname@
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,10 +1,33 @@
% 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">
@@ -13,4 +36,5 @@
pass_file_through(WEB_RUN_ROOT "/conf/banner_top");
}
+ prevnext();
content();
if(b_strict && !access(WEB_RUN_ROOT "/conf/banner_bottom",R_OK)) {
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
@@ -3,4 +3,6 @@
<%constructor>
b_strict = false;
+ PN_PREV("/exceptions/preprocess","preprocess","preprocessing errors");
+ PN_NEXT("/exceptions/runtime","runtime","runtime exceptions");
</%constructor>
<%codemethod string title() %>
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,4 +1,8 @@
% 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";
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
@@ -3,4 +3,6 @@
<%constructor>
b_strict = false;
+ PN_PREV("/exceptions","exceptions","exception handling overview");
+ PN_NEXT("/exceptions/compile","compile-time","compile-time errors");
</%constructor>
<%codemethod string title() %>
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
@@ -3,4 +3,6 @@
<%constructor>
b_strict = false;
+ PN_PREV("/exceptions/compile","compile-time","compile-time errors");
+ PN_NEXT("/sources","sources","source browser");
</%constructor>
<%codemethod string title() %>
diff --git a/htdocs/index.chtml b/htdocs/index.chtml
index aa0979a..e8cedda 100644
--- a/htdocs/index.chtml
+++ b/htdocs/index.chtml
@@ -1,4 +1,7 @@
% 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";
diff --git a/htdocs/simple.chtml b/htdocs/simple.chtml
index 9900f00..845b840 100644
--- a/htdocs/simple.chtml
+++ b/htdocs/simple.chtml
@@ -3,4 +3,6 @@
<%constructor>
b_strict = false;
+ PN_PREV("/","overview","introduction to site-C-ing");
+ PN_NEXT("/exceptions","exceptions","exception handling overview");
</%constructor>
<%codemethod string title() %>
diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml
index b1eeed3..6341f49 100644
--- a/htdocs/sources.chtml
+++ b/htdocs/sources.chtml
@@ -7,4 +7,5 @@
<%constructor>
b_strict = false;
+ PN_PREV("/exceptions/runtime","runtime","runtime exceptions");
</%constructor>
<%codemethod string title() %>
diff --git a/htdocs/style.css b/htdocs/style.css
index 3ab1b6f..83e308f 100644
--- a/htdocs/style.css
+++ b/htdocs/style.css
@@ -117,4 +117,8 @@ div#content h1 {
text-align: center;
margin: 1em;
+ clear: both;
+}
+div#content p a {
+ font-weight: bold;
}
@@ -176,2 +180,26 @@ ul.sourcebrowser li.file a:hover {
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;
+}