HTML::TemplateとCSS
もう 使いまわしまくってる form.css
/* --基本部分の設定-- */
body{background-color:#66ffcc;font-size:20px;line-height:20px}
h1{text-align:center;margin:0 15%;
background-color:#eea8aa;
font-size:20px;
color:#ffffff;
font-style:italic;}
em{font-size:20px;
border-bottom:dashed;
color:#808000;}
#bbb {color:#ff1493;margin:0 15%;line-height:12px;}
.ccc {color:#008000;margin:0 15%;line-height:15px;}
.aaa{border:solid 20px red;margin:2px 15%;padding:0px;line-height:20px;}
これをですね強引に
sample1.htm に外部スタイルシートとしてリンク貼ります
<h1>政権交代</h1>
<h2>どうなる日本</h2>
年表 -- 経歴
データはありません
で sample1.pl を動かすとですね
#!D:/xampp/perl/bin/perl -w #Cドライブの人はCにしてね use HTML::Template; my $tmpl = HTML::Template->new(filename =>'sample1.htm'); my @user_data =( {data_code=>1947,data_name=>'誕生'}, {data_code=>1969,data_name=>'東京大学工学部応用物理・計数工学科卒業'}, {data_code=>1976,data_name=>'スタンフォード大学大学院博士課程修了'}, {data_code=>1981,data_name=>'専修大学助教授'}, {data_code=>1986,data_name=>'第38回衆議院議員総選挙(旧北海道4区・自民党公認)当選 '}, {data_code=>1993,data_name=>'自民党離党'}, {data_code=>1994,data_name=>'新党さきがけ結成'}, {data_code=>1998,data_name=>'民主党結成'}, {data_code=>2005,data_name=>'幹事長就任'}, {data_code=>2009,data_name=>'民主党代表、第93代内閣総理大臣就任'}, ); #------------------ # パラメータの設定 #------------------ $tmpl->param(user_name =>'鳩山由紀夫'); $tmpl->param(arr_data =>\@user_data); $tmpl->param(arr_data_num=>scalar(@user_data)); #----------------- # 出力 #----------------- print "Content-Type: text/html\n\n"; print $tmpl->output();