about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-20 01:31:57 +0200
committerEmile <hanemile@protonmail.com>2019-10-20 01:31:57 +0200
commit83cc748c8471cc88740e73e235282aa7734cffb2 (patch)
tree85a077bc89f995f2ce6fc03da89eefc3600f3ffd
parentb0725fa015ceeb002b8ec99655b8666db9f5b8ad (diff)
design fixes
-rw-r--r--hosted/create.html2
-rw-r--r--hosted/edit.html43
-rw-r--r--hosted/edit_uuid.html2
-rw-r--r--hosted/index.html2
-rw-r--r--hosted/view.html5
5 files changed, 38 insertions, 16 deletions
diff --git a/hosted/create.html b/hosted/create.html
index a660db6..8e27986 100644
--- a/hosted/create.html
+++ b/hosted/create.html
@@ -23,7 +23,7 @@
                         <a class="nav-link" href="/view">View</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link" href="/edit">Edit</a>
+                        <a class="nav-link" href="/editSelect">Edit</a>
                     </li>
                 </ul>
                 <div class="btn-toolbar" role="toolbar">
diff --git a/hosted/edit.html b/hosted/edit.html
index e95872e..4e49b20 100644
--- a/hosted/edit.html
+++ b/hosted/edit.html
@@ -1,3 +1,4 @@
+{{define "edit"}}
 <!DOCTYPE html>
 <html>
     <head>
@@ -23,7 +24,7 @@
                         <a class="nav-link" href="/view">View</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link" href="/edit">Edit</a>
+                        <a class="nav-link" href="/editSelect">Edit</a>
                     </li>
                 </ul>
                 <div class="btn-toolbar" role="toolbar">
@@ -34,15 +35,37 @@
                 </div>
             </div>
         </nav>
-        <main class="container" role="main">
-            <div class="jumbotron">
-                <h1 class="display-4">Hello.</h1>
-                <h3>Welcome to the circus-manager</h3>
-                <p>You can create, view and edit challenges here</p>
-                <hr>
-                <a class="btn btn-primary btn-lg" href="/create"
-                    role="button">Create a new challenge!</a>
+            <div class="table-responsive" style="padding: 20px;">
+                <table class="table table-sm table-hover">
+                  <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>
-        </main>
     </body>
 </html>
+{{end}}
diff --git a/hosted/edit_uuid.html b/hosted/edit_uuid.html
index f1f399f..5461930 100644
--- a/hosted/edit_uuid.html
+++ b/hosted/edit_uuid.html
@@ -24,7 +24,7 @@
                         <a class="nav-link" href="/view">View</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link" href="/edit">Edit</a>
+                        <a class="nav-link" href="/editSelect">Edit</a>
                     </li>
                 </ul>
                 <div class="btn-toolbar" role="toolbar">
diff --git a/hosted/index.html b/hosted/index.html
index e95872e..ba72ed1 100644
--- a/hosted/index.html
+++ b/hosted/index.html
@@ -23,7 +23,7 @@
                         <a class="nav-link" href="/view">View</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link" href="/edit">Edit</a>
+                        <a class="nav-link" href="/editSelect">Edit</a>
                     </li>
                 </ul>
                 <div class="btn-toolbar" role="toolbar">
diff --git a/hosted/view.html b/hosted/view.html
index 28818f9..70c047b 100644
--- a/hosted/view.html
+++ b/hosted/view.html
@@ -24,7 +24,7 @@
                         <a class="nav-link" href="/view">View</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link" href="/edit">Edit</a>
+                        <a class="nav-link" href="/editSelect">Edit</a>
                     </li>
                 </ul>
                 <div class="btn-toolbar" role="toolbar">
@@ -36,7 +36,7 @@
             </div>
         </nav>
             <div class="table-responsive" style="padding: 20px;">
-                <table class="table table-sm">
+                <table class="table table-sm table-hover">
                   <thead>
                     <tr>
                       <th scope="col">UUID</th>
@@ -60,7 +60,6 @@
                       <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>