Diff between e74238d283dc34152da2a150dd3121e0967b4d7e and a823f8deb42790a4457b008864447960ea543c32

Changed Files

File Additions Deletions Status
static/styles.css +9 -0 modified
templates/commits.html +0 -1 modified
templates/refs.html +18 -7 modified
templates/tree.html +24 -11 modified

Full Patch

diff --git a/static/styles.css b/static/styles.css
index e484fc1..c5ef3a2 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -6,6 +6,15 @@ table {
     width: 100%;
 }
 
+th, td {
+    border: 1px solid black;
+    padding: 8px;
+    text-align: left;
+}
+
+a {
+    color: blue;
+}
 .base-nav {
     display:flex; 
     align-items:center; 
diff --git a/templates/commits.html b/templates/commits.html
index 7c35fe8..8be5101 100644
--- a/templates/commits.html
+++ b/templates/commits.html
@@ -2,7 +2,6 @@
 
 {% block content %}
     <h1>Commits for {{ repo_name }}</h1>
-    <p><a href="{{ url_for('repo_tree_path', repo_name=repo_name, path='') }}?ref={{ ref }}">View Tree</a></p>
     <table border="1">
         <thead>
             <tr>
diff --git a/templates/refs.html b/templates/refs.html
index 941a1a1..292d86e 100644
--- a/templates/refs.html
+++ b/templates/refs.html
@@ -2,11 +2,22 @@
 
 {% block content %}
     <h1>Refs for {{ repo_name }}</h1>
-    <ul>
-        {% for ref in refs %}
-            <li>
-            {{ ref.name }} - {{ ref.target }} - <a href="{{ url_for('repo_tree_path', repo_name=repo_name, path='') }}?ref={{ ref.shorthand }}">View Tree</a>
-            </li>
-        {% endfor %}
-    </ul>
+    <table>
+        <thead>
+            <tr>
+                <th>Name</th>
+                <th>Target</th>
+                <th>Actions</th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for ref in refs %}
+                <tr>
+                    <td>{{ ref.name }}</td>
+                    <td>{{ ref.target }}</td>
+                    <td><a href="{{ url_for('repo_tree_path', repo_name=repo_name, path='') }}?ref={{ ref.shorthand }}">View Tree</a></td>
+                </tr>
+            {% endfor %}
+        </tbody>
+    </table>
 {% endblock %}
\ No newline at end of file
diff --git a/templates/tree.html b/templates/tree.html
index a9e94db..7890891 100644
--- a/templates/tree.html
+++ b/templates/tree.html
@@ -2,15 +2,28 @@
 
 {% block content %}
     <h1>Tree for {{ repo_name }} at {{ ref }}{% if path %} / {{ path }}{% endif %}</h1>
-    <ul>
-        {% for item in tree_items %}
-            <li>
-                {% if item.type == 'tree' %}
-                    <a href="{{ url_for('repo_tree_path', repo_name=repo_name, path=item.path) }}?ref={{ ref }}">{{ item.name }} ({{ item.type }})/</a>
-                {% else %}
-                    <a href="{{ url_for('repo_blob_path', repo_name=repo_name, path=item.path) }}?ref={{ ref }}">{{ item.name }} ({{ item.type }}) {{ item.size }} bytes</a>
-                {% endif %}
-            </li>
-        {% endfor %}
-    </ul>
+    <table>
+        <thead>
+            <tr>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Size</th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for item in tree_items %}
+                <tr>
+                    <td>
+                        {% if item.type == 'tree' %}
+                            <a href="{{ url_for('repo_tree_path', repo_name=repo_name, path=item.path) }}?ref={{ ref }}">{{ item.name }}/</a>
+                        {% else %}
+                            <a href="{{ url_for('repo_blob_path', repo_name=repo_name, path=item.path) }}?ref={{ ref }}">{{ item.name }}</a>
+                        {% endif %}
+                    </td>
+                    <td>{{ item.type }}</td>
+                    <td>{% if item.type == 'blob' %}{{ item.size }} bytes{% endif %}</td>
+                </tr>
+            {% endfor %}
+        </tbody>
+    </table>
 {% endblock %}
\ No newline at end of file