projects sorted
[www.jankratochvil.net.git] / project / Index.html.pl
index 571acf8..dbbf486 100755 (executable)
@@ -36,6 +36,7 @@ My::Web->init(
                "section"=>"Projects",
                "rel_up"=>top_dir(),
                "rel_start"=>top_dir(),
+               "footer_ids"=>0,
                );
 My::Web->heading();
 
@@ -44,22 +45,6 @@ print My::Project->platforms(undef());
 
 my %item=( My::Project::item_hash_read() );
 
-# $col{"name"}{"show"}=1
-# $col{"name"}{"format"}=sub { "<".$_[0].">"; }
-# $col{"name"}{""}="Project name";
-# @col_order
-
-my @row_order=qw(-priority);
-my @col_order=qw(name summary license maintenance language);
-my %col;
-
-sub format_url ($) { return (!$_[0] ? "" : '<a href="'.$_[0].'">X</a>'); }
-
-$col{"name"}{"format"}=sub {
-               $_[0]=~s#<a\s[^>]*>([^<]*)</a>#$1#g;
-               return "<a href=\"".$_[1]."/\">".$_[0]."</a>";
-               };
-
 my @platforms=@My::Project::platforms;
 while (@platforms) {
        my $platform_sym =shift @platforms;
@@ -73,28 +58,19 @@ while (@platforms) {
                        (lc($item{$a}{"name"}) cmp lc($item{$b}{"name"}));
                        } map({ $item{$_}{"platform"} ne $platform_sym ? () : ($_); } keys(%item));
        for my $project (@projects) {
+               my $t="";
+
+               $t.="<h3>".a_href("/project/$project/",$item{$project}{"name"}.": ".$item{$project}{"summary"})."</h3>\n";
+               $t.="<blockquote>\n";
+                       $t.=$item{$project}{"description"};
+               $t.="</blockquote>\n";
+
                if ($item{$project}{"icon"}) {
-                       print <<"HERE";
-<table border="0" width="100%">
-       <col width="1*" />
-       <col width="0*" />
-       <tr>
-               <td align="left">
-HERE
+                       print rightimg $t,
+                                       "/project/$project/".$item{$project}{"icon"},$item{$project}{"name"}." Icon","a_href"=>"/project/$project/";
                        }
-               print "<h3>".a_href("/project/$project/",$item{$project}{"name"}.": ".$item{$project}{"summary"})."</h3>\n";
-               print "<blockquote>\n";
-                       print $item{$project}{"description"};
-               print "</blockquote>\n";
-               if ($item{$project}{"icon"}) {
-                       print <<"HERE";
-               </td>
-               <td align="right">@{[
-                               a_href("/project/$project/",img("/project/$project/".$item{$project}{"icon"},$item{$project}{"name"}." Icon"))
-                               ]}</td>
-       </tr>
-</table>
-HERE
+               else {
+                       print $t;
                        }
                }
        }