################################################################
# テンプレート設定ファイル
#
#  $Template, $EndTemplate を変更することで、
#  出力される HTML をカスタマイズすることができます。
#
#  (perl が分からないとちょっち厳しいかもしれません。)
#  qq(...) というのは、ほぼ "..." と同義ですが、
#  中身の " をエスケープする必要がありません。 "
#
#  %year,%href などのパラメータについては、ドキュメントを参照して下さい。
#
################################################################

use TDS::Static;
$Skelton::OutputJcode = q(sjis);
$TDS::Static::HtmlSuffix = q(xml);
$TDS::Static::RecentHtml = q(index.xml);

use CGI::Tools;
$CGI::Tools::ContentType = "text/xml";

# コマンドテンプレート

# TDS::Tdf::Command::* を上書き変更している （1.00-beta2 より）
package TDS::Tdf::Command::DIARY;
$Template = qq(<daily><date><year>%year</year><month>%0m</month><day>%0d</day></date>);
$EndTemplate = "</daily><hr/>";
$DateFormat = "%year/%month/%day(%week)";

package TDS::Tdf::Command::TIMEDIV;
$Template = qq(<h3><a href="%href" name="%anchor">%mark</a>%ext_attrs</h3>\n);
$EndTemplate = qq();
$Mark = "◇";

package TDS::Tdf::Command::NEW;
$Template = qq(<topic>\n%cat<title>%ext_attrs</title><number>%new</number><content>\n);
$EndTemplate = "</content>\n</topic>\n";
$Mark = "%%%n";

package TDS::Tdf::Command::CAT;
$Template = "<category>%ext_attrs";
$EndTemplate = "</category>\n";

package TDS::Tdf::Command::SUB;
$Template = qq(<H4 CLASS="tds-subtitle"><A HREF="%href" NAME="%anchor">%mark</A>%cat %ext_attrs</H4>\n);
$EndTemplate = "";
$Mark = "_";

################################################################
package TDS::Tdf::Command::CODE;
$Template = "<code>";
$EndTemplate = "</code>";

package TDS::Tdf::Command::UL;
$Template = qq(<list count="no">);
$EndTemplate = qq(</list>);

package TDS::Tdf::Command::OL;
$Template = qq(<list count="yes">);
$EndTemplate = qq(</list>);

package TDS::Tdf::Command::LI;
$Template = qq(<item>);
$EndTemplate = qq(</item>);


package TDS::Tdf::Command::ASC;
$Template = qq(<strong level="high">);
$EndTemplate = "</strong>";

package TDS::Tdf::Command::STRONG;
$Template = qq(<strong level="middle">);
$EndTemplate = "</strong>";

package TDS::Tdf::Command::EM;
$Template = qq(<strong level="low">);
$EndTemplate = "</strong>";

package TDS::Tdf::Command::STRIKE;
$Template = q(<decoration type="linethrough">);
$EndTemplate = q(</decoration>);

package TDS::Tdf::Command::UNDERLINE;
$Template = q(<decoration type="underline">);
$EndTemplate = q(</decoration>);

package TDS::Tdf::Command::BIG;
$Template = q(<decoration type="big">);
$EndTemplate = q(</decoration>);

package TDS::Tdf::Command::SMALL;
$Template = q(<decoration type="small">);
$EndTemplate = q(</decoration>);

package TDS::Tdf::Command::IMG;
$Template = q(<image><uri>%src</uri><imagetitle>%ext_attrs</imagetitle><size><width>%width</width><height>%height</height></size><align>%align</align></image>
	      );

# FN_Formatter : 脚注表示部
package TDS::Tdf::Command::FN_Formatter;
#$Template = qq(<HR STYLE="width: 40%; text-align: left;"><DIV>\n);
#$Template = qq(<DIV>-------<BR>);    # <hr> を使いたく無い場合こっち
#$EndTemplate = qq(<BR></DIV>\n);
$Template = undef;
$EndTemplate = undef;

package TDS::Tdf::Command::FN_Content;
$Template = $EndTemplate = undef;

package TDS::Tdf::Command::FN;
$Template = "<footnote><number>%fn</number>";
$EndTemplate = "</footnote>";

sub AsHTML($$)
{
    my ($self, $params) = @_;

    $params->{fn}++;
    $self->SUPER::AsHTML($params);
}

# 表示分説明文
package TDS::Explain;

$Recent = "最新 %num 日分";
$Month = "%year年%month月分";
$Day = "%year年%month月%day日分";
$Part = "%year年%month月%part";
$EachPart = "すべて,上旬,中旬,下旬";
$Search = "検索: %keyword";

