4 |
|
|
5 |
our %Info; |
our %Info; |
6 |
$Info{q#StyleSheet#}->{Name} = q#StyleSheet#; |
$Info{q#StyleSheet#}->{Name} = q#StyleSheet#; |
7 |
$Info{q#StyleSheet#}->{q#Version#} = q#2005.0315.0849#; |
$Info{q#StyleSheet#}->{q#Version#} = q#2005.0121.1414#; |
8 |
$Info{q#StyleSheet#}->{q#InterfaceVersion#} = q#2.9.1#; |
$Info{q#StyleSheet#}->{q#InterfaceVersion#} = q#2.9.1#; |
9 |
$Info{q#StyleSheet#}->{q#mkpluginVersion#} = q#2.1.21#; |
$Info{q#StyleSheet#}->{q#mkpluginVersion#} = q#2.1.21#; |
10 |
$Info{q#StyleSheet#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj#; |
$Info{q#StyleSheet#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY#; |
11 |
$Info{q#StyleSheet#}->{q#Date.RCS#} = q#$Date$#; |
$Info{q#StyleSheet#}->{q#Date.RCS#} = q#$Date$#; |
12 |
$Info{q#StyleSheet#}->{RequiredPlugin} = [q#Error#, q#HTML#]; |
$Info{q#StyleSheet#}->{RequiredPlugin} = [q#Error#, q#HTML#]; |
13 |
$Info{q#StyleSheet#}->{RequiredModule} = [q#URI#]; |
$Info{q#StyleSheet#}->{RequiredModule} = [q#URI#]; |
14 |
$Info{q#StyleSheet#}->{Description} = [[q#Stylesheet support#, q#en#, q##]]; |
$Info{q#StyleSheet#}->{Description} = [[q#Stylesheet support#, q#en#, q##]]; |
15 |
$Info{q#StyleSheet#}->{License} = [[q#%%Perl%%#, q##, q##]]; |
$Info{q#StyleSheet#}->{License} = [[q#%%Perl%%#, q##, q##]]; |
16 |
$Info{q#StyleSheet#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [[q#w@suika.fam.cx#]], [q##]]]; |
$Info{q#StyleSheet#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [[q#w@suika.fam.cx#]], [q##]]]; |
17 |
package SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj; |
package SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY; |
18 |
|
|
19 |
|
|
20 |
#line 1 "(WikiPlugin module source stylesheet.wp2, block Plugin/Use)" |
#line 1 "(WikiPlugin module source stylesheet.wp2, block Plugin/Use)" |
93 |
|
|
94 |
push @SuikaWiki::View::Implementation::CommonViewDefs, { |
push @SuikaWiki::View::Implementation::CommonViewDefs, { |
95 |
condition => {q#mode#, q#css#, q#http_method#, [q#GET#, q#HEAD#, q#POST#]}, |
condition => {q#mode#, q#css#, q#http_method#, [q#GET#, q#HEAD#, q#POST#]}, |
96 |
object_class => q#SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj::css105021508491663oY#, |
object_class => q#SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY::css1050021141420Vkfx#, |
97 |
}; |
}; |
98 |
package SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj::css105021508491663oY; |
package SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY::css1050021141420Vkfx; |
99 |
|
|
100 |
|
|
101 |
our @ISA = q#SuikaWiki::View::template#; |
our @ISA = q#SuikaWiki::View::template#; |
143 |
$self->main_post ($opt, $opt2); |
$self->main_post ($opt, $opt2); |
144 |
} |
} |
145 |
|
|
146 |
package SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj; |
package SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY; |
147 |
|
|
148 |
{my $def = {q#Parameter#, {}, q#Description#, [[q#Stylesheet list as HTML (link element)#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
{my $def = {q#Parameter#, {}, q#Description#, [[q#Stylesheet list as HTML (link element)#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
149 |
|
|
150 |
#line 1 "(WikiPlugin module source stylesheet.wp2, block FormattingRule[name()='[q#view#, q#view-resource#]/styles_wiki_html']/Formatting)" |
#line 1 "(WikiPlugin module source stylesheet.wp2, block FormattingRule[name()='[q#view#, q#view-resource#]/styles_wiki_html']/Formatting)" |
151 |
my $list = SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj->_get_stylelist_definition_page |
my $list = SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY->_get_stylelist_definition_page |
152 |
(page => $o->{wiki}->name |
(page => $o->{wiki}->name |
153 |
($p->{page} || |
($p->{page} || |
154 |
$o->{wiki}->{config}->{page} |
$o->{wiki}->{config}->{page} |
169 |
: 1; |
: 1; |
170 |
} |
} |
171 |
my $mkuri = $o->{wiki}->{config}->{q#http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet\#wikiname-to-uri#} || |
my $mkuri = $o->{wiki}->{config}->{q#http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet\#wikiname-to-uri#} || |
172 |
\&SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj::generate_uri; |
\&SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY::generate_uri; |
173 |
for my $set (@{$list->child_nodes}) { |
for my $set (@{$list->child_nodes}) { |
174 |
if ($set->local_name eq 'StyleSet') { |
if ($set->local_name eq 'StyleSet') { |
175 |
my $apply = $set->get_attribute_value ('Apply', |
my $apply = $set->get_attribute_value ('Apply', |
181 |
}; |
}; |
182 |
next if $ua_apply and not $type->{$ua_apply}; |
next if $ua_apply and not $type->{$ua_apply}; |
183 |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
184 |
my $title = SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj->_get_styleset_title |
my $title = SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY->_get_styleset_title |
185 |
(StyleSet => $set, o => $o, |
(StyleSet => $set, o => $o, |
186 |
type => $type); |
type => $type); |
187 |
for my $sheet (@{$set->child_nodes}) { |
for my $sheet (@{$set->child_nodes}) { |
234 |
if ($p->{downgrade_html}) { |
if ($p->{downgrade_html}) { |
235 |
return if $o->{wiki}->{var}->{client}->{downgrade}->{html_no_pi}; |
return if $o->{wiki}->{var}->{client}->{downgrade}->{html_no_pi}; |
236 |
} |
} |
237 |
my $list = SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj->_get_stylelist_definition_page |
my $list = SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY->_get_stylelist_definition_page |
238 |
(page => $o->{wiki}->name |
(page => $o->{wiki}->name |
239 |
($p->{page} || |
($p->{page} || |
240 |
$o->{wiki}->{config}->{page} |
$o->{wiki}->{config}->{page} |
244 |
return unless $list; |
return unless $list; |
245 |
my $parent = $p->{-parent}; |
my $parent = $p->{-parent}; |
246 |
my $mkuri = $o->{wiki}->{config}->{q#http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet\#wikiname-to-uri#} || |
my $mkuri = $o->{wiki}->{config}->{q#http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet\#wikiname-to-uri#} || |
247 |
\&SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj::generate_uri; |
\&SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY::generate_uri; |
248 |
for my $set (@{$list->child_nodes}) { |
for my $set (@{$list->child_nodes}) { |
249 |
if ($set->local_name eq 'StyleSet') { |
if ($set->local_name eq 'StyleSet') { |
250 |
my $apply = $set->get_attribute_value |
my $apply = $set->get_attribute_value |
252 |
as_array => 1); |
as_array => 1); |
253 |
my $type = {map {$_ => 1} @$apply}; |
my $type = {map {$_ => 1} @$apply}; |
254 |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
my $rel = $type->{alternate} ? 'alternate stylesheet' : 'stylesheet'; |
255 |
my $title = SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj->_get_styleset_title |
my $title = SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY->_get_styleset_title |
256 |
(StyleSet => $set, o => $o, |
(StyleSet => $set, o => $o, |
257 |
type => $type); |
type => $type); |
258 |
for my $sheet (@{$set->child_nodes}) { |
for my $sheet (@{$set->child_nodes}) { |
314 |
|
|
315 |
push @SuikaWiki::View::Implementation::CommonViewDefs, { |
push @SuikaWiki::View::Implementation::CommonViewDefs, { |
316 |
condition => {q#mode#, q#ss__no_static#, q#http_method#, [q#GET#, q#HEAD#, q#POST#]}, |
condition => {q#mode#, q#ss__no_static#, q#http_method#, [q#GET#, q#HEAD#, q#POST#]}, |
317 |
object_class => q#SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj::ss__no_static1050215084916GAk9#, |
object_class => q#SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY::ss__no_static1050021141420hrFA#, |
318 |
}; |
}; |
319 |
package SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj::ss__no_static1050215084916GAk9; |
package SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY::ss__no_static1050021141420hrFA; |
320 |
|
|
321 |
|
|
322 |
our @ISA = q#SuikaWiki::View::template#; |
our @ISA = q#SuikaWiki::View::template#; |
361 |
|
|
362 |
#line 1 "(WikiPlugin module StyleSheet, chunk 13)" |
#line 1 "(WikiPlugin module StyleSheet, chunk 13)" |
363 |
|
|
364 |
package SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj; |
package SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY; |
365 |
|
|
366 |
{my $def = {q#Parameter#, {}, q#Description#, [[q#Select user preferred style#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
{my $def = {q#Parameter#, {}, q#Description#, [[q#Select user preferred style#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
367 |
|
|
368 |
#line 1 "(WikiPlugin module source stylesheet.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/select_user_preferred_style']/Formatting)" |
#line 1 "(WikiPlugin module source stylesheet.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/select_user_preferred_style']/Formatting)" |
369 |
$p->{q#page#} = do { my $r = $f->parse_attr ($p=>q#page#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
$p->{q#page#} = do { my $r = $f->parse_attr ($p=>q#page#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
370 |
my $list = SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj->_get_stylelist_definition_page |
my $list = SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY->_get_stylelist_definition_page |
371 |
(page => $o->{wiki}->name |
(page => $o->{wiki}->name |
372 |
($p->{page} || |
($p->{page} || |
373 |
$o->{wiki}->{config}->{page} |
$o->{wiki}->{config}->{page} |
408 |
$set->get_attribute_value ('Apply', default => ['alternate']) |
$set->get_attribute_value ('Apply', default => ['alternate']) |
409 |
}}; |
}}; |
410 |
next unless $type->{preferred} or $type->{alternate}; |
next unless $type->{preferred} or $type->{alternate}; |
411 |
my $title = SuikaWiki::Plugin::plugin::StyleSheet1050215084916LDrj->_get_styleset_title |
my $title = SuikaWiki::Plugin::plugin::StyleSheet1050021141420JcOY->_get_styleset_title |
412 |
(StyleSet => $set, o => $o, |
(StyleSet => $set, o => $o, |
413 |
type => $type); |
type => $type); |
414 |
my $link = $parent->append_new_node |
my $link = $parent->append_new_node |
445 |
$_->set_attribute (class => 'reset'); |
$_->set_attribute (class => 'reset'); |
446 |
$_->option (use_EmptyElemTag => 1); |
$_->option (use_EmptyElemTag => 1); |
447 |
} |
} |
|
return if $o->{wiki}->{var}->{client}->{downgrade}->{js_no_regex}; |
|
448 |
$p->{q#expires#} = do { my $r = $f->parse_attr ($p=>q#expires#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
$p->{q#expires#} = do { my $r = $f->parse_attr ($p=>q#expires#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
449 |
my $cookie_path = $o->{wiki}->uri_reference->path; |
my $cookie_path = $o->{wiki}->uri_reference->path; |
450 |
for ($div->append_new_node (type => '#element', |
for ($div->append_new_node (type => '#element', |
505 |
{my $def = {q#Parameter#, {}, q#Description#, [[q#Applying user preferred style#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
{my $def = {q#Parameter#, {}, q#Description#, [[q#Applying user preferred style#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
506 |
|
|
507 |
#line 1 "(WikiPlugin module source stylesheet.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/apply_user_preferred_style']/Formatting)" |
#line 1 "(WikiPlugin module source stylesheet.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/apply_user_preferred_style']/Formatting)" |
|
return if $o->{wiki}->{var}->{client}->{downgrade}->{js_no_regex}; |
|
508 |
for ($p->{-parent}->append_new_node |
for ($p->{-parent}->append_new_node |
509 |
(type => '#element', |
(type => '#element', |
510 |
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
692 |
$_->set_attribute (class => 'reset'); |
$_->set_attribute (class => 'reset'); |
693 |
$_->option (use_EmptyElemTag => 1); |
$_->option (use_EmptyElemTag => 1); |
694 |
} |
} |
|
return if $o->{wiki}->{var}->{client}->{downgrade}->{js_no_regex}; |
|
695 |
$p->{q#expires#} = do { my $r = $f->parse_attr ($p=>q#expires#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
$p->{q#expires#} = do { my $r = $f->parse_attr ($p=>q#expires#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
696 |
my $cookie_path = $o->{wiki}->uri_reference->path; |
my $cookie_path = $o->{wiki}->uri_reference->path; |
697 |
for ($div->append_new_node (type => '#element', |
for ($div->append_new_node (type => '#element', |