]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 21 Mar 2015 17:16:35 +0000 (19:16 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 21 Mar 2015 17:16:35 +0000 (19:16 +0200)
Conflicts:
tmpl/skel.en

1  2 
lib/Plack/App/Gruntmaster/HTML.pm
tmpl/pb_entry.en
tmpl/skel.en

index 382641ed0227c69124352ecfcc577de2f504a9e9,4a22292702ed0d1446dfa619aba4ae4cfba57697..18bf1cca40428572fc0ff7fc9451e2af4f68098c
@@@ -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 {
        $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 208c3cea01091c2c0b0b05de7db58ff96d0fe77d,6398e631b7617fd5b1f121f71ab446979e76e9fd..1d595b2290b69162f527f46db57434e31a7d35ad
  <a href="/log/?problem=problem_id" id="job_log">Job log</a><br>
  <a href="/sol/problem_id" id="solution" data-toggle="modal" data-target="#solution_modal">Solution</a>
  
- <h1>Submit solution</h1>
+ <h1 static="no">Submit solution</h1>
  
  <div id="nosubmit">
  The contest has finished.<br>
  To submit solutions to this problem, please visit the problem <a href="/pb/id">outside&nbsp;the&nbsp;contest</a>.
  </div>
  
- <div id="submit">
+ <div id="submit" static="no">
  <form id="submitform" action="/action/submit" method="POST" enctype="multipart/form-data" role="form">
  <input type="hidden" name="problem" value="problem_id">
  <input type="hidden" name="contest" value="contest_id">
  <div class="form-group"><label for="prog">File:</label><input id="prog" name="prog" type="file"></div>
  <div class="form-group"><label for="source_code">Source code:</label> <textarea class="form-control" id="source_code" name="source_code"></textarea></div>
  <div class="form-group"><label for="prog_format">File format:</label><select id="prog_format" name="prog_format" class="form-control" required>
 -<option value="C">C (gcc)</option>
 -<option value="CPP" selected>C++ (g++)</option>
 -<option value="GCCGO">Go (gccgo)</option>
 -<option value="GOLANG">Go (gc)</option>
 -<option value="HASKELL">Haskell (ghc)</option>
 -<option value="JAVA">Java (javac)</option>
 -<option value="PASCAL">Pascal (fpc)</option>
 -<option value="PERL">Perl (perl)</option>
 -<option value="PYTHON">Python (python)</option>
 -<option value="RUBY">Ruby (ruby)</option>
 -<option value="SBCL">Common Lisp (sbcl)</option>
 +<option value="C">C11 (gcc 4.7.2)</option>
 +<option value="CPP" selected>C++11 (g++ 4.7.2)</option>
 +<option value="GCCGO">Go (gccgo 4.7.2)</option>
 +<option value="GOLANG">Go (gc 1.0.2)</option>
 +<option value="HASKELL">Haskell (ghc 7.4.1)</option>
 +<option value="JAVA">Java (openjdk 7u75)</option>
 +<option value="PASCAL">Pascal (fpc 2.6.0)</option>
 +<option value="PERL">Perl (perl 5.14.2)</option>
 +<option value="PYTHON">Python (python 2.7.3)</option>
 +<option value="RUBY">Ruby (ruby 2.2.1)</option>
 +<option value="SBCL">Common Lisp (sbcl 1.0.57)</option>
  </select></div>
  
  <input type="submit" value="Submit job" class="btn btn-primary">
diff --combined tmpl/skel.en
index 3b363b906826dc1612f991450f3fdbe87859eb58,6ae836aea13a969de2a515d7c646938cb78b8867..364234e7a4c6abf0c6823b4771d2e8011f95bf21
@@@ -3,23 -3,21 +3,23 @@@
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
 -<link href="/static/css/cyborg.css" title="cyborg" rel="stylesheet">
 -<link href="/static/css/slate.css" title="slate" rel="alternate stylesheet">
 -<link href="/static/css/readable.css" title="readable" rel="alternate stylesheet">
 -<script src="/static/js.js" type="text/javascript" async defer></script>
 +<link href="https://static.mindcoding.ro/static/favicon.png" rel="shortcut icon">
 +<link href="https://static.mindcoding.ro/static/css/cyborg.css" title="cyborg" rel="alternate  stylesheet">
 +<link href="https://static.mindcoding.ro/static/css/slate.css" title="slate" rel="stylesheet">
 +<link href="https://static.mindcoding.ro/static/css/readable.css" title="readable" rel="alternate stylesheet">
 +<script src="https://static.mindcoding.ro/static/js.js" type="text/javascript" async defer></script>
  
  <body>
  <nav role="navigation">
  <div class="container-fluid">
  <ul class="nav nav-pills nav-justified">
 -<li id="nav-home"><a href="/">Gruntmaster 6000</a>
 +<li id="nav-home"><a href="/">Home</a>
  <li id="nav-pb"><a href="/pb/">Problems</a>
  <li id="nav-ct"><a href="/ct/">Contests</a>
  <li id="nav-log"><a href="/log/">Job log</a>
  <li id="nav-us"><a href="/us/">Users</a>
- <li id="nav-account"><a href="/account">Account</a>
+ <li id="nav-account" static="no"><a href="/account">Account</a>
 +<li id="nav-about"><a href="/about">About / Help</a>
  <li id="nav-contribute"><a href="/contribute">Contribute!</a>
  
  </ul>
  </nav>
  
  <div class="container-fluid">
 +<div id="logo"></div>
  
  <h1 id="title">TITLE</h1>
 -<div id="static" class="alert alert-info" static="yes">This is a static version of Gruntmaster 6000.</div>
++<div id="static" class="alert alert-info" static="yes">This is a static version of MindCoding, useful when the <a href="https://mindcoding.ro/">regular version</a> is overloaded.</div>
  <div id="result"></div>
  
  <div id="content">Content goes here</div>
  
- <div id="login" class="reqjs"><a href="#">Log in</a></div>
+ <div id="login" class="reqjs" static="no"><a href="#">Log in</a></div>
 +<div id="webchat"><a href="http://webchat.oftc.net/?channels=%23mindcoding" target="_blank">Webchat</a></div>
  
  <div id="theme-selector" class="reqjs">
  Themes:
@@@ -60,34 -58,8 +62,34 @@@ Tracking <a href="#" id="tracker_userli
  </div>
  </div>
  
 +<div id="sponsors">
 +<h3>Official sponsors</h3>
 +<a class="logo logo-emag" href="http://www.fundatiaemag.ro/"></a>
 +<a class="logo logo-easyhost" href="http://ro.easyhost.com/"></a>
 +<a class="logo logo-takeofflabs" href="http://www.takeofflabs.com/"></a>
 +<a class="logo logo-bigstep" href="http://www.bigstep.com/"></a>
 +<a class="logo logo-yardi" href="https://www.facebook.com/YardiRomania"></a>
 +<a class="logo logo-bosch" href="http://www.bosch.com.ro/"></a>
 +<a class="logo logo-endava" href="http://www.endava.com/"></a>
 +</div>
 +
  <footer>
 -Dilmom: Why don't you call your product the Gruntmaster 6000?<br>
 -Dilbert: What kind of product do you see when you imagine a Gruntmaster 6000?<br>
 -Dilmom: Well, it's a stripped-down version of the Gruntmaster 9000, of course. But it's software-upgradeable.
 +<div class="row">
 +<div class="col-md-6 column text-center">
 +<a class="logo logo-hermes" href="http://www.societatea-hermes.ro"></a>
 +</div>
 +
 +<div class="col-md-6 column text-center">
 +<a class="logo logo-facebook" href="http://www.facebook.com/mindcodingcluj"></a>
 +</div>
 +</div>
 +
 +<h3>Partners</h3>
 +<a href="https://www.facebook.com/spyhce?fref=ts" class="logo logo-spyhce"></a>
 +<a href="https://www.facebook.com/telenav?fref=ts" class="logo logo-telenav"></a>
 +<h3>Media Partners</h3>
 +<a href="http://cs.ubbcluj.ro" class="logo logo-csf"></a>
 +<a href="http://www.uniunea.ro" class="logo logo-usr"></a>
 +<a href="http://www.coscj.ro" class="logo logo-cos"></a>
 +<a href="http://www.cluj2015.ro/romana" class="logo logo-eyc"></a>
  </footer>
This page took 0.039446 seconds and 4 git commands to generate.