From 0c7f86379f4c1b08eb4b865a4f0f46442abe0996 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich <onny@project-insanity.org> Date: Sat, 19 Dec 2020 00:18:47 +0100 Subject: [PATCH] fix styling loading animation --- lib/Search/SearchProvider.php | 14 +++++++------- src/views/Episode.vue | 2 ++ src/views/Show.vue | 2 ++ src/views/ShowEmpty.vue | 15 +++++++++------ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lib/Search/SearchProvider.php b/lib/Search/SearchProvider.php index c84f120..56dce0e 100644 --- a/lib/Search/SearchProvider.php +++ b/lib/Search/SearchProvider.php @@ -73,13 +73,13 @@ class SearchProvider implements IProvider { public function search(IUser $user, ISearchQuery $query): SearchResult { $term = $query->getTerm(); - $url = "https://de1.api.radio-browser.info/json/stations/byname/" . $term . "?limit=20"; + $url = "https://api.fyyd.de/0.2/search/podcast?count=10&title=" . $term; $client = $this->clientService->newClient(); try { $response = $client->get($url); } catch (Exception $e) { - $this->logger->error("Could not search for podcast shows: " . $e->getMessage()); + $this->logger->error("Could not search for podcasts: " . $e->getMessage()); throw $e; } $body = $response->getBody(); @@ -87,13 +87,13 @@ class SearchProvider implements IProvider { $result = array_map(function (array $result) use ($term) { return new SearchResultEntry( - $result['favicon'], - $result['name'], - str_replace(",",", ",$result['tags']), - $this->url->linkToRouteAbsolute('podcast.page.index') . '#/search/' . $term, + $result['smallImageURL'], + $result['title'], + $result['description'], + $this->url->linkToRouteAbsolute('podcast.page.index') . '#/browse/show/' . $result['id'], 'icon-podcast-trans' ); - }, $parsed); + }, $parsed['data']); return SearchResult::complete( $this->getName(), diff --git a/src/views/Episode.vue b/src/views/Episode.vue index a8b4f2e..7f490da 100644 --- a/src/views/Episode.vue +++ b/src/views/Episode.vue @@ -179,6 +179,7 @@ export default { .podcastImage { width: 200px; height: 200px; + flex-shrink: 0; background-size: cover; background-position: center; box-shadow: 0 4px 60px rgba(0,0,0,.5); @@ -188,6 +189,7 @@ export default { .podcastDescription { max-width: 500px; + width: 100%; color: #ddd; h1 { diff --git a/src/views/Show.vue b/src/views/Show.vue index 7287e67..63a6540 100644 --- a/src/views/Show.vue +++ b/src/views/Show.vue @@ -230,6 +230,7 @@ export default { .podcastImage { width: 200px; height: 200px; + flex-shrink: 0; background-size: cover; background-position: center; box-shadow: 0 4px 60px rgba(0,0,0,.5); @@ -239,6 +240,7 @@ export default { .podcastDescription { max-width: 500px; + width: 100%; color: #ddd; h1 { diff --git a/src/views/ShowEmpty.vue b/src/views/ShowEmpty.vue index ad7e084..65ba573 100644 --- a/src/views/ShowEmpty.vue +++ b/src/views/ShowEmpty.vue @@ -28,13 +28,13 @@ <div class="podcastDescriptionTitle" /> <div class="podcastDescriptionSubTitle" - style="width: 300px;" /> + style="max-width: 300px; width: 100%;" /> <div class="podcastDescriptionSubTitle" - style="width: 400px;" /> + style="max-width: 400px; width: 100%;" /> <div class="podcastDescriptionSubTitle" - style="width: 200px;" /> + style="max-width: 200px; width: 100%;" /> </div> </div> <table class="episodeTable"> @@ -106,6 +106,7 @@ $avatar-offset: 52 + 16; .podcastImageEmpty { width: 200px; height: 200px; + flex-shrink: 0; background-color: #ccc; margin-right: 25px; border-radius: 5px; @@ -116,10 +117,12 @@ $avatar-offset: 52 + 16; .podcastDescriptionEmpty { max-width: 500px; + width: 100%; } .podcastDescriptionTitle { - width: 500px; + max-width: 500px; + width: 100%; height: 35px; border-radius: 5px; margin-bottom: 30px; @@ -163,8 +166,8 @@ $avatar-offset: 52 + 16; 0% { background-position: -100px; } - 40%, 100% { - background-position: 140px; + 60%, 100% { + background-position: 500px; } } -- GitLab