diff --git a/app/controller/artistDetails.php b/app/controller/artistDetails.php index 5e33c86..10dfe8a 100644 --- a/app/controller/artistDetails.php +++ b/app/controller/artistDetails.php @@ -16,8 +16,15 @@ $artist = $jazzService->getArtistById($artistId); $performances = $jazzService->getPerformancesByArtist($artist); + $words = explode(' ', $artist->Bio); + $wordsPerPart = ceil(count($words) / 2); + $bioPart1 = implode(' ', array_slice($words, 0, $wordsPerPart)); + $bioPart2 = implode(' ', array_slice($words, $wordsPerPart)); + Route::render('jazz.artist.main', [ 'artist' => $artist, 'performances' => $performances, + 'bioPart1' => $bioPart1, + 'bioPart2' => $bioPart2, ]); }); diff --git a/app/pages/jazz/artist/albums.blade.php b/app/pages/jazz/artist/albums.blade.php index e69de29..5499e9a 100644 --- a/app/pages/jazz/artist/albums.blade.php +++ b/app/pages/jazz/artist/albums.blade.php @@ -0,0 +1,12 @@ +
Header Image
- @endif -+
{{ $bioPart1 }}
Image
- @endif + +Image
- @endif + ++
{{ $bioPart2 }}
- Come to {{ $performance->Day->Venue->Name }}
- on {{ date('j F', strtotime($performance->StartDateTime)) }}
- to enjoy {{ $artist->Name }}'s music!
- {{ date('H:i', strtotime($performance->StartDateTime)) }}
- - {{ date('H:i', strtotime($performance->EndDateTime)) }}
- @if (trim($performance->Details) !== '')
- | {{ $performance->Details }}
- @endif
- @if ($performance->Price != '0.00')
- - € {{ number_format($performance->Price, 2) }}
- @endif
-