From: Marius Gavrilescu Date: Thu, 6 Aug 2015 09:48:08 +0000 (+0300) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=ae7dfc94a272a943e52957c4bffabecfbceb9b19;hp=-c;p=gruntmaster-page.git Merge branch 'master' into newmc --- ae7dfc94a272a943e52957c4bffabecfbceb9b19 diff --combined js/90-themes.js index 50834da,d65759c..5196574 --- a/js/90-themes.js +++ b/js/90-themes.js @@@ -3,14 -3,10 +3,16 @@@ function set_style(name, trans) document.body.classList.add('transition-color'); setTimeout(() => document.body.classList.remove('transition-color'), 1000); } + if(q('html').className == name) + return; q('html').className = name; localStorage.setItem("theme", name); + $(function() { + if(name == 'slate' || name == 'cyborg') + $('img').each(e => e.setAttribute('src', e.getAttribute('src').replace('logos/light', 'logos/dark'))); + else + $('img').each(e => e.setAttribute('src', e.getAttribute('src').replace('logos/dark', 'logos/light'))); + }); } $(function() { diff --combined lib/Plack/App/Gruntmaster/HTML.pm index b23ddb9,f08b66b..6799fb1 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@@ -91,8 -91,6 +91,6 @@@ sub _render $tree->defmap(smap => \%args); my $process = __PACKAGE__->can("process_$tmpl"); $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('smap')}); $tree->as_HTML(undef, undef, $optional_end_tags); } @@@ -184,7 -182,10 +182,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}; @@@ -282,10 -283,6 +280,6 @@@ 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 { diff --combined tmpl/pb_entry.en index ce2c100,8f42d1b..7f04faf --- a/tmpl/pb_entry.en +++ b/tmpl/pb_entry.en @@@ -6,21 -6,21 +6,21 @@@
Owner
owner
Level
Easy
Time limit (seconds)
1
-
Score
50
+
Score
50
Contest ends in
01:30
Job log
Solution -

Submit solution

+

Submit solution

The contest has finished.
To submit solutions to this problem, please visit the problem outside the contest.
-
+
@@@ -28,18 -28,18 +28,18 @@@
diff --combined tmpl/skel.en index f7ca622,3533f56..3622006 --- a/tmpl/skel.en +++ b/tmpl/skel.en @@@ -1,48 -1,33 +1,47 @@@ + TITLE + + +

TITLE

-
This is a static version of MindCoding, useful when the regular version is overloaded.
Content goes here
+ + +
+
+