about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-19 19:35:51 +0200
committerEmile <hanemile@protonmail.com>2019-10-19 19:35:51 +0200
commit54474f5bf3e0525adbf9694a51bab6e2ba3e6e5b (patch)
treef71cd54f8296899fc409561839b1071034133877
parentb693ec96a24076f1ae550c5a4ed5cc11ffa3405f (diff)
responsive table
-rw-r--r--hosted/view.html59
1 files changed, 31 insertions, 28 deletions
diff --git a/hosted/view.html b/hosted/view.html
index 1f72e9e..28818f9 100644
--- a/hosted/view.html
+++ b/hosted/view.html
@@ -35,34 +35,37 @@
                 </div>
             </div>
         </nav>
-        <main class="container" role="main">
-			<table class="table">
-			  <thead>
-				<tr>
-				  <th scope="col">Name</th>
-				  <th scope="col">Description</th>
-				  <th scope="col">Flag</th>
-				  <th scope="col">Container</th>
-				  <th scope="col">Category</th>
-				  <th scope="col">Points</th>
-				  <th scope="col">Static</th>
-				</tr>
-			  </thead>
-			  <tbody>
-				{{range .Challenge}}
-				<tr>
-				  <th scope="row">{{.Name}}</th>
-				  <td>{{.Description}}</td>
-				  <td>{{.Flag}}</td>
-				  <td>{{.Container}}</td>
-				  <td>{{.Category}}</td>
-				  <td>{{.Points}}</td>
-				  <td>{{.Static}}</td>
-				</tr>
-				{{end}}
-			  </tbody>
-			</table>
-        </main>
+            <div class="table-responsive" style="padding: 20px;">
+                <table class="table table-sm">
+                  <thead>
+                    <tr>
+                      <th scope="col">UUID</th>
+                      <th scope="col">Name</th>
+                      <th scope="col">Description</th>
+                      <th scope="col">Flag</th>
+                      <th scope="col">Container</th>
+                      <th scope="col">Category</th>
+                      <th scope="col">Points</th>
+                      <th scope="col">Static</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    {{range .Challenge}}
+                    <tr>
+                      <td>{{.UUID}}</td>
+                      <td>{{.Name}}</th>
+                      <td>{{.Description}}</td>
+                      <td>{{.Flag}}</td>
+                      <td>{{.Container}}</td>
+                      <td>{{.Category}}</td>
+                      <td>{{.Points}}</td>
+                      <td>{{.Static}}</td>
+                      <td><a href="/edit?uuid={{.UUID}}" class="btn btn-primary" role="button">Edit</a></td>
+                    </tr>
+                    {{end}}
+                  </tbody>
+                </table>
+            </div>
     </body>
 </html>
 {{end}}