Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First shot at individual module pages

  • Loading branch information...
commit dc1a1d7bbe71ce80adef114adff37672cd7e4232 1 parent e5839af
@tadzik tadzik authored
Showing with 59 additions and 0 deletions.
  1. +22 −0 web/build-module-page.pl
  2. +37 −0 web/module.mojo
View
22 web/build-module-page.pl
@@ -0,0 +1,22 @@
+use Template::Mojo;
+
+my $readme = q{
+It's the port of Perl 5's Acme::Meow [1]
+
+It's not the verbatim port, some things have changed,
+and there are more to come. Stay tuned for more fun :)
+
+[1] http://search.cpan.org/~foolish/Acme-Meow-0.01/lib/Acme/Meow.pm
+};
+
+my %data =
+ name => 'Acme::Meow',
+ url => 'https://github.com/tadzik/perl6-Acme-Meow',
+ readme => $readme,
+ logo => 'https://github.com/GlitchMr/perl6-Acme-Addslashes/raw/master/logotype/logo_32x32.png',
+ description => 'The kitty you always wanted, now in Perl 6',
+;
+
+my $tmpl = slurp "module.mojo";
+$tmpl = Template::Mojo.new($tmpl);
+say $tmpl.render($(%data))
View
37 web/module.mojo
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+% my $m = @_[0];
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="icon" href="/favicon.ico" type="favicon.ico" />
+ <title>Perl 6 Modules Directory</title>
+ <link rel="stylesheet" href="style.css" type="text/css" />
+
+ </head>
+ <body>
+ <div id="header">
+ <a href="https://github.com/perl6/mu/blob/master/misc/camelia.txt"><img alt="camelia perl bug logo" src="http://perl6.org/camelia-logo.png" /></a>
+ <h1><a href="/">Perl 6 Modules</a></h1>
+ <h2>
+ <img class="project-logo" alt="<%= $m<name> %> logo"
+ src="<%= $m<logo> %>">
+ <%= $m<name> %>
+ </h2>
+ <h3> <%= $m<description> %> </h2>
+ </div>
+ <div id="content">
+ <p>
+ <%= $m<name> %> on Github:
+ <a href="<%= $m<url> %>"> <%= $m<url> %> </a>
+ <p>
+ <h3> Readme </h3>
+ <p><pre>
+<%= $m<readme> %>
+ </pre></p>
+
+ </div>
+ </body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.