-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.stcl
26 lines (26 loc) · 926 Bytes
/
example.stcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>tcl-scgi example</title>
</head>
<body>
<p><label style="font-weight: bold">gray-scale table</label></p>
<table><tr>
<?
set lvl 0
while {$lvl <= 255} {
set color "#[string repeat [format %02X $lvl] 3]"
@ [::scgi::html::td \
[list style "background-color: $color; width: 20px; height: 20px" \
title $color] \
{}]
@ "\n"
if {[incr lvl] % 16 == 0 && $lvl != 256} {
@ "</tr>\n<tr>\n"
}
}
?>
</tr></table>
</body>
</html>