Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added TT framework to build pages.

  • Loading branch information...
commit 24ae8832165d2c3429cdcb29b4ac0fc625b28e48 1 parent d4d0e96
Dave Cross authored September 30, 2013
11  about.html
@@ -7,10 +7,10 @@
7 7
     <meta name="author" content="">
8 8
     <link rel="shortcut icon" href="http://perlhacks.com/favicon.png">
9 9
 
10  
-    <title>About Perl Search</title>
  10
+    <title>About - Perl Search</title>
11 11
 
12 12
     <!-- Bootstrap core CSS -->
13  
-    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.css" rel="stylesheet">
  13
+    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
14 14
 
15 15
     <!-- Custom styles for this template -->
16 16
     <link href="/css/starter-template.css" rel="stylesheet">
@@ -36,8 +36,8 @@
36 36
         </div>
37 37
         <div class="collapse navbar-collapse">
38 38
           <ul class="nav navbar-nav">
39  
-            <li><a href="/#">Home</a></li>
40  
-            <li class="active"><a href="about.html">About</a></li>
  39
+            <li><a href="#">Home</a></li>
  40
+            <li class="active"><a href="/about.html">About</a></li>
41 41
           </ul>
42 42
         </div><!--/.nav-collapse -->
43 43
       </div>
@@ -46,7 +46,7 @@
46 46
     <div class="container">
47 47
 
48 48
       <div class="starter-template">
49  
-        <h1>About Perl Search</h1>
  49
+        <h1>About</h1>
50 50
         <p>There's a lot of information about Perl out there on the World
51 51
           Wide Web. Unfortunately, a lot of it is of rather questionable
52 52
           quality. And, even more unfortunately, Google seems really happy
@@ -69,6 +69,7 @@
69 69
           <a href="http://twitter.com/davorg">on Twitter</a>.</p>
70 70
         <p>He would love to hear if you find the site useful or if you
71 71
           have suggestions for improvements.</p>
  72
+
72 73
       </div>
73 74
 
74 75
     </div><!-- /.container -->
3  build
... ...
@@ -0,0 +1,3 @@
  1
+#!/bin/bash
  2
+
  3
+ttree -f ./ttreerc
26  in/about.html
... ...
@@ -0,0 +1,26 @@
  1
+[% META
  2
+   name = 'about'
  3
+   title = 'About'
  4
+ -%]
  5
+        <p>There's a lot of information about Perl out there on the World
  6
+          Wide Web. Unfortunately, a lot of it is of rather questionable
  7
+          quality. And, even more unfortunately, Google seems really happy
  8
+          to serve up results which include links to some of the dodgier
  9
+          pages - stuff that hasn't been updated since the end of the 90s.</p>
  10
+        <p>We could debate the reasons for this for days. But in my opinion
  11
+          this hurts Perl's reputation. This information reinforces the
  12
+          stereotype that Perl is still just the programming language that
  13
+          was used to write bad CGI scripts twenty years ago.</p>
  14
+        <p>So I've decided to do something about this.
  15
+          <a href="http://search.perlhacks.com/">Perl Search</a> is a
  16
+          <a href="https://www.google.com/cse/">Google Custom Search
  17
+          Engine</a> which returns results from sites that are known to
  18
+          have good and up to date information about Perl.</p>
  19
+
  20
+        <h2>Credits</h2>
  21
+        <p><a href="http://search.perlhacks.com/">Perl Search</a> is run
  22
+          by Dave Cross. You can read his
  23
+          <a href="http://perlhacks.com">Perl blog</a> or follow him
  24
+          <a href="http://twitter.com/davorg">on Twitter</a>.</p>
  25
+        <p>He would love to hear if you find the site useful or if you
  26
+          have suggestions for improvements.</p>
18  in/index.html
... ...
@@ -0,0 +1,18 @@
  1
+[% META
  2
+   name = 'home'
  3
+ -%]
  4
+        <div>
  5
+<script>
  6
+  (function() {
  7
+    var cx = '008350714774536055976:a2zesuxuecs';
  8
+    var gcse = document.createElement('script');
  9
+    gcse.type = 'text/javascript';
  10
+    gcse.async = true;
  11
+    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
  12
+        '//www.google.com/cse/cse.js?cx=' + cx;
  13
+    var s = document.getElementsByTagName('script')[0];
  14
+    s.parentNode.insertBefore(gcse, s);
  15
+  })();
  16
+</script>
  17
+<gcse:search></gcse:search>
  18
+        </div>
3  index.html
@@ -47,7 +47,7 @@
47 47
 
48 48
       <div class="starter-template">
49 49
         <h1>Perl Search</h1>
50  
-          <div>
  50
+        <div>
51 51
 <script>
52 52
   (function() {
53 53
     var cx = '008350714774536055976:a2zesuxuecs';
@@ -62,6 +62,7 @@
62 62
 </script>
63 63
 <gcse:search></gcse:search>
64 64
         </div>
  65
+
65 66
       </div>
66 67
 
67 68
     </div><!-- /.container -->
62  lib/wrapper
... ...
@@ -0,0 +1,62 @@
  1
+<!DOCTYPE html>
  2
+<html lang="en">
  3
+  <head>
  4
+    <meta charset="utf-8">
  5
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6
+    <meta name="description" content="">
  7
+    <meta name="author" content="">
  8
+    <link rel="shortcut icon" href="http://perlhacks.com/favicon.png">
  9
+
  10
+    <title>[% IF template.title; template.title _ ' - '; END %]Perl Search</title>
  11
+
  12
+    <!-- Bootstrap core CSS -->
  13
+    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
  14
+
  15
+    <!-- Custom styles for this template -->
  16
+    <link href="/css/starter-template.css" rel="stylesheet">
  17
+
  18
+    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  19
+    <!--[if lt IE 9]>
  20
+      <script src="/js/html5shiv.js"></script>
  21
+      <script src="/js/respond.min.js"></script>
  22
+    <![endif]-->
  23
+  </head>
  24
+
  25
+  <body>
  26
+
  27
+    <div class="navbar navbar-inverse navbar-fixed-top">
  28
+      <div class="container">
  29
+        <div class="navbar-header">
  30
+          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  31
+            <span class="icon-bar"></span>
  32
+            <span class="icon-bar"></span>
  33
+            <span class="icon-bar"></span>
  34
+          </button>
  35
+          <a class="navbar-brand" href="#">Perl Search</a>
  36
+        </div>
  37
+        <div class="collapse navbar-collapse">
  38
+          <ul class="nav navbar-nav">
  39
+            <li[% IF template.name == 'home' %] class="active"[% END %]><a href="#">Home</a></li>
  40
+            <li[% IF template.name == 'about' %] class="active"[% END %]><a href="/about.html">About</a></li>
  41
+          </ul>
  42
+        </div><!--/.nav-collapse -->
  43
+      </div>
  44
+    </div>
  45
+
  46
+    <div class="container">
  47
+
  48
+      <div class="starter-template">
  49
+        <h1>[% template.title || 'Perl Search' %]</h1>
  50
+[% content %]
  51
+      </div>
  52
+
  53
+    </div><!-- /.container -->
  54
+
  55
+
  56
+    <!-- Bootstrap core JavaScript
  57
+    ================================================== -->
  58
+    <!-- Placed at the end of the document so the pages load faster -->
  59
+    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  60
+    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
  61
+  </body>
  62
+</html>
4  ttreerc
... ...
@@ -0,0 +1,4 @@
  1
+lib = lib
  2
+src = in
  3
+dest = .
  4
+wrapper = wrapper

0 notes on commit 24ae883

Please sign in to comment.
Something went wrong with that request. Please try again.