diff --git a/index.php b/index.php
index 9d5a394..cfd3a28 100644
--- a/index.php
+++ b/index.php
@@ -44,12 +44,6 @@
exit;
}
- echo '
';
-
if (isset($_POST['savebutton']))
{
$title = $_POST['title'];
@@ -77,23 +71,34 @@
$content = file_get_contents($dir . '/' . $title);
}
- $nblines = substr_count($content, "\r\n");
+ $nblines = max(20, substr_count($content, "\r\n") + 1);
echo '';
}
else
{
- echo '
';
- if ($dh = opendir($dir)) {
- while (($file = readdir($dh)) !== false) {
- if (str_ends_with($file, '.md'))
+ echo '';
+ echo '
';
+
+ if ($dh = opendir($dir))
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ if (!str_ends_with($file, '.del') && $file != '.' && $file != '..')
{
$mod = date("F d Y H:i:s", filemtime($dir . '/' . $file));
echo '';
@@ -101,6 +106,7 @@
}
closedir($dh);
}
+ echo '
';
}
?>