program rapid; {$mode objfpc}{$H+}
uses
pwinit, pwmain,
strwrap1,
htmw;
var
TopPanel: THtmCustomBox = (
position: cpAbsolute;
left: 0; top: 2; height: 0; width: 96;
pad: 6;
HeightUnit: hmPixel; WidthUnit: hmPercent;
bgcolor: 'gray';
PageAlign: caCenter;
border: cbNone;
zindex: 1;
text: '';
);
RightPanel: THtmPercentBox;
LeftPanel: THtmPercentBox;
ContentPanel: THtmPercentBox;
FootPanel: THtmPercentBox;
function: TemplateFileToString(fname: string): string;
begin
result:= StrLoadFile(fname);
result:= WebFormat(result);
end;
procedure Init;
begin
SetVar('macro1' 'blue sky');
SetVar('macro2' 'green grass');
end;
procedure Show;
begin
HtmBegin('Pascal Internet Program');
TopPanel.text:= TemplateFileToString('content1.tpl');
BoxOut(TopPanel);
HtmEnd;
end;
begin
Init;
Show;
end.
|