]> iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Common.pm
More bug fixes
[gruntmaster-page.git] / lib / Gruntmaster / Page / Common.pm
1 package Gruntmaster::Page::Common;
2
3 use 5.014000;
4 use strict;
5 use warnings;
6 use parent qw/Exporter/;
7 our @EXPORT_OK = qw/header footer/;
8
9 my %header_templates = (
10 en => <<'HTML',
11 <!DOCTYPE html>
12 <title>TITLE_GOES_HERE</title>
13 <link rel="stylesheet" href="/gm.css">
14 <script src="/jquery-2.0.3.min.js"></script>
15 <script src="/view.js"></script>
16 <meta charset="utf-8">
17
18 <span id="admin"></span>
19 <div id="title"><span class="i">i</span><span class="Eval">Eval</span></div>
20 <div id="subtitle">TITLE_GOES_HERE</div>
21
22 <nav><ul><li><a href="/learn.var">Learn</a><li><a href="/pb/">Practice</a><li><a href="/ct/">Compete</a><li><a href="/log/">Job log</a></ul></nav>
23
24 HTML
25 );
26
27 my %footer_templates = (
28 en => <<'HTML',
29
30 <footer>
31 Dilmom: Why don't you call your product the Gruntmaster 6000?
32 Dilbert: What kind of product do you see when you imagine a Gruntmaster 6000?
33 Dilmom: Well, it's a stripped-down version of the Gruntmaster 9000, of course. But it's software-upgradeable.
34 </footer>
35 HTML
36 );
37
38 sub header{
39 my ($language, $title) = @_;
40 $header_templates{$language} =~ s/TITLE_GOES_HERE/$title/ger;
41 }
42
43 sub footer{
44 $footer_templates{$_[0]};
45 }
46
47 1;
This page took 0.049235 seconds and 4 git commands to generate.