| | |
| | private function renderRepoCard($repo) { |
| | - // REUSE: Re-target the single Git instance |
| | $this->git->setRepository($repo['path']); |
| | |
 |
| | echo '<h3>' . htmlspecialchars($repo['name']) . '</h3>'; |
| | |
| | - // Stats and Timestamp on one line |
| | echo '<p class="repo-meta">'; |
| | - echo $stats['branches'] . ' branches, ' . $stats['tags'] . ' tags'; |
| | + |
| | + $branchLabel = $stats['branches'] === 1 ? 'branch' : 'branches'; |
| | + $tagLabel = $stats['tags'] === 1 ? 'tag' : 'tags'; |
| | + |
| | + echo $stats['branches'] . ' ' . $branchLabel . ', ' . $stats['tags'] . ' ' . $tagLabel; |
| | |
| | if ($main) { |
 |
| | echo '</p>'; |
| | |
| | - // Description with visual separation |
| | $descPath = $repo['path'] . '/description'; |
| | if (file_exists($descPath)) { |