New blog entry and changes to how blogs are displayed
- blogs are now in subdirs - blog list is generated through helper function - full blog list is in blog subdir
This commit is contained in:
19
index.php
19
index.php
@ -64,24 +64,9 @@
|
||||
</p>
|
||||
</hgroup>
|
||||
<p id="blogpreview">
|
||||
<?php
|
||||
$path = "blog";
|
||||
$files = scandir($path."/");
|
||||
$i = 0;
|
||||
foreach ($files as $file) {
|
||||
if (preg_match("/.+?(?=\.html|\.php)/", $file, $matches)) {
|
||||
if ($i > 4)
|
||||
break;
|
||||
$tags = get_meta_tags($path.'/'.$file);
|
||||
printf('<a href='.$path.'/%s>%s</a><span>%s</span><br>',
|
||||
$matches[0], str_replace("-", " ", $matches[0]),
|
||||
$tags["date"] ? $tags["date"] : "¯\_(ツ)_/¯");
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php include('misc/tools.php'); entries("blog", 5); ?>
|
||||
</p>
|
||||
<a href="/blog.php">more...</a>
|
||||
<a href="/blog">more...</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user