Pi66

git.pi66.xyz
A web interface for the pi66.xyz Git server
git clone https://git.pi66.xyz/git.pi66.xyz

← back to log

fix: align Log table columns and prevent mobile overflow with overflow-x-auto

author: pi66
date: 2026-07-23 09:30
hash: 5b479ebb0bc6b625caeb08b9f461acae0b97d930

Diffstat:

M

src/templates/Log.html
25 +++++++++++++++++++-----------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/src/templates/Log.html b/src/templates/Log.html
index 326b29c..8fd6dfb 100644
--- a/src/templates/Log.html
+++ b/src/templates/Log.html
@@ -1,35 +1,42 @@
 {% set page_content %}
 {% include "partials/repo-nav.html" %}
+<div class="overflow-x-auto">
 <table class="!w-full">
    <thead>
-       <tr><th>Date</th><th>Message</th><th>Author</th><th>Files</th><th>+</th><th>-</th></tr>
+       <tr>
+           <th class="w-px whitespace-nowrap">Date</th>
+           <th class="w-full">Message</th>
+           <th class="w-px whitespace-nowrap">Author</th>
+           <th class="w-px whitespace-nowrap">Files</th>
+           <th class="w-px whitespace-nowrap">+</th>
+           <th class="w-px whitespace-nowrap">-</th>
+       </tr>
    </thead>
    <tbody>
    {% for commit in commits  %}
        <tr>
-           <td class="!text-gray-500 !w-40">{{commit.date}}</td>
-           <td>
+           <td class="!text-gray-500 w-px whitespace-nowrap">{{commit.date}}</td>
+           <td class="w-full">
                <a class="!text-green-400 hover:underline" href="/{{repo_name|lower}}/commits/{{commit.commit_hash}}.html">
                    {{commit.message}}
                </a>
            </td>
-           <td class="!text-gray-400">
+           <td class="!text-gray-400 w-px whitespace-nowrap">
                {{commit.author}}
            </td>
-           <td class="!text-gray-500 text-right">
+           <td class="!text-gray-500 text-right w-px whitespace-nowrap">
                {{len(commit.files)}}
            </td>
-           <td class="!text-green-500 text-right">
+           <td class="!text-green-500 text-right w-px whitespace-nowrap">
                +{{total_added(commit.files)}}
            </td>
-           <td class="!text-red-500 text-right">
+           <td class="!text-red-500 text-right w-px whitespace-nowrap">
                -{{total_removed(commit.files)}}
            </td>
        </tr>
-
    {% endfor %}
    </tbody>
 </table>
-
+</div>
 {% endset %}
 {% include "base.html" %}