Subject: | enable deeplinking and generate indicator link list in /kwalitee.html |
See attached patch. I didn't test the template stuff.
Subject: | Module-CPANTS-Site.diff |
diff -ru Module-CPANTS-Site-0.64~/root/static/cpants.css Module-CPANTS-Site-0.64/root/static/cpants.css
--- Module-CPANTS-Site-0.64~/root/static/cpants.css 2007-04-23 14:50:21.000000000 +0200
+++ Module-CPANTS-Site-0.64/root/static/cpants.css 2007-07-12 04:59:47.000000000 +0200
@@ -98,3 +98,13 @@
.ok { background-color:#0f0 }
.not_ok { background-color:#f00 }
.opt_not_ok { background-color:#f80 }
+
+ul#indicators li {
+ display: inline;
+}
+ul#indicators li:before {
+ content: ' | ';
+}
+ul#indicators li:first-child:before {
+ content: '';
+}
diff -ru Module-CPANTS-Site-0.64~/templates/static/kwalitee Module-CPANTS-Site-0.64/templates/static/kwalitee
--- Module-CPANTS-Site-0.64~/templates/static/kwalitee 2007-04-23 14:50:21.000000000 +0200
+++ Module-CPANTS-Site-0.64/templates/static/kwalitee 2007-07-12 05:01:26.000000000 +0200
@@ -1,6 +1,6 @@
<h1>Kwalitee</h1>
-<h3>What's "Kwalitee", anyway?</h3>
+<h3 id="what">What's "Kwalitee", anyway?</h3>
<p>I'll hand the micropohone over to Schwern (or rather: I'll copy'n'paste from his <a href="http://schwern.org/~schwern/talks/CPANTS/">old CPANTS slides</a>):
@@ -18,15 +18,21 @@
<p>Schwern decided to cleverly avoid this problem by not testing for quality but for Kwalitee: It looks like quality, it sounds like quality, but it's not quite quality.</p>
-<h3>Current Kwalitee Indicators</h3>
+<h3 id="current">Current Kwalitee Indicators</h3>
<p><b>Available Kwalitee: [% mck.available_kwalitee %] (including optional metrics: [% mck.total_kwalitee %])</b></p>
<p>If you want to discuss Kwalitee indicators or suggest new ones, please use the <a href="http://lists.cpan.org/showlist.cgi?name=perl-qa">perl-qa</a> list.</p>
+<ul id="indicators">
+[% FOREACH k IN mck.get_indicators %]
+<li><a href="#[% k.name %]">[% k.name %]</a></li>
+[% END%]
+</ul>
+
<dl>
[% FOREACH k IN mck.get_indicators %]
-<dt>[% k.name %] [% k.fake %] [% IF k.is_extra %](optional)[% END%]
+<dt id="[% k.name %]">[% k.name %] [% k.fake %] [% IF k.is_extra %](optional)[% END%]
</dt>
<dd>
[% IF k.is_extra %]This metric is optional.<br>[% END%]