From: Marius Gavrilescu Date: Sat, 28 Mar 2015 15:27:11 +0000 (+0200) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=b857936377aa55e3a41576931528eb8455191c02;hp=-c;p=plack-app-gruntmaster.git Merge branch 'master' into newmc --- b857936377aa55e3a41576931528eb8455191c02 diff --combined lib/Plack/App/Gruntmaster/HTML.pm index b4a0800,2734f77..7b343b2 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@@ -78,13 -78,8 +78,13 @@@ sub _render $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}); @@@ -170,7 -165,10 +170,7 @@@ sub process_pb_entry 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}; @@@ -268,6 -266,10 +268,10 @@@ sub process_log $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 {