aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2013-01-13 21:42:20 +0000
committerNathan Lasseter <nathan@4574.co.uk>2013-01-13 21:42:20 +0000
commit784d39145f3c395c0cf6f742b8414f1c215736ec (patch)
tree2c0b71675052a99ff7d358a2f30d361f3aa8da4c
parentd1d90fe7532e615912e4bce9c623a9d74e215cd5 (diff)
Removed inflexible top.php
-rw-r--r--archives.php20
-rw-r--r--index.php20
-rw-r--r--post.php19
-rw-r--r--top.php20
-rw-r--r--viewpost.php20
5 files changed, 75 insertions, 24 deletions
diff --git a/archives.php b/archives.php
index 3f29067..4a41f18 100644
--- a/archives.php
+++ b/archives.php
@@ -1,6 +1,24 @@
<?php
- require("top.php");
+ require("settings.php");
+?>
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title><?php echo $blogTitle; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo $blogRoot; ?>styles.css" />
+</head>
+
+<body>
+<div id="title">
+<h1><?php echo $blogHead; ?></h1>
+<a class="toplink" href="<?php echo $blogRoot; ?>">Home</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>archives.php">Archives</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>post.php">Post</a>
+</div>
+
+<?php
$ls = explode("\n", `ls -1t {$blogPosts}/`);
foreach($ls as $file) {
if (preg_match('/^\./', $file)) continue;
diff --git a/index.php b/index.php
index 9541b14..1eac730 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,24 @@
<?php
- require("top.php");
+ require("settings.php");
+?>
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title><?php echo $blogTitle; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo $blogRoot; ?>styles.css" />
+</head>
+
+<body>
+<div id="title">
+<h1><?php echo $blogHead; ?></h1>
+<a class="toplink" href="<?php echo $blogRoot; ?>">Home</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>archives.php">Archives</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>post.php">Post</a>
+</div>
+
+<?php
$start = 0;
$show = 5;
if(isset($_GET['start'])) $start = $_GET['start'];
diff --git a/post.php b/post.php
index 9bd9138..2ea452f 100644
--- a/post.php
+++ b/post.php
@@ -1,6 +1,23 @@
<?php
- require("top.php");
+ require("settings.php");
?>
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title><?php echo $blogTitle; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo $blogRoot; ?>styles.css" />
+</head>
+
+<body>
+
+<div id="title">
+<h1><?php echo $blogHead; ?></h1>
+<a class="toplink" href="<?php echo $blogRoot; ?>">Home</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>archives.php">Archives</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>post.php">Post</a>
+</div>
+
<div>
<form method="post" action="<?php echo $blogRoot; ?>dopost.php">
<input name="title" size="50">
diff --git a/top.php b/top.php
deleted file mode 100644
index 39a5f95..0000000
--- a/top.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
- require("settings.php");
-?>
-<!DOCTYPE html>
-<html>
-
-<head>
- <title><?php echo $blogTitle; ?></title>
- <link rel="stylesheet" type="text/css" href="<?php echo $blogRoot; ?>styles.css" />
-</head>
-
-<body>
-
-<div id="title">
-<h1><?php echo $blogHead; ?></h1>
-<a class="toplink" href="<?php echo $blogRoot; ?>">Home</a>
-<a class="toplink" href="<?php echo $blogRoot; ?>archives.php">Archives</a>
-<a class="toplink" href="<?php echo $blogRoot; ?>post.php">Post</a>
-</div>
-
diff --git a/viewpost.php b/viewpost.php
index 0804551..617923a 100644
--- a/viewpost.php
+++ b/viewpost.php
@@ -3,9 +3,27 @@
header("location: $blogRoot");
exit(0);
}
+ require("settings.php");
+?>
+
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title><?php echo $blogTitle; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo $blogRoot; ?>styles.css" />
+</head>
- require("top.php");
+<body>
+<div id="title">
+<h1><?php echo $blogHead; ?></h1>
+<a class="toplink" href="<?php echo $blogRoot; ?>">Home</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>archives.php">Archives</a>
+<a class="toplink" href="<?php echo $blogRoot; ?>post.php">Post</a>
+</div>
+
+<?php
$file = $_GET['post'];
echo "<div>\n";
echo "<a class=\"title\" href=\"{$blogRoot}post/" . urlencode($file) . "\">$file <span id=\"perma\">[Permalink]</span></a> ";