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) (unidiff) | |
tree | eafa246cd99308ea349aef90a708ef9f6d7a0418 /htdocs | |
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 | ||||
-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,26 +1,50 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive page = "/ancestry/page.chtml"; | 2 | %%derive page = "/ancestry/page.chtml"; |
3 | <%decl> | ||
4 | #define PN_PREV(h,d,t) urlPrev=h; descPrev=d; titlePrev=t; | ||
5 | #define PN_NEXT(h,d,t) urlNext=h; descNext=d; titleNext=t; | ||
6 | </%decl> | ||
7 | %%impl #include <sitecing/util.h> | ||
3 | %%impl #include "acconfig.h" | 8 | %%impl #include "acconfig.h" |
4 | %%var bool b_svn = false; | 9 | %%var bool b_svn = false; |
10 | %%var std::string urlPrev; | ||
11 | %%var std::string descPrev; | ||
12 | %%var std::string titlePrev; | ||
13 | %%var std::string urlNext; | ||
14 | %%var std::string descNext; | ||
15 | %%var std::string titleNext; | ||
5 | <%constructor> | 16 | <%constructor> |
6 | if(strstr(PACKAGE_STRING,"svn")) | 17 | if(strstr(PACKAGE_STRING,"svn")) |
7 | b_svn = true; | 18 | b_svn = true; |
8 | </%constructor> | 19 | </%constructor> |
20 | <%method void prevnext() %> | ||
21 | % if(urlPrev.empty() && urlNext.empty()) return; | ||
22 | % if(descPrev.empty() && descNext.empty()) return; | ||
23 | <div class="prevnext"> | ||
24 | % if(!(urlPrev.empty() || descPrev.empty())) { | ||
25 | <a class="prevnext-prev" href="<% urlPrev %>" title="<% sitecing::html_escape(titlePrev.empty()?descPrev:titlePrev) %>"><% sitecing::html_escape(descPrev) %></a> | ||
26 | % } | ||
27 | % if(!(urlNext.empty() || descNext.empty())) { | ||
28 | <a class="prevnext-next" href="<% urlNext %>" title="<% sitecing::html_escape(titleNext.empty()?descNext:titleNext) %>"><% sitecing::html_escape(descNext) %></a> | ||
29 | % } | ||
30 | </div> | ||
31 | </%method> | ||
9 | <%method void body() %> | 32 | <%method void body() %> |
10 | <div id="content"> | 33 | <div id="content"> |
11 | <%code> | 34 | <%code> |
12 | if(!access(WEB_RUN_ROOT "/conf/banner_top",R_OK)) { | 35 | if(!access(WEB_RUN_ROOT "/conf/banner_top",R_OK)) { |
13 | pass_file_through(WEB_RUN_ROOT "/conf/banner_top"); | 36 | pass_file_through(WEB_RUN_ROOT "/conf/banner_top"); |
14 | } | 37 | } |
38 | prevnext(); | ||
15 | content(); | 39 | content(); |
16 | if(b_strict && !access(WEB_RUN_ROOT "/conf/banner_bottom",R_OK)) { | 40 | if(b_strict && !access(WEB_RUN_ROOT "/conf/banner_bottom",R_OK)) { |
17 | pass_file_through(WEB_RUN_ROOT "/conf/banner_bottom"); | 41 | pass_file_through(WEB_RUN_ROOT "/conf/banner_bottom"); |
18 | } | 42 | } |
19 | </%code> | 43 | </%code> |
20 | </div> | 44 | </div> |
21 | <div id="sidepanel"> | 45 | <div id="sidepanel"> |
22 | % sidepanel(); | 46 | % sidepanel(); |
23 | </div> | 47 | </div> |
24 | </%method> | 48 | </%method> |
25 | <%method void content() %> | 49 | <%method void content() %> |
26 | </%method> | 50 | </%method> |
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,16 +1,18 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | <%constructor> | 3 | <%constructor> |
4 | b_strict = false; | 4 | b_strict = false; |
5 | PN_PREV("/exceptions/preprocess","preprocess","preprocessing errors"); | ||
6 | PN_NEXT("/exceptions/runtime","runtime","runtime exceptions"); | ||
5 | </%constructor> | 7 | </%constructor> |
6 | <%codemethod string title() %> | 8 | <%codemethod string title() %> |
7 | return "compile-time exceptions handling"; | 9 | return "compile-time exceptions handling"; |
8 | </%codemethod> | 10 | </%codemethod> |
9 | <%method void content() %> | 11 | <%method void content() %> |
10 | <h1>site-C-ing compile-time exception handling</h1> | 12 | <h1>site-C-ing compile-time exception handling</h1> |
11 | <p> | 13 | <p> |
12 | Similar to <a href="/exceptions/preprocess">preprocessing exceptions</a> | 14 | Similar to <a href="/exceptions/preprocess">preprocessing exceptions</a> |
13 | there is a wide range of errors you may put into your code which will pass | 15 | there is a wide range of errors you may put into your code which will pass |
14 | through preprocessor and will be caught later at the compile-time. | 16 | through preprocessor and will be caught later at the compile-time. |
15 | </p> | 17 | </p> |
16 | <p> | 18 | <p> |
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,14 +1,18 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | <%constructor> | ||
4 | PN_PREV("/simple","simple page","building a really simple page"); | ||
5 | PN_NEXT("/exceptions/preprocess","preprocess","preprocessing errors"); | ||
6 | </%constructor> | ||
3 | <%codemethod string title() %> | 7 | <%codemethod string title() %> |
4 | return "exceptions handling"; | 8 | return "exceptions handling"; |
5 | </%codemethod> | 9 | </%codemethod> |
6 | <%method void content() %> | 10 | <%method void content() %> |
7 | <h1>site-C-ing exception handling</h1> | 11 | <h1>site-C-ing exception handling</h1> |
8 | <p> | 12 | <p> |
9 | The purpose of this section is to give an overview of the <em>site-C-ing</em> | 13 | The purpose of this section is to give an overview of the <em>site-C-ing</em> |
10 | exception handling mechanism. Before the web visitor can see the page each | 14 | exception handling mechanism. Before the web visitor can see the page each |
11 | site-C-ing component goes through a few stages, namely, preprocessing, | 15 | site-C-ing component goes through a few stages, namely, preprocessing, |
12 | compiling and execution. Having three stages to go through also means the | 16 | compiling and execution. Having three stages to go through also means the |
13 | stages one can fail to go through and three exciting opportunities to handle | 17 | stages one can fail to go through and three exciting opportunities to handle |
14 | different errors. | 18 | different errors. |
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,16 +1,18 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | <%constructor> | 3 | <%constructor> |
4 | b_strict = false; | 4 | b_strict = false; |
5 | PN_PREV("/exceptions","exceptions","exception handling overview"); | ||
6 | PN_NEXT("/exceptions/compile","compile-time","compile-time errors"); | ||
5 | </%constructor> | 7 | </%constructor> |
6 | <%codemethod string title() %> | 8 | <%codemethod string title() %> |
7 | return "preprocessor exceptions handling"; | 9 | return "preprocessor exceptions handling"; |
8 | </%codemethod> | 10 | </%codemethod> |
9 | <%method void content() %> | 11 | <%method void content() %> |
10 | <h1>site-C-ing preprocessor exception handling</h1> | 12 | <h1>site-C-ing preprocessor exception handling</h1> |
11 | <p> | 13 | <p> |
12 | It was one of those days when you just can't type right and can't think of | 14 | It was one of those days when you just can't type right and can't think of |
13 | what you're typing. It is not unusual that, under such circumstances, you end | 15 | what you're typing. It is not unusual that, under such circumstances, you end |
14 | up with a code like <a | 16 | up with a code like <a |
15 | href="/view/htdocs/exceptions/development/preprocess.chtml" target="insert" | 17 | href="/view/htdocs/exceptions/development/preprocess.chtml" target="insert" |
16 | title="the link opens in the frame below">this</a> -- by the time you were | 18 | title="the link opens in the frame below">this</a> -- by the time you were |
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,16 +1,18 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | <%constructor> | 3 | <%constructor> |
4 | b_strict = false; | 4 | b_strict = false; |
5 | PN_PREV("/exceptions/compile","compile-time","compile-time errors"); | ||
6 | PN_NEXT("/sources","sources","source browser"); | ||
5 | </%constructor> | 7 | </%constructor> |
6 | <%codemethod string title() %> | 8 | <%codemethod string title() %> |
7 | return "runtime exceptions handling"; | 9 | return "runtime exceptions handling"; |
8 | </%codemethod> | 10 | </%codemethod> |
9 | <%method void content() %> | 11 | <%method void content() %> |
10 | <h1>site-C-ing runtime exception handling</h1> | 12 | <h1>site-C-ing runtime exception handling</h1> |
11 | <p> | 13 | <p> |
12 | The component may throw an exception while executing and the | 14 | The component may throw an exception while executing and the |
13 | <em>site-C-ing</em> will gladly pass it to the handler component which will | 15 | <em>site-C-ing</em> will gladly pass it to the handler component which will |
14 | give the user appropriate output (unless it throws an exception itself, of | 16 | give the user appropriate output (unless it throws an exception itself, of |
15 | course). Here you will see an example output provided by the handler bundled | 17 | course). Here you will see an example output provided by the handler bundled |
16 | with the <em>site-C-ing</em>. | 18 | with the <em>site-C-ing</em>. |
diff --git a/htdocs/index.chtml b/htdocs/index.chtml index aa0979a..e8cedda 100644 --- a/htdocs/index.chtml +++ b/htdocs/index.chtml | |||
@@ -1,14 +1,17 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | <%constructor> | ||
4 | PN_NEXT("/simple","simple page","building a really simple page"); | ||
5 | </%constructor> | ||
3 | <%codemethod string title() %> | 6 | <%codemethod string title() %> |
4 | return "introduction"; | 7 | return "introduction"; |
5 | </%codemethod> | 8 | </%codemethod> |
6 | <%method void content() %> | 9 | <%method void content() %> |
7 | <h1>introduction to site-C-ing</h1> | 10 | <h1>introduction to site-C-ing</h1> |
8 | <p> | 11 | <p> |
9 | This is a sample site, which is supposed to demonstrate <em>site-C-ing</em> | 12 | This is a sample site, which is supposed to demonstrate <em>site-C-ing</em> |
10 | features. Since the <em>site-C-ing</em> is still at the early stages of | 13 | features. Since the <em>site-C-ing</em> is still at the early stages of |
11 | development or rather proof of concept, this site is also far from being | 14 | development or rather proof of concept, this site is also far from being |
12 | complete. I am planning to add more pages as the time permits, though. | 15 | complete. I am planning to add more pages as the time permits, though. |
13 | </p> | 16 | </p> |
14 | <p> | 17 | <p> |
diff --git a/htdocs/simple.chtml b/htdocs/simple.chtml index 9900f00..845b840 100644 --- a/htdocs/simple.chtml +++ b/htdocs/simple.chtml | |||
@@ -1,16 +1,18 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | <%constructor> | 3 | <%constructor> |
4 | b_strict = false; | 4 | b_strict = false; |
5 | PN_PREV("/","overview","introduction to site-C-ing"); | ||
6 | PN_NEXT("/exceptions","exceptions","exception handling overview"); | ||
5 | </%constructor> | 7 | </%constructor> |
6 | <%codemethod string title() %> | 8 | <%codemethod string title() %> |
7 | return "simple page"; | 9 | return "simple page"; |
8 | </%codemethod> | 10 | </%codemethod> |
9 | <%method void content() %> | 11 | <%method void content() %> |
10 | <h1>building a really simple page</h1> | 12 | <h1>building a really simple page</h1> |
11 | <p> | 13 | <p> |
12 | Building a really simple page is really simple. I will not go into much detail | 14 | Building a really simple page is really simple. I will not go into much detail |
13 | here. The example provided should speak for itself. | 15 | here. The example provided should speak for itself. |
14 | </p> | 16 | </p> |
15 | <p> | 17 | <p> |
16 | The component being written doesn't do much but show you the calendar for the | 18 | The component being written doesn't do much but show you the calendar for the |
diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml index b1eeed3..6341f49 100644 --- a/htdocs/sources.chtml +++ b/htdocs/sources.chtml | |||
@@ -1,20 +1,21 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | %%derive sources = "/ancestry/sources.chtml"; | 3 | %%derive sources = "/ancestry/sources.chtml"; |
4 | <%impl> | 4 | <%impl> |
5 | #include <sitecing/sitecing_util.h> | 5 | #include <sitecing/sitecing_util.h> |
6 | </%impl> | 6 | </%impl> |
7 | <%constructor> | 7 | <%constructor> |
8 | b_strict = false; | 8 | b_strict = false; |
9 | PN_PREV("/exceptions/runtime","runtime","runtime exceptions"); | ||
9 | </%constructor> | 10 | </%constructor> |
10 | <%codemethod string title() %> | 11 | <%codemethod string title() %> |
11 | return "runtime exceptions handling"; | 12 | return "runtime exceptions handling"; |
12 | </%codemethod> | 13 | </%codemethod> |
13 | <%method void content() %> | 14 | <%method void content() %> |
14 | <h1>browse this site sources</h1> | 15 | <h1>browse this site sources</h1> |
15 | 16 | ||
16 | <ul class="sourcebrowser"> | 17 | <ul class="sourcebrowser"> |
17 | % for(int n=0;n<source_files_count;n++) { | 18 | % for(int n=0;n<source_files_count;n++) { |
18 | % sourcefile_t& sf = source_files[n]; | 19 | % sourcefile_t& sf = source_files[n]; |
19 | % if(!sf.name) { /* the beginning or the end of the directory */ | 20 | % if(!sf.name) { /* the beginning or the end of the directory */ |
20 | % if(sf.dir) { /* the beginning */ | 21 | % if(sf.dir) { /* the beginning */ |
diff --git a/htdocs/style.css b/htdocs/style.css index 3ab1b6f..83e308f 100644 --- a/htdocs/style.css +++ b/htdocs/style.css | |||
@@ -107,24 +107,28 @@ div#sidepanel ul ul a { | |||
107 | background: #e0e0e0; | 107 | background: #e0e0e0; |
108 | } | 108 | } |
109 | div#sidepanel div.copyright { | 109 | div#sidepanel div.copyright { |
110 | text-align: center; | 110 | text-align: center; |
111 | } | 111 | } |
112 | 112 | ||
113 | div#content h1 { | 113 | div#content h1 { |
114 | font-size: 140%; | 114 | font-size: 140%; |
115 | color: gray; | 115 | color: gray; |
116 | font-weight: bold; | 116 | font-weight: bold; |
117 | text-align: center; | 117 | text-align: center; |
118 | margin: 1em; | 118 | margin: 1em; |
119 | clear: both; | ||
120 | } | ||
121 | div#content p a { | ||
122 | font-weight: bold; | ||
119 | } | 123 | } |
120 | 124 | ||
121 | div.insert { | 125 | div.insert { |
122 | text-align: center; | 126 | text-align: center; |
123 | } | 127 | } |
124 | iframe#insert { | 128 | iframe#insert { |
125 | border: 1px solid black; | 129 | border: 1px solid black; |
126 | } | 130 | } |
127 | 131 | ||
128 | div.source h1 { | 132 | div.source h1 { |
129 | background: #e0e0e0; | 133 | background: #e0e0e0; |
130 | border: 1px solid #808080; | 134 | border: 1px solid #808080; |
@@ -166,12 +170,36 @@ ul.sourcebrowser li.file { | |||
166 | } | 170 | } |
167 | ul.sourcebrowser li.file a { | 171 | ul.sourcebrowser li.file a { |
168 | border: 1px solid gray; | 172 | border: 1px solid gray; |
169 | padding: 1px 0.5ex; | 173 | padding: 1px 0.5ex; |
170 | text-decoration: none; | 174 | text-decoration: none; |
171 | font-family: monospace; | 175 | font-family: monospace; |
172 | } | 176 | } |
173 | ul.sourcebrowser li.file a:hover { | 177 | ul.sourcebrowser li.file a:hover { |
174 | background: gray; | 178 | background: gray; |
175 | border: 1px solid black; | 179 | border: 1px solid black; |
176 | color: white; | 180 | color: white; |
177 | } | 181 | } |
182 | |||
183 | div.prevnext { | ||
184 | margin: 1ex; | ||
185 | } | ||
186 | div.prevnext a { | ||
187 | margin: 0.5ex 1em; padding: 0.2ex 0.5ex; | ||
188 | display: block; width: 30%; | ||
189 | border: solid 1px gray; | ||
190 | color: black; | ||
191 | text-decoration: none; | ||
192 | } | ||
193 | div.prevnext a.prevnext-prev { | ||
194 | float: left; | ||
195 | text-align: left; | ||
196 | } | ||
197 | div.prevnext a.prevnext-next { | ||
198 | float: right; | ||
199 | text-align: right; | ||
200 | } | ||
201 | div.prevnext a:hover { | ||
202 | background: gray; | ||
203 | border: black 1px solid; | ||
204 | color: white; | ||
205 | } | ||