From 1a992d170da97b0baf7e651c53f3d1ddf7c4efdd Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 19 Feb 2013 17:22:28 +0100
Subject: [PATCH] Factor out the tree rendering

---
 src/root/layout.tt              |  1 +
 src/root/static/css/hydra.css   |  6 ----
 src/root/static/css/logfile.css | 49 ---------------------------------
 src/root/static/css/tree.css    | 44 +++++++++++++++++++++++++++++
 4 files changed, 45 insertions(+), 55 deletions(-)
 create mode 100644 src/root/static/css/tree.css

diff --git a/src/root/layout.tt b/src/root/layout.tt
index caf8ef48..86ea80e4 100644
--- a/src/root/layout.tt
+++ b/src/root/layout.tt
@@ -21,6 +21,7 @@
     <script type="text/javascript" src="/static/bootstrap/js/bootstrap-alert.js"></script>
 
     <link rel="stylesheet" href="/static/css/hydra.css" type="text/css" />
+    <link rel="stylesheet" href="/static/css/tree.css" type="text/css" />
     <link rel="stylesheet" href="/static/css/logfile.css" type="text/css" />
 
     <!--
diff --git a/src/root/static/css/hydra.css b/src/root/static/css/hydra.css
index a25f7140..ea0e523d 100644
--- a/src/root/static/css/hydra.css
+++ b/src/root/static/css/hydra.css
@@ -3,12 +3,6 @@ body {
     padding-bottom: 0px; /* 60px to make the container go all the way to the bottom of the topbar */
 }
 
-.logTreeToggle {
-    text-decoration: none;
-    font-family: monospace;
-    font-size: larger;
-}
-
 .logo {
     height: 30px;
 }
diff --git a/src/root/static/css/logfile.css b/src/root/static/css/logfile.css
index da438607..2fadc288 100644
--- a/src/root/static/css/logfile.css
+++ b/src/root/static/css/logfile.css
@@ -3,53 +3,6 @@
     padding: 0.3em;
 }
 
-
-ul.tree, ul.subtree {
-    padding: 0;
-    margin: 0;
-    list-style-type: none;
-}
-
-/* Indent each tree level. */
-li.tree-line {
-    position: relative;
-    padding-left: 2.0em;
-}
-
-li.tree-line:last-child {
-    padding-left: 2.1em; /* for the 0.1em border-left in the last child */
-}
-
-/* Draw vertical tree lines next to all children except the last. */
-li.tree-line {
-    border-left: 0.1em solid #6185a0;
-}
-
-li.tree-line:last-child {
-    border-left: 0;
-}
-
-/* Draw horizontal tree lines to all children. */
-span.tree-conn {
-    position: absolute;
-    height: 0.65em;
-    left: 0em;
-    width: 1.5em;
-    border-bottom: 0.1em solid #6185a0;
-}
-
-/* Draw the vertical tree line to the last child. */
-li.tree-line:last-child > span.tree-conn {
-    border-left: 0.1em solid #6185a0;
-}
-
-.tree-toggle {
-    text-decoration: none;
-    font-family: monospace;
-    font-size: larger;
-}
-
-
 em.storeref {
     color: #500000;
     position: relative;
@@ -62,7 +15,6 @@ em.storeref:hover {
 
 *.popup {
     display: none;
-/*    background: url('http://losser.st-lab.cs.uu.nl/~mbravenb/menuback.png') repeat; */
     background: #ffffcd;
     border: solid #555555 1px;
     position: absolute;
@@ -78,7 +30,6 @@ em.storeref:hover span.popup {
     width: 40em;
 }
 
-
 span.code {
     white-space: pre-wrap;
     font-family: monospace;
diff --git a/src/root/static/css/tree.css b/src/root/static/css/tree.css
new file mode 100644
index 00000000..2d1c3646
--- /dev/null
+++ b/src/root/static/css/tree.css
@@ -0,0 +1,44 @@
+ul.tree, ul.subtree {
+    padding: 0;
+    margin: 0;
+    list-style-type: none;
+}
+
+/* Indent each tree level. */
+li.tree-line {
+    position: relative;
+    padding-left: 2.0em;
+}
+
+li.tree-line:last-child {
+    padding-left: 2.1em; /* for the 0.1em border-left in the last child */
+}
+
+/* Draw vertical tree lines next to all children except the last. */
+li.tree-line {
+    border-left: 0.1em solid #6185a0;
+}
+
+li.tree-line:last-child {
+    border-left: 0;
+}
+
+/* Draw horizontal tree lines to all children. */
+span.tree-conn {
+    position: absolute;
+    height: 0.65em;
+    left: 0em;
+    width: 1.5em;
+    border-bottom: 0.1em solid #6185a0;
+}
+
+/* Draw the vertical tree line to the last child. */
+li.tree-line:last-child > span.tree-conn {
+    border-left: 0.1em solid #6185a0;
+}
+
+.tree-toggle {
+    text-decoration: none;
+    font-family: monospace;
+    font-size: larger;
+}