31 |
$s =~ s/</</g; |
$s =~ s/</</g; |
32 |
$s =~ s/>/>/g; |
$s =~ s/>/>/g; |
33 |
$s =~ s/"/"/g; |
$s =~ s/"/"/g; |
34 |
|
$s =~ s/'/'/g; |
35 |
$s; |
$s; |
36 |
} |
} |
37 |
|
|
89 |
<!DOCTYPE html SYSTEM> |
<!DOCTYPE html SYSTEM> |
90 |
<html lang="ja"> |
<html lang="ja"> |
91 |
<head> |
<head> |
92 |
<title>$dirpath の${title}</title> |
<title>@{[$Opt{cframe} ? '' : qq<$dirpath の>]}${title}</title> |
93 |
${linkelement} |
${linkelement} |
94 |
</head> |
</head> |
|
<body> |
|
|
<h1>${title}</h1> |
|
95 |
EOH |
EOH |
96 |
|
|
97 |
|
my $LISTq = q<>; |
98 |
|
$LISTq .= q<;detail> if $Opt{detail}; |
99 |
|
$LISTq = substr $LISTq, 1; |
100 |
|
$LISTq = 'LIST' . ($LISTq ? '?' . $LISTq : ''); |
101 |
|
|
102 |
|
if ($Opt{cframe}) { |
103 |
|
my $LISTqt = ($LISTq eq 'LIST' ? $LISTq . '?' : $LISTq . ';') . 'target=view'; |
104 |
|
print qq{<frameset cols="25%,*"> |
105 |
|
<frame src="$LISTqt" name="list"> |
106 |
|
<frame src="./" name="view"> |
107 |
|
<noframes>}; |
108 |
|
} |
109 |
|
|
110 |
|
my $viewtarget = ''; |
111 |
|
my $listtarget = ''; |
112 |
|
my $parenttarget = ''; |
113 |
|
if ($Opt{target} =~ /^([a-z]+)$/) { |
114 |
|
$viewtarget = qq{ target="$1"}; |
115 |
|
$listtarget = q{ target="_self"}; |
116 |
|
$LISTq .= $LISTq eq 'LIST' ? qq{?target=$1} : qq{;target=$1}; |
117 |
|
$parenttarget = q{ target="_parent"}; |
118 |
|
} |
119 |
|
|
120 |
if ($Opt{detail}) { |
if ($Opt{detail}) { |
121 |
print q{<div class="pictures detail">}; |
print qq{<body@{[$Opt{target}?' class="has-target"':'']}> |
122 |
|
<h1>${title}</h1> |
123 |
|
<div class="pictures detail">}; |
124 |
|
|
125 |
for my $file_name (@files) { |
for my $file_name (@files) { |
126 |
my $efile = escape $file_name; |
my $efile = escape $file_name; |
129 |
my @cls = split /\./, lc $file_name; |
my @cls = split /\./, lc $file_name; |
130 |
shift @cls; |
shift @cls; |
131 |
print q{<div class="image-with-desc">}; |
print q{<div class="image-with-desc">}; |
132 |
print qq{<a href="$uri">}; |
print qq{<a href="$uri"$viewtarget>}; |
133 |
print qq{<img src="$uri" alt="" class="@{[join ' ', @cls, 's']}"></a>}; |
print qq{<img src="$uri" alt="" class="@{[join ' ', @cls, 's']}"></a>}; |
134 |
print qq{<dl><dt>URI</dt><dd>}; |
print qq{<dl><dt>URI</dt><dd>}; |
135 |
print qq{<code class="uri"><<a href="$uri">$uri</a>></code></dd>}; |
print qq{<code class="uri"><<a href="$uri"$viewtarget>$uri</a>></code></dd>}; |
136 |
print qq{<dt>ファイル名</dt><dd>}; |
print qq{<dt>ファイル名</dt><dd>}; |
137 |
print qq{<code class="file"><a href="$efile">$efile</a></code></dd>}; |
print qq{<code class="file"><a href="$efile"$viewtarget>$efile</a></code></dd>}; |
138 |
print qq{<dt>日付</dt><dd>}; |
print qq{<dt>日付</dt><dd>}; |
139 |
print rfc3339date ([stat $dir.'/'.$file_name]->[9]); |
print rfc3339date ([stat $dir.'/'.$file_name]->[9]); |
140 |
print qq{</dd>}; |
print qq{</dd>}; |
148 |
my $uri = $efile; |
my $uri = $efile; |
149 |
$uri =~ s/\..+//g; |
$uri =~ s/\..+//g; |
150 |
print q{<div class="image-with-desc">}; |
print q{<div class="image-with-desc">}; |
151 |
print qq{<a href="$uri"><img src="/~wakaba/archive/2005/movie-1" alt=""></a>}; |
print qq{<a href="$uri"$viewtarget><img src="/~wakaba/archive/2005/movie-1" alt=""></a>}; |
152 |
print qq{<dl><dt>URI</dt><dd>}; |
print qq{<dl><dt>URI</dt><dd>}; |
153 |
print qq{<code class="uri"><<a href="$uri">$uri</a>></code></dd>}; |
print qq{<code class="uri"><<a href="$uri"$viewtarget>$uri</a>></code></dd>}; |
154 |
print qq{<dt>ファイル名</dt><dd>}; |
print qq{<dt>ファイル名</dt><dd>}; |
155 |
print qq{<code class="file"><a href="$efile">$efile</a></code></dd>}; |
print qq{<code class="file"><a href="$efile"$viewtarget>$efile</a></code></dd>}; |
156 |
print qq{<dt>日付</dt><dd>}; |
print qq{<dt>日付</dt><dd>}; |
157 |
print rfc3339date ([stat $dir.'/'.$file_name]->[9]); |
print rfc3339date ([stat $dir.'/'.$file_name]->[9]); |
158 |
print qq{</dd>}; |
print qq{</dd>}; |
172 |
} else { |
} else { |
173 |
print qq{<img src="/icons/folder" alt="" class="mini-icon">}; |
print qq{<img src="/icons/folder" alt="" class="mini-icon">}; |
174 |
} |
} |
175 |
print qq{<code class="file"><a href="$edir/LIST?detail">$edir/</a></code>}; |
print qq{<code class="file"><a href="$edir/$LISTq"$listtarget>$edir/</a></code>}; |
176 |
print q{</div>}; |
print q{</div>}; |
177 |
} |
} |
178 |
|
|
189 |
if (has_file $_->[0]) { |
if (has_file $_->[0]) { |
190 |
print q{<div class="file file-with-desc">}; |
print q{<div class="file file-with-desc">}; |
191 |
print q{<img src="/icons/layout" alt="" class="mini-icon">}; |
print q{<img src="/icons/layout" alt="" class="mini-icon">}; |
192 |
print qq{<a href="$_->[0]" rel="$_->[2]">$_->[1]</a>}; |
print qq{<a href="$_->[0]" rel="$_->[2]"$viewtarget>$_->[1]</a>}; |
193 |
print q{</div>}; |
print q{</div>}; |
194 |
} |
} |
195 |
} |
} |
196 |
|
|
197 |
print q{<div class="dir-up dir-with-desc">}; |
print q{<div class="dir-up dir-with-desc">}; |
198 |
print q{<img src="/icons/forward" alt="" class="mini-icon">}; |
print q{<img src="/icons/forward" alt="" class="mini-icon">}; |
199 |
print q{<a href="../LIST?detail" rel="up">上の階層</a>}; |
print qq{<a href="../$LISTq" rel="up"$listtarget>上の階層</a>}; |
200 |
print q{</div>}; |
print q{</div>}; |
201 |
|
|
202 |
print q{</div>}; |
print q{</div>}; |
|
} else { |
|
203 |
|
|
204 |
print q{<div class="pictures">}; |
} else { ## Normal Listing Mode |
205 |
|
print qq{<body@{[$Opt{target}?' class="has-target"':'']}> |
206 |
|
<h1>${title}</h1> |
207 |
|
<div class="pictures">}; |
208 |
my $imgsattr = ' class="s"'; |
my $imgsattr = ' class="s"'; |
209 |
|
|
210 |
for my $file_name (@files) { |
for my $file_name (@files) { |
211 |
my $uri = escape $file_name; |
my $uri = escape $file_name; |
212 |
$uri =~ s/\..+$//g; |
$uri =~ s/\..+$//g; |
213 |
print '<a href="'.$uri.'">'; |
print '<a href="'.$uri.'"'.$viewtarget.'>'; |
214 |
print '<img src="'.$uri.'" alt="'.$uri.'"'.$imgsattr.' />'; |
print '<img src="'.$uri.'" alt="'.$uri.'"'.$imgsattr.' />'; |
215 |
print "</a>\n"; |
print "</a>\n"; |
216 |
} |
} |
221 |
for my $dir_name (@dirs) { |
for my $dir_name (@dirs) { |
222 |
my $edir = escape $dir_name; |
my $edir = escape $dir_name; |
223 |
print q{<li class="dir">}; |
print q{<li class="dir">}; |
224 |
print qq{<code class="file"><a href="$edir/LIST">$edir/</a></code>}; |
print qq{<code class="file"><a href="$edir/$LISTq"$listtarget>$edir/</a></code>}; |
225 |
print q{</li>}; |
print q{</li>}; |
226 |
} |
} |
227 |
print q{<li class="dir-up"><a href="../LIST" rel="up">上の階層</a></li></ul>}; |
print qq{<li class="dir-up"><a href="../$LISTq" rel="up"$listtarget>上の階層</a></li></ul>}; |
228 |
} |
} |
229 |
|
|
230 |
my $cvslink = ''; |
my $cvslink = ''; |
241 |
$cvslink = qq{ <a href="/gate/cvs/$reppath/@{[ |
$cvslink = qq{ <a href="/gate/cvs/$reppath/@{[ |
242 |
{q[/home/cvs] => '', |
{q[/home/cvs] => '', |
243 |
q[/home/wakaba/pub/cvs] => '?cvsroot=Wakaba'}->{$rpath} |
q[/home/wakaba/pub/cvs] => '?cvsroot=Wakaba'}->{$rpath} |
244 |
]}" rel="history">この階層の履歴</a>}; |
]}" rel="history"$parenttarget>この階層の履歴</a>}; |
245 |
} |
} |
246 |
} |
} |
247 |
} |
} |
252 |
|
|
253 |
<div class="footer"> |
<div class="footer"> |
254 |
<div class="navigation"> |
<div class="navigation"> |
255 |
[<a href="/" rel="home">/</a>] |
[<a href="/" rel="home"$parenttarget>/</a>] |
256 |
[<a href="." rel="contents">この階層</a>$cvslink] |
[<a href="." rel="contents"$parenttarget>この階層</a>$cvslink] |
257 |
[<a href="LIST" rel="alternate">画像一覧</a> |
[画像一覧 (<a href="LIST" rel="alternate"$parenttarget>簡易</a>, |
258 |
<a href="LIST?detail" rel="alternate">画像一覧 (詳細)</a>] |
<a href="LIST?cframe" rel="alternate"$parenttarget>簡易・横分割</a>, |
259 |
|
<a href="LIST?detail" rel="alternate"$parenttarget>詳細</a>, |
260 |
|
<a href="LIST?detail;cframe" rel="alternate"$parenttarget>詳細・横分割</a>)] |
261 |
</div> |
</div> |
262 |
</div> |
</div> |
263 |
</body> |
</body> |
|
</html> |
|
264 |
EOH |
EOH |
265 |
|
|
266 |
|
print q{</noframes></frameset>} if $Opt{cframe}; |
267 |
|
|
268 |
|
print q{</html>}; |
269 |
|
|
270 |
1; |
1; |
271 |
|
|
272 |
__END__ |
__END__ |
275 |
|
|
276 |
=head1 CHANGES |
=head1 CHANGES |
277 |
|
|
278 |
|
2005-02-26 Wakaba <w@suika.fam.cx> |
279 |
|
|
280 |
|
- Frame mode implemented. |
281 |
|
|
282 |
2005-02-25 Wakaba <w@suika.fam.cx> |
2005-02-25 Wakaba <w@suika.fam.cx> |
283 |
|
|
284 |
- Use external style sheet. |
- Use external style sheet. |
285 |
|
- Detail mode implemented. |
286 |
|
|
287 |
2001-06-25 Wakaba <wakaba@61.201.226.127> |
2001-06-25 Wakaba <wakaba@61.201.226.127> |
288 |
|
|