]> iEval git - gruntmaster-page.git/commitdiff
Preload logo
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 25 Mar 2015 15:51:02 +0000 (17:51 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 25 Mar 2015 15:51:02 +0000 (17:51 +0200)
lib/Plack/App/Gruntmaster/HTML.pm

index a59533192315644b2568cab013c5fb89c00c1409..b4a080042f20dd55e3215e045e374e8432aa5e95 100644 (file)
@@ -78,9 +78,13 @@ sub _render {
        $tree->as_HTML;
 }
 
+my $logo = read_file 'mclogo.svg';
+$logo =~ y/\n//d;
+$logo =~ s/(\s+)/ /g;
+
 sub process_skel {
        my ($tree, %args) = @_;
-       $tree->fid('logo')->replace_with(literal scalar read_file "mclogo.svg");
+       $tree->fid('logo')->replace_with(literal $logo);
        $tree->content_handler(
                title   =>         $args{title},
                content => literal $args{meat});
This page took 0.019588 seconds and 4 git commands to generate.