refactor: ♻️ clean up unused Twig templates
This commit is contained in:
parent
d54d3077cb
commit
a7a7c738ec
12 changed files with 253 additions and 98 deletions
|
@ -68,33 +68,23 @@ if($SURI == '/') {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
echo $twig->render('directory.html', [
|
||||
echo $twig->render('post_types/directory.html', [
|
||||
"post" => $post,
|
||||
"subposts" => $post['subposts']
|
||||
]);
|
||||
}
|
||||
elseif($post['post_metadata']['type'] == 'text/markdown') {
|
||||
echo $twig->render('about.html', [
|
||||
echo $twig->render('post_types/markdown.html', [
|
||||
"post" => $post,
|
||||
"subposts" => $post['subposts']
|
||||
]);
|
||||
}
|
||||
elseif($post['post_metadata']['type'] == 'file') {
|
||||
echo $twig->render('image.html', [
|
||||
echo $twig->render('post_types/image.html', [
|
||||
"post" => $post
|
||||
]);
|
||||
}
|
||||
|
||||
} elseif(preg_match('/^\/about(.html)?$/', $SURI)) {
|
||||
echo $twig->render('about.html');
|
||||
} elseif(preg_match('/^\/gallery\/([^\?]+)/', $SURI)) {
|
||||
echo $twig->render('/gallery/gallery_entry.html', [
|
||||
'image_url' => '/static/banner/0.png',
|
||||
'image_title' => 'Test!',
|
||||
'image_desc' => 'A soft piece made by a dear friend',
|
||||
'artist_name' => 'Doggonaut',
|
||||
'artist_src_link' => 'https://twitter.com/doggonaut'
|
||||
]);
|
||||
} else {
|
||||
echo $twig->render('rrror.html',[
|
||||
"error_code" => '404 Hoard not found!',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue