wrapperize the HTML templates
Tara L Andrews [Sat, 29 Oct 2011 20:19:02 +0000 (22:19 +0200)]
TreeOfTexts/lib/TreeOfTexts/View/TT.pm
TreeOfTexts/root/css/style.css [moved from TreeOfTexts/root/src/style.tt2 with 100% similarity]
TreeOfTexts/root/src/frontpage.tt
TreeOfTexts/root/src/index.tt
TreeOfTexts/root/src/wrapper.tt [new file with mode: 0644]

index 1f43118..af30bf5 100644 (file)
@@ -10,6 +10,7 @@ __PACKAGE__->config(
     INCLUDE_PATH => [
        TreeOfTexts->path_to( 'root', 'src' ),
     ],
+    WRAPPER => 'wrapper.tt',
     render_die => 1,
 );
 
index 0444fce..7ba54d2 100644 (file)
@@ -1,12 +1,6 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <link type="text/css" href="[% c.uri_for('css/cupertino/jquery-ui-1.8.13.custom.css') %]" rel="stylesheet" />
-    [% INCLUDE style.tt2 %]
-  </head>
-  <body>
-    <h1>Stexaminer</h1>
+[% BLOCK js %]
+[% END %]
+
     <h2>Choose a text to examine</h2>
     <div id="text_list">
       <ul>
@@ -17,5 +11,3 @@
 [% END -%]
      </table>
     </div>
-  </body>
-</html>
index a82da65..b06a41d 100644 (file)
@@ -1,31 +1,8 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
+[% BLOCK js %]
     <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
     <script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script>
     <script type="text/javascript" src="js/interaction.js"></script>
-    <link type="text/css" href="[% c.uri_for('css/cupertino/jquery-ui-1.8.13.custom.css') %]" rel="stylesheet" />
-    [% INCLUDE style.tt2 %]
-  </head>
-  <body>
-    <h1>Stexaminer</h1>
-    <h2>[% text_title %]</h2>
-    <div id="statistics">
-      <p>Analyzed [% total %] variant locations, of which [% genealogical %] entirely followed the stemma.  [% conflict %] readings conflicted with the stemma.</p>
-    </div>
-    <div id="svg_graph">
-      [% svg %]
-    </div>
-    <div id="variants_table">
-      <table>
-[% FOREACH row IN variants -%]
-[% INCLUDE variantrow %]
-[% END -%]
-     </table>
-    </div>
-  </body>
-</html>
+[% END %]
 
 [% BLOCK variantrow -%]
 [% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
           <td/>
 [% END -%]
         </tr>
-[% END -%]
\ No newline at end of file
+[% END -%]
+
+    <h2>[% text_title %]</h2>
+    <div id="statistics">
+      <p>Analyzed [% total %] variant locations, of which [% genealogical %] entirely followed the stemma.  [% conflict %] readings conflicted with the stemma.</p>
+    </div>
+    <div id="svg_graph">
+      [% svg %]
+    </div>
+    <div id="variants_table">
+      <table>
+[% FOREACH row IN variants -%]
+[% INCLUDE variantrow %]
+[% END -%]
+     </table>
+    </div>
+
diff --git a/TreeOfTexts/root/src/wrapper.tt b/TreeOfTexts/root/src/wrapper.tt
new file mode 100644 (file)
index 0000000..8b56647
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <link type="text/css" href="[% c.uri_for('css/cupertino/jquery-ui-1.8.13.custom.css') %]" rel="stylesheet" />
+    <link type="text/css" href="[% c.uri_for('css/style.css') %]" rel="stylesheet" />
+    [% INCLUDE js %]
+    <title>Stexaminer</title>
+  </head>
+  <body>
+    <h1>Stexaminer</h1>
+[% content %]
+  </body>
+</html>