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 @@ +
+
+
+ +
+
+
\ No newline at end of file diff --git a/app/pages/jazz/artist/header.blade.php b/app/pages/jazz/artist/header.blade.php index e69de29..b03ba86 100644 --- a/app/pages/jazz/artist/header.blade.php +++ b/app/pages/jazz/artist/header.blade.php @@ -0,0 +1,7 @@ +
+
+

+ {{ $artist->Name }} +

+
+
\ No newline at end of file diff --git a/app/pages/jazz/artist/main.blade.php b/app/pages/jazz/artist/main.blade.php index bf3333a..95655ce 100644 --- a/app/pages/jazz/artist/main.blade.php +++ b/app/pages/jazz/artist/main.blade.php @@ -14,154 +14,77 @@ @include('main.navbar') - -
- @if ($artist->HeaderImg) - {{ $artist->Name }} - @else - -

Header Image

- @endif -
-

- {{ $artist->Name }} -

-
+@include('jazz.artist.header') + +
+

+ Biography of {{ $artist->Name }} +

- -
-
-
- @php - $bioPart1 = 'Some bio'; - $bioPart2 = 'Some bio'; - if($artist->Bio){ - $words = explode(' ', $artist->Bio); - $wordsPerPart = ceil(count($words) / 2); - $bioPart1 = implode(' ', array_slice($words, 0, $wordsPerPart)); - $bioPart2 = implode(' ', array_slice($words, $wordsPerPart)); - } - @endphp -

+

+ +
+
+

{{ $bioPart1 }}

-
- @if($artist->ArtistImg1) - {{ $artist->Name }} - @else -

Image

- @endif + +
+
+ {{ $artist->Name }} +
-
- @if($artist->ArtistImg2) - {{ $artist->Name }} - @else -

Image

- @endif + +
+
+ {{ $artist->Name }} +
-
+ +
-

+

{{ $bioPart2 }}

-
- -
-

- Discover albums of {{ $artist->Name }}! -

-
-
- @foreach ($artist->Albums as $album) -
-
- -
-
- @endforeach + +
+

+ Discover albums of {{ $artist->Name }} +

-
- - -
-

- Discover most popular songs of {{ $artist->Name }}! -

-
-
-
- @foreach ($artist->Songs as $song) -
-
-
- -
-
-
- @endforeach +
+
+ @foreach ($artist->Albums as $album) + @include('jazz.artist.albums') + @endforeach +
-
- -@foreach ($performances as $performance) -
-
-

- 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 -

- @if ($performance->Price != '0.00') -
- @if ($performance->AvailableTickets > 0) - - Buy Tickets! - @else - - @endif -
- @else -
- - For free! - -
- @endif + +
+

+ Discover most popular songs of {{ $artist->Name }}! +

+
+
+
+ @foreach ($artist->Songs as $song) + @include('jazz.artist.songs') + @endforeach
-@endforeach -@include('main.footer') + @include('jazz.artist.performances') + + @include('main.footer') diff --git a/app/pages/jazz/artist/performances.blade.php b/app/pages/jazz/artist/performances.blade.php index e69de29..701f126 100644 --- a/app/pages/jazz/artist/performances.blade.php +++ b/app/pages/jazz/artist/performances.blade.php @@ -0,0 +1,39 @@ + + +@foreach ($performances as $performance) +
+
+

+ 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 +

+ @if ($performance->Price != '0.00') +
+ @if ($performance->AvailableTickets > 0) + + Buy Tickets! + @else + + @endif +
+ @else +
+ + For free! + +
+ @endif +
+
+@endforeach \ No newline at end of file diff --git a/app/pages/jazz/artist/songs.blade.php b/app/pages/jazz/artist/songs.blade.php index e69de29..db9d464 100644 --- a/app/pages/jazz/artist/songs.blade.php +++ b/app/pages/jazz/artist/songs.blade.php @@ -0,0 +1,12 @@ +
+
+
+ +
+
+
\ No newline at end of file diff --git a/app/pages/jazz/overview/header.blade.php b/app/pages/jazz/overview/header.blade.php index e6e8931..3330cc2 100644 --- a/app/pages/jazz/overview/header.blade.php +++ b/app/pages/jazz/overview/header.blade.php @@ -1,7 +1,7 @@
{{ $festivalEvent->getFestivalEventName() }}
-

+

{{ $festivalEvent->getFestivalEventName() }}