$tree->as_HTML;
}
+my $logo = read_file 'mclogo.svg';
+$logo =~ y/\n//d;
+$logo =~ s/(\s+)/ /g;
+
sub process_skel {
my ($tree, %args) = @_;
+ $tree->fid('logo')->replace_with(literal $logo);
$tree->content_handler(
title => $args{title},
content => literal $args{meat});
if ($args{contest_stop}) {
$tree->fid('solution')->detach;
$tree->fid('solution_modal')->detach;
- my $score = $tree->fid('score');
- $score->attr('data-start' => $args{open_time});
- $score->attr('data-stop' => $args{contest_stop});
- $score->attr('data-value' => $args{value});
+ $tree->fid('score')->replace_content($args{value});
$tree->fid('countdown')->attr('data-stop' => $args{contest_stop});
} else {
$tree->fid('job_log')->edit_href(sub{$_ .= "&private=$args{private}"}) if $args{private};
$elem->find('a')->edit_href(sub{s/$/&$str/}) if $str;
}
$tree->fclass('current')->replace_content("Page $args{current_page} of $args{last_page}");
+
+ my @detach;
+ push @detach, $args{args}{$_} ? $tree->fclass($_) : () for qw/problem contest owner/;
+ $_->detach for @detach;
}
sub process_st {