42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
// Get the file list
|
|
$files = array_values( array_diff( scandir( "./posts" ), array('..', '.')));
|
|
rsort($files);
|
|
include_once "common.php";
|
|
include_once "config.php";
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="<?php echo SITE_LANG; ?>">
|
|
<head>
|
|
<title><?php echo SITE_NAME; ?></title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="/css/style.css">
|
|
<link rel="stylesheet" href="/css/admin-bar.css">
|
|
</head>
|
|
<body class="index">
|
|
<?php include_once "admin-bar-partial.php"; ?>
|
|
<header>
|
|
<?php if ( SITE_HEADER ): ?>
|
|
<?php echo SITE_HEADER; ?>
|
|
<?php else: ?>
|
|
<h1><a href="/"><?php echo SITE_NAME; ?></a></h1>
|
|
<?php endif; ?>
|
|
</header>
|
|
<main>
|
|
<?php
|
|
echo TOP_BLURB;
|
|
if ( count( $files ) > 0 ) {
|
|
echo "<ul>";
|
|
foreach( $files as $f ) {
|
|
$link = make_post_link( $f );
|
|
echo "<li>$link</li>";
|
|
}
|
|
echo "</ul>";
|
|
}
|
|
?>
|
|
</main>
|
|
<?php if (FOOT_BLURB) echo FOOT_BLURB; ?>
|
|
</body>
|
|
</html>
|