Revision 6df470c3
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
238 | 238 |
return $self->html_tag('script', $data, type => 'text/javascript'); |
239 | 239 |
} |
240 | 240 |
|
241 |
sub stylesheet_tag { |
|
242 |
my $self = shift; |
|
243 |
my $code = ''; |
|
244 |
|
|
245 |
foreach my $file (@_) { |
|
246 |
$file .= '.css' unless $file =~ m/\.css$/; |
|
247 |
$file = "css/${file}" unless $file =~ m|/|; |
|
248 |
|
|
249 |
$code .= qq|<link rel="stylesheet" href="${file}" type="text/css" media="screen" />|; |
|
250 |
} |
|
251 |
|
|
252 |
return $code; |
|
253 |
} |
|
254 |
|
|
241 | 255 |
sub date_tag { |
242 | 256 |
my ($self, $name, $value, @slurp) = @_; |
243 | 257 |
my %params = _hashify(@slurp); |
... | ... | |
486 | 500 |
postfixed with '.js' if it isn't already and prefixed with 'js/' if it |
487 | 501 |
doesn't contain a slash. |
488 | 502 |
|
503 |
=item C<stylesheet_tag $file1, $file2, $file3...> |
|
504 |
|
|
505 |
Creates a HTML 'E<lt>link rel="text/stylesheet" href="..."E<gt>' tag |
|
506 |
for each file name parameter passed. Each file name will be postfixed |
|
507 |
with '.css' if it isn't already and prefixed with 'css/' if it doesn't |
|
508 |
contain a slash. |
|
509 |
|
|
489 | 510 |
=item C<date_tag $name, $value, cal_align =E<gt> $align_code, %attributes> |
490 | 511 |
|
491 | 512 |
Creates a date input field, with an attached javascript that will open a |
Auch abrufbar als: Unified diff
Funktion zur Ausgabe von Stylesheet-Links
Conflicts: