From da570d51678ff96441470bb3c763231ec9e3c35c Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Tue, 21 Apr 2020 19:22:56 -0400 Subject: [PATCH] Big Work in progress commit --- app/appConf/routes.php | 10 + app/views/history/anime.php | 20 ++ app/views/main-menu.php | 4 +- frontEndSrc/css/src/general.css | 5 + public/css/auto.min.css | 2 +- public/css/dark.min.css | 2 +- public/css/light.min.css | 2 +- src/AnimeClient/API/JsonAPI.php | 10 +- src/AnimeClient/API/Kitsu.php | 4 +- src/AnimeClient/API/Kitsu/Auth.php | 6 +- src/AnimeClient/API/Kitsu/KitsuTrait.php | 2 +- src/AnimeClient/API/Kitsu/Model.php | 110 ++++++++- .../Transformer/AnimeHistoryTransformer.php | 210 ++++++++++++++++++ src/AnimeClient/AnimeClient.php | 6 +- src/AnimeClient/Controller/Anime.php | 13 +- src/AnimeClient/Controller/History.php | 84 +++++++ src/AnimeClient/Controller/Manga.php | 11 +- src/AnimeClient/Model/Anime.php | 13 +- src/AnimeClient/Model/AnimeCollection.php | 11 +- src/AnimeClient/Model/Collection.php | 6 +- src/AnimeClient/Model/Manga.php | 12 +- src/AnimeClient/Types/AbstractType.php | 38 +++- src/AnimeClient/Types/Anime.php | 36 +-- src/AnimeClient/Types/HistoryItem.php | 51 +++++ src/Ion/View.php | 12 +- src/Ion/View/HtmlView.php | 6 +- src/Ion/View/HttpView.php | 2 +- src/Ion/View/JsonView.php | 5 +- 28 files changed, 601 insertions(+), 92 deletions(-) create mode 100644 app/views/history/anime.php create mode 100644 src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php create mode 100644 src/AnimeClient/Controller/History.php create mode 100644 src/AnimeClient/Types/HistoryItem.php diff --git a/app/appConf/routes.php b/app/appConf/routes.php index ba17aa55..6534c171 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -193,6 +193,16 @@ $routes = [ 'username' => '.*?' ] ], + 'anime_history' => [ + 'controller' => 'history', + 'path' => '/history/anime', + 'action' => 'anime', + ], + 'manga_history' => [ + 'controller' => 'history', + 'path' => '/history/manga', + 'action' => 'manga', + ], // --------------------------------------------------------------------- // Default / Shared routes // --------------------------------------------------------------------- diff --git a/app/views/history/anime.php b/app/views/history/anime.php new file mode 100644 index 00000000..826e267e --- /dev/null +++ b/app/views/history/anime.php @@ -0,0 +1,20 @@ +
+ +

No recent watch history.

+ +
+ $item): ?> +
+
picture( + $item['coverImg'], + 'jpg', + ['width' => '110px', 'height' => '156px'], + ['width' => '110px', 'height' => '156px'] + ) ?>
+
+
+ +
+
+ +
diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 70059648..f38082d3 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -5,8 +5,8 @@ namespace Aviat\AnimeClient; $whose = $config->get('whose_list') . "'s "; $lastSegment = $urlGenerator->lastSegment(); $extraSegment = $lastSegment === 'list' ? '/list' : ''; -$hasAnime = stripos($_SERVER['REQUEST_URI'], 'anime') !== FALSE; -$hasManga = stripos($_SERVER['REQUEST_URI'], 'manga') !== FALSE; +$hasAnime = stripos($_SERVER['REQUEST_URI'], 'anime') === 1; +$hasManga = stripos($_SERVER['REQUEST_URI'], 'manga') === 1; ?>