Skip to content

Commit

Permalink
add hero image section to exhibition and support pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ostafinskim committed Jan 16, 2025
1 parent 52e5d6b commit f647252
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion resources/views/exhibitions/details.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@section('keywords', $exhibition['meta_keywords'])
@section('description', $exhibition['meta_description'])
@section('title', $exhibition['exhibition_title'])

@section('hero_image', $exhibition['hero_image']['data']['thumbnails'][10]['url'])
{{-- Start template check --}}

{{-- Exhibitions - 2024 template --}}
Expand Down
41 changes: 19 additions & 22 deletions resources/views/includes/structure/meta.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,35 @@

<title>The Fitzwilliam Museum - @yield('title')</title>

<meta name="description" content="@yield('description')"/>
<meta name="description" content="@yield('description')" />
@hasSection('keywords')
<meta name="keywords" content="@yield('keywords')"/>
<meta name="keywords" content="@yield('keywords')" />
@endif
<!-- Canonical link -->
<link rel="canonical" href="{{ URL::current() }}"/>
<link rel="shortcut icon" href="{{secure_url('/')}}/favicon.ico">
<link rel="canonical" href="{{ URL::current() }}" />
<link rel="shortcut icon" href="{{ secure_url('/') }}/favicon.ico">

<!-- Open graph -->
<meta property="og:locale" content="{{ app()->getLocale() }}"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="@yield('title')"/>
<meta property="og:description" content="@yield('description')"/>
<meta property="og:url" content="{{ URL::current() }}"/>
<meta property="og:site_name" content="The Fitzwilliam Museum"/>
<meta property="og:locale" content="{{ app()->getLocale() }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="@yield('title')" />
<meta property="og:description" content="@yield('description')" />
<meta property="og:url" content="{{ URL::current() }}" />
<meta property="og:site_name" content="The Fitzwilliam Museum" />

@hasSection('social_thumbnail')
<meta property="og:image" content="@yield('hero_image')"/>
<meta name="twitter:image" content="@yield('hero_image')"/>
@else
<meta property="og:image" content="@yield('hero_image')"/>
<meta name="twitter:image" content="@yield('hero_image')"/>
@if (View::hasSection('hero_image'))
<meta property="og:image" content="@yield('hero_image')" />
<meta property="twitter:image" content="@yield('hero_image')" />
@endif

<meta name="csrf-token" content="{{ csrf_token() }}">

<!-- Twitter card -->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:description" content="@yield('description')"/>
<meta name="twitter:title" content="@yield('title')"/>
<meta name="twitter:site" content="@yield('twitter_id', '@fitzmuseum_uk')"/>
<meta name="twitter:creator" content="@yield('twitter_id', '@fitzmuseum_uk')"/>
<meta name="twitter:card" content="summary" />
<meta name="twitter:description" content="@yield('description')" />
<meta name="twitter:title" content="@yield('title')" />
<meta name="twitter:site" content="@yield('twitter_id', '@fitzmuseum_uk')" />
<meta name="twitter:creator" content="@yield('twitter_id', '@fitzmuseum_uk')" />

<!-- DNS prefetches -->
<link rel="dns-prefetch" href="//fonts.googleapis.com">
Expand All @@ -54,7 +51,7 @@
-->

<!-- Humans text -->
<link type="text/plain" rel="author" href="{{ URL::to('/humans.txt') }}"/>
<link type="text/plain" rel="author" href="{{ URL::to('/humans.txt') }}" />
<!-- end of humans.txt -->

<script type="application/ld+json">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/support/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@section('title', $page['title'])
@section('description', $page['meta_description'])
@section('keywords', $page['meta_keywords'])

@section('hero_image', $page['hero_image']['data']['thumbnails'][10]['url'])
@include('includes.structure.name-spaces')

@php
Expand Down

0 comments on commit f647252

Please sign in to comment.