about summary refs log tree commit diff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/index.tt8
-rw-r--r--views/layouts/main.tt32
-rw-r--r--views/project/index.tt24
3 files changed, 64 insertions, 0 deletions
diff --git a/views/index.tt b/views/index.tt
new file mode 100644
index 0000000..7b44ac5
--- /dev/null
+++ b/views/index.tt
@@ -0,0 +1,8 @@
+<h2>Projects</h2>
+
+<ul>
+  : for $projects -> $project {
+  <li><a href="<: $uri_base :>project/<: $project :>"><: $project :></a></li>
+  : }
+</ul>
+
diff --git a/views/layouts/main.tt b/views/layouts/main.tt
new file mode 100644
index 0000000..bad65ab
--- /dev/null
+++ b/views/layouts/main.tt
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en-US">
+  <head>
+    <title>jitterbug</title>
+    <link rel="stylesheet" href="/css/style.css" />
+    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
+    <meta charset="UTF-8" />
+    <script type="text/javascript">
+      $(document).ready(function() {
+        $('.commits a').click(function() {
+          var url = '/api/build/'
+            + $(this).parent("li").parent("ul").attr('id')
+            + '/'
+            + $(this).parent("li").attr('id')
+            + '/'
+            + $(this).text().toLowerCase();
+          $.getJSON(url, null, function(data) {
+            $("#display_test_result").html("<pre>" + data.content + "<pre>")
+          });
+      })})
+    </script>
+  </head>
+  <body>
+    <h1>jitterbug</h1>
+    <div id="content">
+      <: $content :>
+    </div>
+    <footer>
+      Powered by <a href="http://perldancer.org/">Dancer</a> 1.1810
+    </footer>
+  </body>
+</html>
diff --git a/views/project/index.tt b/views/project/index.tt
new file mode 100644
index 0000000..813907b
--- /dev/null
+++ b/views/project/index.tt
@@ -0,0 +1,24 @@
+<h2><: $project :></h2>
+
+<ul>
+  <li>url: <: $url :></li>
+  <li>description: <: $description :></li>
+  <li><a href="<: $base_uri :>/project/<: $project :>/feed">feed</a></li>
+</ul>
+
+<h3>Builds</h3>
+
+<ul class="commits" id="<: $project :>">
+  :for $builds -> $build {
+  <li id="<: $build.commit :>">
+    Commit <: $build.commit :> (<: $build.date.ymd :>)<br />
+    author: <: $build.author.name :> - <a href="<: $build.compare :>">compare</a><br />
+    :for $build.version.keys() -> $version {
+        <a href="#"><: $version :></a>=<: $build.version[$version] :>
+    :}
+  </li>
+  :}
+</ul>
+
+<div id="display_test_result">
+</div>