Merge branch 'master' into newmc
[gruntmaster-page.git] / lib / Plack / App / Gruntmaster / HTML.pm
index 7df9ef3c5f422fc47b388120bcfdd37b86841f1d..7863f4f425a43cba20579d9e422af4cc7a6d6b3f 100644 (file)
@@ -89,8 +89,13 @@ sub _render {
        $tree->as_HTML(undef, undef, $optional_end_tags);
 }
 
+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(HTML::Element::Library::super_literal $logo);
        $tree->content_handler(
                title   =>         $args{title},
                content => literal $args{meat});
@@ -176,10 +181,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};
This page took 0.009964 seconds and 4 git commands to generate.