43
resources/views/seo/channel-page/channel-content.blade.php
Executable file
43
resources/views/seo/channel-page/channel-content.blade.php
Executable file
@@ -0,0 +1,43 @@
|
||||
@if ($item['model_type'] === 'title')
|
||||
<figure>
|
||||
@if($image = urls()->image($item['poster']))
|
||||
<img
|
||||
src="{{ $image }}"
|
||||
alt="{{ $item['name'] }} poster"
|
||||
width="270px"
|
||||
/>
|
||||
@endif
|
||||
<figcaption>
|
||||
<a href="{{ urls()->title($item) }}">
|
||||
{{ $item['name'] }}
|
||||
</a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
@elseif($item['model_type'] === 'newsArticle')
|
||||
<div>
|
||||
<h2><a href="{{urls()->article($item)}}">{{$item['title']}}</a></h2>
|
||||
<h3>{{$item['byline']}}</h3>
|
||||
<h4>{{$item['source']}}</h4>
|
||||
@if(isset($item['image']))
|
||||
<img src="{{urls()->image($item['image'])}}" alt="Article image">
|
||||
@endif
|
||||
<p>
|
||||
{!!$item['body']!!}
|
||||
</p>
|
||||
</div>
|
||||
@else
|
||||
<figure>
|
||||
@if($image = urls()->image($item['poster']))
|
||||
<img
|
||||
src="{{ $image }}"
|
||||
alt="{{ $item['name'] }} poster"
|
||||
width="270px"
|
||||
/>
|
||||
@endif
|
||||
<figcaption>
|
||||
<a href="{{ urls()->person($item) }}">
|
||||
{{ $item['name'] }}
|
||||
</a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
@endif
|
||||
25
resources/views/seo/channel-page/prerender.blade.php
Executable file
25
resources/views/seo/channel-page/prerender.blade.php
Executable file
@@ -0,0 +1,25 @@
|
||||
@extends('common::prerender.base')
|
||||
|
||||
@section('head')
|
||||
@include('seo.channel-page.seo-tags')
|
||||
@endsection
|
||||
|
||||
@section('body')
|
||||
@include('seo.menu')
|
||||
|
||||
<h1>{{ $channel->name }}</h1>
|
||||
|
||||
<ul style="display: flex; flex-wrap: wrap">
|
||||
@foreach ($channel->content as $item)
|
||||
<li>
|
||||
@if ($item['model_type'] === 'channel')
|
||||
@foreach ($item->content as $subItem)
|
||||
@include('seo.channel-page.channel-content', ['item' => $subItem])
|
||||
@endforeach
|
||||
@else
|
||||
@include('seo.channel-page.channel-content', ['item' => $item])
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endsection
|
||||
28
resources/views/seo/channel-page/seo-tags.blade.php
Executable file
28
resources/views/seo/channel-page/seo-tags.blade.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<meta property="og:site_name" content="{{ settings('branding.site_name') }}" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
@if (isset($channel->config['seoTitle']))
|
||||
<title>{{ $channel->config['seoTitle'] }}</title>
|
||||
<meta property="og:title" content="{{ $channel->config['seoTitle'] }}" />
|
||||
@else
|
||||
<title>{{ settings('branding.site_name') }}</title>
|
||||
@endif
|
||||
|
||||
<meta property="og:url" content="{{ urls()->channel($channel) }}" />
|
||||
<link rel="canonical" href="{{ urls()->channel($channel) }}" />
|
||||
|
||||
@if (isset($channel->config['seoDescription']))
|
||||
<meta
|
||||
property="og:description"
|
||||
content="{{ $channel->config['seoDescription'] }}"
|
||||
/>
|
||||
<meta
|
||||
name="description"
|
||||
content="{{ $channel->config['seoDescription'] }}"
|
||||
/>
|
||||
@endif
|
||||
|
||||
@if (! $channel->public)
|
||||
<meta name="robots" content="noindex" />
|
||||
@endif
|
||||
Reference in New Issue
Block a user