28 |
http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet# |
http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet# |
29 |
@@media-type: |
@@media-type: |
30 |
http://suika.fam.cx/~wakaba/-temp/2004/04/24/mt# |
http://suika.fam.cx/~wakaba/-temp/2004/04/24/mt# |
31 |
|
@@edit: |
32 |
|
http://suika.fam.cx/~wakaba/-temp/2004/7/25/sw-edit# |
33 |
|
|
34 |
PluginConst: |
PluginConst: |
35 |
@NS_XHTML1: |
@NS_XHTML1: |
93 |
$opt{wiki}->{db}->delete (static__css => $opt{page}); |
$opt{wiki}->{db}->delete (static__css => $opt{page}); |
94 |
} |
} |
95 |
|
|
96 |
|
@Prop: |
97 |
|
@@edit:new-mode--edit: edit |
98 |
|
@@edit:new-mode--adminedit: adminedit |
99 |
|
|
100 |
ViewDefinition: |
ViewDefinition: |
101 |
@Mode: css |
@Mode: css |
102 |
@Condition: |
@Condition: |
160 |
|
|
161 |
for my $set (@{$list->child_nodes}) { |
for my $set (@{$list->child_nodes}) { |
162 |
if ($set->local_name eq 'StyleSet') { |
if ($set->local_name eq 'StyleSet') { |
163 |
|
my $apply = $set->get_attribute_value ('Apply', |
164 |
|
default => ['alternate'], |
165 |
|
as_array => 1); |
166 |
my $type = { |
my $type = { |
167 |
map {$_ => 1} |
map {$_ => 1} |
168 |
map {ref $_ ? @$_ : [$_]} |
\ @$apply |
|
$set->get_attribute_value ('Apply', default => ['alternate']) |
|
169 |
}; |
}; |
170 |
next if $ua_apply and not $type->{$ua_apply}; |
next if $ua_apply and not $type->{$ua_apply}; |
171 |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
174 |
type => $type); |
type => $type); |
175 |
for my $sheet (@{$set->child_nodes}) { |
for my $sheet (@{$set->child_nodes}) { |
176 |
if ($sheet->local_name eq 'StyleSheet') { |
if ($sheet->local_name eq 'StyleSheet') { |
177 |
|
my $stype = { |
178 |
|
map {$_ => 1} |
179 |
|
\ @{$sheet->get_attribute_value ('Apply', default => $apply, |
180 |
|
as_array => 1)} |
181 |
|
}; |
182 |
|
next if $ua_apply and not $stype->{$ua_apply}; |
183 |
|
next if not $ua_apply and (not $stype->{alternate} and |
184 |
|
not $stype->{preferred} and |
185 |
|
not $stype->{persistent}); |
186 |
my $link = $parent->append_new_node |
my $link = $parent->append_new_node |
187 |
(type => '#element', |
(type => '#element', |
188 |
namespace_uri => $NS_XHTML1, |
namespace_uri => $NS_XHTML1, |
256 |
|
|
257 |
for my $set (@{$list->child_nodes}) { |
for my $set (@{$list->child_nodes}) { |
258 |
if ($set->local_name eq 'StyleSet') { |
if ($set->local_name eq 'StyleSet') { |
259 |
my $type = {map {$_ => 1} |
my $apply = $set->get_attribute_value |
260 |
@{ |
('Apply', default => ['alternate'], |
261 |
$set->get_attribute_value ('Apply', default => ['alternate']) |
as_array => 1); |
262 |
}}; |
my $type = {map {$_ => 1} @$apply}; |
263 |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
264 |
my $title = __FUNCPACK__->_get_styleset_title |
my $title = __FUNCPACK__->_get_styleset_title |
265 |
(StyleSet => $set, o => $o, |
(StyleSet => $set, o => $o, |
266 |
type => $type); |
type => $type); |
267 |
for my $sheet (@{$set->child_nodes}) { |
for my $sheet (@{$set->child_nodes}) { |
268 |
if ($sheet->local_name eq 'StyleSheet') { |
if ($sheet->local_name eq 'StyleSheet') { |
269 |
|
my $stype = { |
270 |
|
map {$_ => 1} |
271 |
|
\ @{$sheet->get_attribute_value ('Apply', default => $apply, |
272 |
|
as_array => 1)} |
273 |
|
}; |
274 |
|
next if (not $stype->{alternate} and |
275 |
|
not $stype->{preferred} and |
276 |
|
not $stype->{persistent}); |
277 |
my $link = $parent->append_new_node |
my $link = $parent->append_new_node |
278 |
(type => '#pi', |
(type => '#pi', |
279 |
local_name => 'xml-stylesheet'); |
local_name => 'xml-stylesheet'); |
294 |
wikiname => $o->{wiki}->name |
wikiname => $o->{wiki}->name |
295 |
($sheet->get_attribute_value |
($sheet->get_attribute_value |
296 |
('WikiPage', default => '')), |
('WikiPage', default => '')), |
297 |
|
lm => time, ## TODO: Should be last-modified |
298 |
mode => 'css'); ## ISSUE: Make this media-type independent! |
mode => 'css'); ## ISSUE: Make this media-type independent! |
299 |
$link->set_attribute (href => $uri); |
$link->set_attribute (href => $uri); |
300 |
$parent->append_text ("\n"); |
$parent->append_text ("\n"); |