Subversion Repositories Koakuma

Rev

Rev 30 | Rev 33 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30 Rev 31
Line 1... Line 1...
1
#!/usr/bin/env tclsh
1
#!/usr/bin/env tclsh
2
# $Id: koakuma.cgi.in 30 2024-10-02 09:14:03Z nishi $
2
# $Id: koakuma.cgi.in 31 2024-10-02 09:25:33Z nishi $
3
 
3
 
4
set KOAKUMA_VERSION "1.00"
4
set KOAKUMA_VERSION "1.00"
5
set components ""
5
set components ""
6
 
6
 
7
chan configure stdout -buffering none
7
chan configure stdout -buffering none
Line 263... Line 263...
263
	}
263
	}
264
	rputs	"		<div style=\"clear: both;\"></div>"
264
	rputs	"		<div style=\"clear: both;\"></div>"
265
	if { "$has_toc" == "1" } {
265
	if { "$has_toc" == "1" } {
266
		rputs	"		<div id=\"toc\">"
266
		rputs	"		<div id=\"toc\">"
267
		rputs	"			<div id=\"tocinside\">"
267
		rputs	"			<div id=\"tocinside\">"
268
		rputs	"				<div id=\"toctitle\">TOC</div>"
268
		rputs	"				<span id=\"toctitle\">TOC</span><hr>"
269
		foreach sect $toc {
269
		foreach sect $toc {
270
			if { "[string range "[regsub -all { } "$sect" "-"]" 0 0]" == "-" } {
270
			if { "[string range "[regsub -all { } "$sect" "-"]" 0 0]" == "-" } {
271
				rputs "<a class=\"shiftlink\" href=\"#TOC-[regsub {^-} "[regsub -all { } "$sect" "-"]" ""]\">[regsub {^-} "$sect" ""]</a><br>"
271
				rputs "<a class=\"shiftlink\" href=\"#TOC-[regsub {^-} "[regsub -all { } "$sect" "-"]" ""]\">[regsub {^-} "$sect" ""]</a><br>"
272
			} else {
272
			} else {
273
				rputs "<a href=\"#TOC-[regsub -all { } "$sect" "-"]\">$sect</a><br>"
273
				rputs "<a href=\"#TOC-[regsub -all { } "$sect" "-"]\">$sect</a><br>"
Line 276... Line 276...
276
		rputs	"			</div>"
276
		rputs	"			</div>"
277
		rputs	"		</div>"
277
		rputs	"		</div>"
278
	}
278
	}
279
	rputs	"			<div id=\"docinside\">"
279
	rputs	"			<div id=\"docinside\">"
280
	rputs	"				<h1>$title</h1>"
280
	rputs	"				<h1>$title</h1>"
-
 
281
	rputs	"				<div id=\"shift\">"
281
}
282
}
282
proc end_html {has_toc} {
283
proc end_html {has_toc} {
283
	global KOAKUMA_VERSION toc
284
	global KOAKUMA_VERSION toc
-
 
285
	rputs	"				</div>"
284
	rputs	"			</div>"
286
	rputs	"			</div>"
285
	rputs	"		</div>"
287
	rputs	"		</div>"
286
	rputs	"		<div id=\"clearfix\"></div>"
288
	rputs	"		<div id=\"clearfix\"></div>"
287
	rputs	"		<hr>"
289
	rputs	"		<hr>"
288
	rputs	"		<i>Powered by <a href=\"http://nishi.boats/koakuma\">Koakuma</a> $KOAKUMA_VERSION</i>"
290
	rputs	"		<i>Powered by <a href=\"http://nishi.boats/koakuma\">Koakuma</a> $KOAKUMA_VERSION</i>"