]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Mar 2015 15:27:11 +0000 (17:27 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Mar 2015 15:27:11 +0000 (17:27 +0200)
1  2 
lib/Plack/App/Gruntmaster/HTML.pm

index b4a080042f20dd55e3215e045e374e8432aa5e95,2734f77cf3655233527f934aac24b5ac065a641d..7b343b22bb45c15ba067e792f0c611b7e9c8adf5
@@@ -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 {
This page took 0.029544 seconds and 4 git commands to generate.