From: Marius Gavrilescu Date: Sat, 21 Mar 2015 17:16:35 +0000 (+0200) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=5d3c8a5435a93f9f1d1fbb1c78d32790e7f641d4;hp=-c;p=plack-app-gruntmaster.git Merge branch 'master' into newmc Conflicts: tmpl/skel.en --- 5d3c8a5435a93f9f1d1fbb1c78d32790e7f641d4 diff --combined lib/Plack/App/Gruntmaster/HTML.pm index 382641e,4a22292..18bf1cc --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@@ -50,11 -50,11 +50,11 @@@ sub render } sub render_article { - my ($art, $lang) = @_; + my ($art, $lang, %args) = @_; $lang //= 'en'; my $title = read_file "a/$art.$lang.title"; my $meat = read_file "a/$art.$lang"; - _render('skel', $lang, title => $title , meat => $meat) + _render('skel', $lang, title => $title , meat => $meat, %args) } sub _render { @@@ -66,12 -66,14 +66,15 @@@ $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('defmap')}); $tree->as_HTML; } sub process_skel { my ($tree, %args) = @_; + $tree->fid('logo')->replace_with(literal scalar read_file "mclogo.svg"); $tree->content_handler( title => $args{title}, content => literal $args{meat}); diff --combined tmpl/pb_entry.en index 208c3ce,6398e63..1d595b2 --- a/tmpl/pb_entry.en +++ b/tmpl/pb_entry.en @@@ -16,14 -16,14 +16,14 @@@ Job log
Solution -

Submit solution

+

Submit solution

The contest has finished.
To submit solutions to this problem, please visit the problem outside the contest.
-
+
@@@ -31,17 -31,17 +31,17 @@@
diff --combined tmpl/skel.en index 3b363b9,6ae836a..364234e --- a/tmpl/skel.en +++ b/tmpl/skel.en @@@ -3,23 -3,21 +3,23 @@@ - - - - + + + + +
+

TITLE

-
This is a static version of Gruntmaster 6000.
++
This is a static version of MindCoding, useful when the regular version is overloaded.
+
Content goes here
- + +
Themes: @@@ -60,34 -58,8 +62,34 @@@ Tracking +

Official sponsors

+
+ + + + + + +
+