Skip to content

Commit

Permalink
Reorganised everything.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Mar 14, 2017
1 parent 98d9201 commit 1685e0a
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bin/makesite
@@ -0,0 +1,23 @@
#!/usr/bin/perl

use strict;
use warnings;
use 5.010;

use Template;
use FindBin '$Bin';
use File::Basename;

my $tt = Template->new(
INCLUDE_PATH => ["$Bin/../tt_lib", "$Bin/../in" ],
OUTPUT_PATH => "$Bin/../docs",
WRAPPER => 'page',
);

foreach (glob "in/*.tt") {
s|^in/||;
my $out = s/\.tt$//r;

$tt->process($_, {}, $out)
or die $tt->error;
}
File renamed without changes.
54 changes: 54 additions & 0 deletions in/index.html.tt
@@ -0,0 +1,54 @@
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1>Perl Web Advice</h1>
<p>Perl has been used to build dynamic web sites for a very long time.
Over time, the best way to build web sites with Perl has changed.
Unfortunately, a lot of the information out there on the World Wide
Web doesn't change and is, therefore, rather out of date.</p>
<p>This site aims to provide a place where you can find the best,
up-to-date advice for building web sites with Perl.</p>
<p>(And yes, we're well aware of the dangers of saying that this site
will always be up to date. That's why the code for this site is on
<a href="https://github.com/davorg/perlwebadvice">Github</a>.)</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>
</div>
</div>

<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-4">
<h2>New Project</h2>
<p>Congratulations! You've decided to use Perl as the technology
to build your new web site. That means you have you pick from
a huge selection of modern tools that you can use on your project.
This section will help you to decide which tools are best for
you.</p>
<p><a class="btn btn-default" href="/greenfield/" role="button">View details &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Project Maintenance</h2>
<p>Commiserations! You are maintaining an older web site that is
built in Perl. This section will help you to recognise exactly
which technologies are being used. It also has advice on moving
gradually towards a newer toolset.</p>
<p><a class="btn btn-default" href="/legacy/" role="button">View details &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Hosting</h2>
<p>You are looking for somewhere to host your new web site that
is built in Perl. This section will give you some suggestions of
the kinds of hosting options that are open to you. Or, if you're
running a hosting company, it has suggestions of what you can do
to make your hosting as attractive as possible to Perl projects.</p>
<p><a class="btn btn-default" href="/hosting/" role="button">View details &raquo;</a></p>
</div>
</div>

<hr>

<footer>
<p>&copy; 2016 Perl Hacks.</p>
</footer>
</div> <!-- /container -->
66 changes: 66 additions & 0 deletions tt_lib/page
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>Perl Web Advice</title>

<!-- Bootstrap core CSS -->
<!--link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"-->
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/readable/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="css/styles.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Perl Web Advice</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<!-- form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" placeholder="Email" class="form-control">
</div>
<div class="form-group">
<input type="password" placeholder="Password" class="form-control">
</div>
<button type="submit" class="btn btn-success">Sign in</button>
</form -->
</div><!--/.navbar-collapse -->
</div>
</nav>

[% content %]

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"><\/script>')</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

0 comments on commit 1685e0a

Please sign in to comment.