Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added TT framework to build pages.

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