1
0

blog_list + footer

This commit is contained in:
2017-12-28 22:53:41 +01:00
parent 40af1b8d0b
commit 0fc19d3fcf
9 changed files with 181 additions and 11 deletions

View File

@@ -28,6 +28,12 @@ class Blog
[ 'id' => 9, 'date' => '2016-10-22', 'visible' => true, 'title' => 'A complete sudoku solver in Befunge-93', 'fragment' => 'sudoku_befunge.md', 'type' => 'markdown', 'cat' => 'blog' ],
];
}
public static function listAllOrderedDescending() {
$data = self::listAll();
usort($data, function($a, $b) { return strcasecmp($b['date'], $a['date']); });
return $data;
}
}

View File

@@ -11,7 +11,8 @@ class Euler
public static function listAll()
{
$files = glob(__DIR__ . '/../statics/euler/euler_*.php');
$expr = __DIR__ . '/../statics/euler/Euler_Problem-*.php';
$files = glob($expr);
return array_map('self::readSingle', $files);
}