Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Uses table for tags

AuthorDave Jarvis <email>
Date2026-02-10 19:21:38 GMT-0800
Commit8e01bd8cb840e0f7a9960ee7b0e38e7b69618a08
Parent1b6090a
TagRenderer.php
$commitUrl = '?action=commits&hash=' . $targetSha . $repoParam;
- echo '<div class="tag-row">';
+ echo '<tr>';
- echo '<div class="tag-name">';
+ echo '<td class="tag-name">';
echo '<a href="' . $filesUrl . '">';
echo '<i class="fas fa-tag"></i> ' . htmlspecialchars($name);
echo '</a>';
- echo '</div>';
-
- echo '<div class="tag-message">';
+ echo '</td>';
+ echo '<td class="tag-message">';
if ($message !== '') {
$firstLine = strtok($message, "\n");
echo htmlspecialchars($firstLine);
} else {
echo '<span style="color: #484f58; font-style: italic;">No description</span>';
}
- echo '</div>';
+ echo '</td>';
- echo '<div class="tag-meta">';
+ echo '<td class="tag-meta">';
if ($author !== '') {
echo htmlspecialchars($author) . ' • ';
}
$this->renderTime($timestamp);
echo ' • <a href="' . $commitUrl . '" class="commit-hash">' . substr($sha, 0, 7) . '</a>';
- echo '</div>';
+ echo '</td>';
- echo '</div>';
+ echo '</tr>';
}
TagsPage.php
echo '<h2>Tags</h2>';
- echo '<div class="tag-list">';
+
+ echo '<table class="tag-table">';
+
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>Name</th>';
+ echo '<th>Message</th>';
+ echo '<th style="text-align: right;">Created</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tbody>';
$tags = [];
if (empty($tags)) {
- echo '<div class="empty-state"><p>No tags found.</p></div>';
+ echo '<tr><td colspan="3"><div class="empty-state"><p>No tags found.</p></div></td></tr>';
} else {
foreach ($tags as $tag) {
$tag->render($renderer);
}
}
- echo '</div>';
+ echo '</tbody>';
+ echo '</table>';
}, $this->currentRepo);
}
repo.css
.status-mod { color: #a371f7; }
-.tag-list {
+.tag-table {
+ width: 100%;
+ border-collapse: collapse;
margin-top: 10px;
}
-.tag-row {
- display: flex;
- padding: 10px 0;
- border-bottom: 1px solid #30363d;
- gap: 15px;
- align-items: baseline;
+.tag-table th {
+ text-align: left;
+ padding: 10px 16px;
+ border-bottom: 2px solid #30363d;
+ color: #8b949e;
+ font-size: 0.875rem;
+ font-weight: 600;
+}
+
+.tag-table td {
+ padding: 12px 16px;
+ border-bottom: 1px solid #21262d;
+ vertical-align: middle;
color: #c9d1d9;
}
-.tag-row:last-child {
+.tag-table tr:last-child td {
border-bottom: none;
}
-.tag-row:hover {
- background: rgba(110, 118, 129, 0.05);
+.tag-table tr:hover td {
+ background: #161b22;
}
-.tag-row .tag-name {
+.tag-table .tag-name {
+ width: 15%;
font-family: 'SFMono-Regular', Consolas, monospace;
font-size: 0.9rem;
- color: #58a6ff;
- width: 150px;
- flex-shrink: 0;
white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
}
-.tag-row .tag-name a {
+.tag-table .tag-name a {
+ color: #58a6ff;
text-decoration: none;
- color: inherit;
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
}
-.tag-row .tag-name a:hover {
+.tag-table .tag-name a:hover {
text-decoration: underline;
}
-.tag-row .tag-message {
- flex: 1;
- font-weight: 500;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+.tag-table .tag-message {
+ width: 50%;
color: #c9d1d9;
+ font-weight: 500;
}
-.tag-row .tag-meta {
- font-size: 0.85em;
+.tag-table .tag-meta {
+ width: 35%;
+ text-align: right;
color: #8b949e;
+ font-size: 0.85em;
white-space: nowrap;
- text-align: right;
}
-.tag-row .tag-meta a {
- color: inherit;
+/* Ensures the commit hash is blue */
+.tag-table .commit-hash {
+ font-family: 'SFMono-Regular', Consolas, monospace;
+ color: #58a6ff;
text-decoration: none;
+ margin-left: 5px;
}
-.tag-row .tag-meta a:hover {
+.tag-table .commit-hash:hover {
text-decoration: underline;
- color: #58a6ff;
}
+
Delta64 lines added, 44 lines removed, 20-line increase