fix blank first entry (repo), increase items per page, and add line breaks in html

This commit is contained in:
David Sterry 2010-12-20 16:22:57 -08:00
parent 4087807afe
commit 724f65276b

View file

@ -207,7 +207,7 @@ class FDroid
$out="<p>Applications matching ".$filter; $out="<p>Applications matching ".$filter;
$out.="</p>"; $out.="</p>";
$perpage=10; $perpage=30;
$skipped=0; $skipped=0;
$got=0; $got=0;
$total=0; $total=0;
@ -215,6 +215,7 @@ class FDroid
$xml = simplexml_load_file($this->site_path."/repo/index.xml"); $xml = simplexml_load_file($this->site_path."/repo/index.xml");
foreach($xml->children() as $app) { foreach($xml->children() as $app) {
if($app->getName() == 'repo') continue;
$attrs=$app->attributes(); $attrs=$app->attributes();
$id=$attrs['id']; $id=$attrs['id'];
foreach($app->children() as $el) { foreach($app->children() as $el) {
@ -239,22 +240,22 @@ class FDroid
$skipped++; $skipped++;
} else if($got<$perpage) { } else if($got<$perpage) {
$out.="<hr>"; $out.="<hr>\n";
$out.='<div id="appheader">'; $out.='<div id="appheader">';
$out.='<div style="float:left;padding-right:10px;"><img src="http://f-droid.org/repo/icons/'.$icon.'" width=48></div>'; $out.='<div style="float:left;padding-right:10px;"><img src="http://f-droid.org/repo/icons/'.$icon.'" style="width:48px;"></div>';
$out.='<div style="float:right;">'; $out.='<div style="float:right;">';
$out.='<p><a href="'; $out.='<p><a href="';
$out.=$this->makelink("fdid=".$id); $out.=$this->makelink("fdid=".$id);
$out.='">Details...</a>'; $out.='">Details...</a>';
$out.="</p>"; $out.="</p>";
$out.="</div>"; $out.="</div>\n";
$out.='<p><span style="font-size:20px">'.$name."</span>"; $out.='<p><span style="font-size:20px">'.$name."</span>";
$out.="<br>".$summary."</p>"; $out.="<br>".$summary."</p>\n";
$out.="</div>"; $out.="</div>\n";
$got++; $got++;
} }