Icons, themes, removed instance proxy and more

This commit is contained in:
Pablo Ferreiro 2022-03-29 19:30:31 +02:00
parent 9a35c61023
commit 44ee065ec6
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
52 changed files with 476 additions and 511 deletions

View file

@ -3,16 +3,17 @@ namespace App\Controllers;
use App\Helpers\ErrorHandler;
use App\Helpers\Misc;
use App\Helpers\RSS;
use App\Helpers\Wrappers;
use App\Models\FeedTemplate;
use App\Models\RSSTemplate;
class TagController {
static public function get(string $name) {
$cursor = Misc::getCursor();
$api = Misc::api();
$api = Wrappers::api();
$feed = $api->getHashtagFeed($name, $cursor);
if ($feed->meta->success) {
$latte = Misc::latte();
$latte = Wrappers::latte();
$latte->render(Misc::getView('tag'), new FeedTemplate('Tag', $feed));
} else {
ErrorHandler::show($feed->meta);
@ -20,13 +21,11 @@ class TagController {
}
static public function rss(string $name) {
$api = Misc::api();
$api = Wrappers::api();
$feed = $api->getHashtagFeed($name);
if ($feed->meta->success) {
$feed = RSS::build("/tag/{$name}", "{$name} Tag", $feed->info->detail->desc, $feed->items);
// Setup headers
RSS::setHeaders('tag.rss');
echo $feed;
$latte = Wrappers::latte();
$latte->render(Misc::getView('rss'), new RSSTemplate($name, $feed->info->detail->desc, "/tag/{$name}", $feed->items));
}
}
}