package TDS::Tdf::Command::BR;
$Template = "<br/>";

# PIM テンプレート
package TDS::PIM::Schedule;

# 1.00-pl3 から %date, $DateFormat, $ContentSpanTemplate  を新設
#$ContentTemplate = qq(<LI><SPAN STYLE="color: %color;">%year/%month/%day(%week_holy)%delim%content</SPAN></LI>\n);
$ContentTemplate = qq(<LI><SPAN STYLE="color: %color;">%date%delim%content</SPAN></LI>\n);
$ContentSpanTemplate = qq(<LI><SPAN STYLE="color: %color;">%start_date-%end_date%delim%content</SPAN></LI>\n);
$DateFormat = qq(%year/%month/%day(%week_holy));
$DateFormatMonthly = qq(%year/%month);
$NextMonthTemplate = qq(%month);
$BeginTemplate = "<UL>\n";
$EndTemplate = "</UL>\n";

$Delim = ":";

$NormalColor = "black";
$TodayColor  = "red";

package TDS::PIM::Todo;
$ContentTemplate = qq(<LI><SPAN STYLE="color: %color;">%priority%delim%content</SPAN></LI>);
$BeginTemplate = "<UL>\n";
$EndTemplate = "</UL>\n";

$Delim = ":";

$NormalColor   = "black";
$EmphasisColor = "red";
$StrongColor   = "#f90";

# マクロテンプレート
# マクロ名と同一変数名
package TDS::Renderer;

$LAST_MODIFIED = "%a, %d %b %Y %H:%M:%S %Z";
$RECENT = "[最新版]";
$REFRESH = "[更新]";
$NEXT_MONTH = "&gt;&gt;";
$PREV_MONTH = "&lt;&lt;";
$THIS_MONTH = "==";
$SUBMIT_JUMP = "ジャンプ";
$SUMMARY = "[一覧]";
$CATEGORY = 'ALL';
$SEARCH_SUBMIT =  "検索";
$SEARCH_RESULT = "<P>%diary 日 %num 件の日記にマッチしました</P>";
$SEARCH_SELECT_SORT =  "新しい順,古い順";
$SEARCH_SELECT_OBJECT = "指定した月,最近３ヶ月,最近一年,すべて";
$AUTHOR_MANAGEMENT =  "[著者管理]";
$TDF_EDITOR = "[日記編集]";
$URL_LIST = "[URL リスト]";
$DICTIONARY = "[辞書]";
$LOG_ANALYSE_ANCHOR =  "[アクセス解析]";
$COMMENT_SUBMIT = "送る";
$COMMENT_SHOW_ALL_SUBMIT = "過去のを表示";

# 一覧テンプレート
package TDS::Summary;
$YearTemplate = "<H2>%year</H2>\n<UL>\n";
$YearEndTemplate = "</UL>\n";
$MonthTemplate = qq(<LI><A HREF="%href">%month</A>: );
$MonthNolinkTemplate = qq(<LI>%month</A>);
$MonthEndTemplate = "</LI>\n";
$PartTemplate = qq([<A HREF="%href">%part_str</A>]);
$PartTemplateNone = qq((%part));
$PartEndTemplate = undef;
$EachPart = "上旬,中旬,下旬";

$MonthlyHrefTemplateDynamic = "./?%0y%0m";
$MonthlyHrefTemplateStatic  = "d%0y%0m.%suffix";
$PartlyHrefTemplateDynamic = "./?%0y%0m%part";
$PartlyHrefTemplateStatic  = "d%0y%0m%part.%suffix";

$Reverse = 0;           # 1 にすると新しい順に表示

# カウンタテンプレート
package TDS::AccessLog::Counter;
$Template = "%all/%today(%times)";

# 一言
package TDS::Comment;
$DefaultComment = "読んだよ";
$CommentItemTemplate = qq(<tr><th>%name</th><td>%comment</td></tr>\n);
$CommentShowTemplate = qq(<table summary="comment" border=1>%content</table>\n);

# カレンダー
package TDS::Calendar;
$TableBorder = 0;
@WeekString = ('<SPAN STYLE="color: red;">Sun</SPAN>', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', '<SPAN STYLE="color: blue;">Sat</SPAN>');
$NextTemplate = "Next";
$PrevTemplate = "Prev";
$ThisTemplate = "%year/%month";

$HrefTemplateShowed = "#%anchor";
$HrefTemplateUnshowedDynamic = "./?%y%0m%part#%anchor";
$HrefTemplateUnshowedStatic = "d%y%0m%part.%suffix#%anchor";

$UseTable = 'auto';
@NoTableBrowsers = qw(lynx w3);

1;
