Skip to content

Commit

Permalink
Merge pull request #617 from FitzwilliamMuseum/hotfix/13980-broken-pa…
Browse files Browse the repository at this point in the history
…rtner-page

Hotfix/13980 broken partner page
  • Loading branch information
sean-dunwoody authored Sep 26, 2023
2 parents 0e6a407 + 198055e commit 6f57383
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
1 change: 0 additions & 1 deletion resources/views/components/image-card.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div class="col-md-4 mb-3">
<div class="card card-fitz h-100">
@isset($image)

<a href="{{ route($route, $params) }}">
<img class="card-img-top"
src="{{ $image['data']['thumbnails'][13]['url']}}"
Expand Down
21 changes: 15 additions & 6 deletions resources/views/components/partner-card.blade.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
<div class="col-md-4 mb-3">
<div class="card card-fitz h-100">
@isset($image)

@isset($url)
<a href="{{ $url }}">
@endisset
@isset($image)
<img class="card-img-top"
src="{{ $image['data']['thumbnails'][13]['url']}}"
alt="{{ $altTag }}"
loading="lazy"
width="{{ $image['data']['thumbnails'][13]['width'] }}"
height="{{ $image['data']['thumbnails'][13]['height'] }}"
/>
</a>
@else
<a href="{{ $url }}">
@else
<img class="card-img-top"
src="{{ env('MISSING_IMAGE_URL') }}"
alt="A stand in image for {{ $title }}"
loading="lazy"
/>
@endisset
@isset($url)
</a>
@endisset


<div class="card-body h-100">
<div class="contents-label mb-3">
<h2>
<a href="{{ $url }}" class="stretched-link">
@isset($url)
<a href="{{ $url }}" class="stretched-link">
{{ $title }}
</a>
@else
{{ $title }}
</a>
@endisset
</h2>
@isset($subtitle)
<p class="text-info">{{ $subtitle }}</p>
Expand Down
14 changes: 8 additions & 6 deletions resources/views/research/project.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
<h3>Funders and partners</h3>
<div class="row">
@foreach($project['project_partnerships'] as $partner)
<x-partner-card
:altTag="$partner['partner']['partner_full_name']"
:title="$partner['partner']['partner_full_name']"
:image="$partner['partner']['partner_logo']"
:url="$partner['partner']['partner_url']">
</x-partner-card>
@isset($partner['partner'])
<x-partner-card
:altTag="$partner['partner']['partner_full_name']"
:title="$partner['partner']['partner_full_name']"
:image="$partner['partner']['partner_logo']"
:url="$partner['partner']['partner_url']">
</x-partner-card>
@endisset
@endforeach
</div>
</div>
Expand Down

0 comments on commit 6f57383

Please sign in to comment.