feat: ✨ add FontAwesome symbols for directories
This commit is contained in:
parent
87a14e0624
commit
62089b9ee2
5 changed files with 46 additions and 6 deletions
|
@ -3,9 +3,11 @@
|
|||
$data_time_start = microtime(true);
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
require_once 'post_adapter.php';
|
||||
|
||||
|
||||
require_once 'post_adapter.php';
|
||||
require_once 'fontawesome.php';
|
||||
|
||||
$adapter = new PostHandler();
|
||||
|
||||
$loader = new \Twig\Loader\FilesystemLoader(['./templates', './user_content']);
|
||||
|
@ -64,6 +66,7 @@ $twig->addRuntimeLoader(new class implements RuntimeLoaderInterface {
|
|||
function generate_website($SURI) {
|
||||
global $twig;
|
||||
global $adapter;
|
||||
global $FONT_AWESOME_ARRAY;
|
||||
|
||||
if(preg_match('/^\/api\/admin/', $SURI)) {
|
||||
header('Content-Type: application/json');
|
||||
|
@ -146,17 +149,20 @@ function generate_website($SURI) {
|
|||
|
||||
echo $twig->render('post_types/directory.html', [
|
||||
"post" => $post,
|
||||
"subposts" => $adapter->get_subposts_by_path($SURI)
|
||||
"subposts" => $adapter->get_subposts_by_path($SURI),
|
||||
"fa" => $FONT_AWESOME_ARRAY
|
||||
]);
|
||||
}
|
||||
elseif($post['post_metadata']['type'] == 'text/markdown') {
|
||||
echo $twig->render('post_types/markdown.html', [
|
||||
"post" => $post
|
||||
"post" => $post,
|
||||
"fa" => $FONT_AWESOME_ARRAY
|
||||
]);
|
||||
}
|
||||
elseif($post['post_metadata']['type'] == 'image') {
|
||||
echo $twig->render('post_types/image.html', [
|
||||
"post" => $post
|
||||
"post" => $post,
|
||||
"fa" => $FONT_AWESOME_ARRAY
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue