my %page_cache;
for (<tmpl/*>) {
my ($tmpl, $lang) = m,tmpl/(\w+)\.(\w+),;
my %page_cache;
for (<tmpl/*>) {
my ($tmpl, $lang) = m,tmpl/(\w+)\.(\w+),;
$builder->ignore_unknown(0);
$page_cache{$tmpl, $lang} = $builder->parse_file($_);
}
$builder->ignore_unknown(0);
$page_cache{$tmpl, $lang} = $builder->parse_file($_);
}
my ($art, $lang, %args) = @_;
$lang //= 'en';
my $title = read_file "a/$art.$lang.title";
my ($art, $lang, %args) = @_;
$lang //= 'en';
my $title = read_file "a/$art.$lang.title";
my $meat = read_file "a/$art.$lang";
_render('skel', $lang, title => $title , meat => $meat, %args)
}
my $meat = read_file "a/$art.$lang";
_render('skel', $lang, title => $title , meat => $meat, %args)
}
$process->($tree, %args) if $process;
$_->detach for $tree->look_down(static => $args{static} ? 'no' : 'yes');
$_->attr('static', undef) for $tree->look_down(sub {$_[0]->attr('static')});
$process->($tree, %args) if $process;
$_->detach for $tree->look_down(static => $args{static} ? 'no' : 'yes');
$_->attr('static', undef) for $tree->look_down(sub {$_[0]->attr('static')});
- $_->attr('smap', undef) for $tree->look_down(sub {$_[0]->attr('defmap')});
- $tree->as_HTML;
+ $_->attr('smap', undef) for $tree->look_down(sub {$_[0]->attr('smap')});
+ $tree->as_HTML(undef, undef, $optional_end_tags);
$tree->fid('job_log')->edit_href(sub{$_ .= "&private=$args{private}"}) if $args{private};
$tree->fid('solution')->detach unless $args{solution};
$_->detach for $tree->fclass('rc'); # requires contest
$tree->fid('job_log')->edit_href(sub{$_ .= "&private=$args{private}"}) if $args{private};
$tree->fid('solution')->detach unless $args{solution};
$_->detach for $tree->fclass('rc'); # requires contest
$elem->find('a')->edit_href(sub{s/$/&$str/}) if $str;
}
$tree->fclass('current')->replace_content("Page $args{current_page} of $args{last_page}");
$elem->find('a')->edit_href(sub{s/$/&$str/}) if $str;
}
$tree->fclass('current')->replace_content("Page $args{current_page} of $args{last_page}");