From: Marius Gavrilescu Date: Tue, 4 Aug 2015 20:43:46 +0000 (+0300) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=5776eb1224280d006eda895436aeff574311366c;hp=-c;p=gruntmaster-page.git Merge branch 'master' into newmc --- 5776eb1224280d006eda895436aeff574311366c diff --combined css/custom.css index 5f6a8e4,f844fa9..f12650d --- a/css/custom.css +++ b/css/custom.css @@@ -1,3 -1,8 +1,8 @@@ + body { + padding-left: 15px; + padding-right: 15px; + } + h1#title{ font-weight: bold; text-align: center; @@@ -48,7 -53,7 +53,7 @@@ nav li display: none !important; } -td.user, td.owner { +td.user, td.owner, .break-all { word-break: break-all; } @@@ -63,3 -68,19 +68,19 @@@ .transition-color, .transition-color * { transition: color 0.5s ease-in, background-color 0.5s ease-in; } + + @media (min-width:768px) { + #content { + float: left; + width: 75%; + } + + #sidebar { + float: right; + width: 23% + } + + footer { + clear: both; + } + } diff --combined css/mindcoding.css index 6965804,0000000..70cd5f5 mode 100644,000000..100644 --- a/css/mindcoding.css +++ b/css/mindcoding.css @@@ -1,11 -1,0 +1,23 @@@ +footer { + padding: 1.5em 0; + width: auto; + matgin: auto; + white-space: inherit; + color: inherit; +} + +#sponsors a.logo { + margin-bottom: 1em; +} ++ ++@media (min-width:768px) { ++ .left-half { ++ float: left; ++ width: 49%; ++ } ++ ++ .right-half { ++ float: right; ++ width: 49%; ++ } ++} diff --combined lib/Plack/App/Gruntmaster/HTML.pm index d4afb4c,59e0293..b23ddb9 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@@ -64,7 -64,15 +64,15 @@@ sub render my ($tmpl, $lang, %args) = @_; $lang //= 'en'; my $meat = _render($tmpl, $lang, %args); - _render('skel', $lang, %args, meat => $meat) + my $html = _render('skel', $lang, %args, meat => $meat); + if ($tmpl eq 'pb_entry') { # Move sidebar to correct position + my $builder = HTML::TreeBuilder->new; + $builder->ignore_unknown(0); + my $tree = $builder->parse_content($html); + $tree->fid('content')->postinsert($tree->fid('sidebar')); + $html = $tree->as_HTML(undef, undef, $optional_end_tags) + } + $html } sub render_article { @@@ -176,7 -184,10 +184,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}; diff --combined tmpl/pb_entry.en index 2dd499b,ec801c6..ce2c100 --- a/tmpl/pb_entry.en +++ b/tmpl/pb_entry.en @@@ -1,15 -1,12 +1,12 @@@ -
-
-
- -
- + diff --combined tmpl/skel.en index 49d2bb8,d2d070f..f7ca622 --- a/tmpl/skel.en +++ b/tmpl/skel.en @@@ -1,51 -1,34 +1,48 @@@ + TITLE + -
+ +

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
+ + +
+
+