chore: commit remaining workspace changes
This commit is contained in:
100
resources/views/partials/seo/forum-microdata.blade.php
Normal file
100
resources/views/partials/seo/forum-microdata.blade.php
Normal file
@@ -0,0 +1,100 @@
|
||||
@php
|
||||
$forumMicrodata = is_array($forumMicrodata ?? null) ? $forumMicrodata : null;
|
||||
@endphp
|
||||
|
||||
@if($forumMicrodata)
|
||||
<div class="hidden" aria-hidden="true">
|
||||
@if(($forumMicrodata['kind'] ?? null) === 'topic')
|
||||
<div itemscope itemtype="https://schema.org/DiscussionForumPosting">
|
||||
@if(!empty($forumMicrodata['canonical']))<meta itemprop="mainEntityOfPage" content="{{ $forumMicrodata['canonical'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['canonical']))<meta itemprop="url" content="{{ $forumMicrodata['canonical'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['title']))<meta itemprop="headline" content="{{ $forumMicrodata['title'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['text']))<meta itemprop="text" content="{{ $forumMicrodata['text'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['date_published']))<meta itemprop="datePublished" content="{{ $forumMicrodata['date_published'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['date_modified']))<meta itemprop="dateModified" content="{{ $forumMicrodata['date_modified'] }}" />@endif
|
||||
@if(isset($forumMicrodata['comment_count']))<meta itemprop="commentCount" content="{{ (int) $forumMicrodata['comment_count'] }}" />@endif
|
||||
|
||||
@if(!empty($forumMicrodata['author']))
|
||||
<div itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
@if(!empty($forumMicrodata['author']['url']))<meta itemprop="url" content="{{ $forumMicrodata['author']['url'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['author']['name']))<meta itemprop="name" content="{{ $forumMicrodata['author']['name'] }}" />@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($forumMicrodata['board']))
|
||||
<div itemprop="isPartOf" itemscope itemtype="https://schema.org/WebPage">
|
||||
@if(!empty($forumMicrodata['board']['url']))<meta itemprop="url" content="{{ $forumMicrodata['board']['url'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['board']['name']))<meta itemprop="name" content="{{ $forumMicrodata['board']['name'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['board']['category']))
|
||||
<div itemprop="isPartOf" itemscope itemtype="https://schema.org/WebPage">
|
||||
@if(!empty($forumMicrodata['board']['category']['url']))<meta itemprop="url" content="{{ $forumMicrodata['board']['category']['url'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['board']['category']['name']))<meta itemprop="name" content="{{ $forumMicrodata['board']['category']['name'] }}" />@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@foreach(($forumMicrodata['interactions'] ?? []) as $interaction)
|
||||
<div itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
|
||||
@if(!empty($interaction['type']))<meta itemprop="interactionType" content="{{ $interaction['type'] }}" />@endif
|
||||
@if(isset($interaction['count']))<meta itemprop="userInteractionCount" content="{{ (int) $interaction['count'] }}" />@endif
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@foreach(($forumMicrodata['comments'] ?? []) as $comment)
|
||||
<div itemprop="comment" itemscope itemtype="https://schema.org/Comment">
|
||||
@if(!empty($comment['url']))<meta itemprop="url" content="{{ $comment['url'] }}" />@endif
|
||||
@if(!empty($comment['text']))<meta itemprop="text" content="{{ $comment['text'] }}" />@endif
|
||||
@if(!empty($comment['date_published']))<meta itemprop="datePublished" content="{{ $comment['date_published'] }}" />@endif
|
||||
@if(!empty($comment['date_modified']))<meta itemprop="dateModified" content="{{ $comment['date_modified'] }}" />@endif
|
||||
|
||||
@if(!empty($comment['author']))
|
||||
<div itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
@if(!empty($comment['author']['url']))<meta itemprop="url" content="{{ $comment['author']['url'] }}" />@endif
|
||||
@if(!empty($comment['author']['name']))<meta itemprop="name" content="{{ $comment['author']['name'] }}" />@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@foreach(($comment['interactions'] ?? []) as $interaction)
|
||||
<div itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
|
||||
@if(!empty($interaction['type']))<meta itemprop="interactionType" content="{{ $interaction['type'] }}" />@endif
|
||||
@if(isset($interaction['count']))<meta itemprop="userInteractionCount" content="{{ (int) $interaction['count'] }}" />@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@elseif(($forumMicrodata['kind'] ?? null) === 'collection')
|
||||
<div itemscope itemtype="https://schema.org/CollectionPage">
|
||||
@if(!empty($forumMicrodata['canonical']))<meta itemprop="url" content="{{ $forumMicrodata['canonical'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['name']))<meta itemprop="name" content="{{ $forumMicrodata['name'] }}" />@endif
|
||||
@if(!empty($forumMicrodata['description']))<meta itemprop="description" content="{{ $forumMicrodata['description'] }}" />@endif
|
||||
|
||||
<div itemprop="mainEntity" itemscope itemtype="https://schema.org/ItemList">
|
||||
@if(!empty($forumMicrodata['list_name']))<meta itemprop="name" content="{{ $forumMicrodata['list_name'] }}" />@endif
|
||||
|
||||
@foreach(($forumMicrodata['items'] ?? []) as $index => $item)
|
||||
<div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<meta itemprop="position" content="{{ $index + 1 }}" />
|
||||
<div itemprop="item" itemscope itemtype="https://schema.org/{{ $item['type'] ?? 'WebPage' }}">
|
||||
@if(!empty($item['url']))<meta itemprop="url" content="{{ $item['url'] }}" />@endif
|
||||
@if(!empty($item['title']))<meta itemprop="{{ ($item['type'] ?? null) === 'DiscussionForumPosting' ? 'headline' : 'name' }}" content="{{ $item['title'] }}" />@endif
|
||||
@if(!empty($item['description']))<meta itemprop="description" content="{{ $item['description'] }}" />@endif
|
||||
@if(!empty($item['text']))<meta itemprop="text" content="{{ $item['text'] }}" />@endif
|
||||
@if(!empty($item['date_published']))<meta itemprop="datePublished" content="{{ $item['date_published'] }}" />@endif
|
||||
@if(isset($item['comment_count']))<meta itemprop="commentCount" content="{{ (int) $item['comment_count'] }}" />@endif
|
||||
@if(!empty($item['date_modified']))<meta itemprop="dateModified" content="{{ $item['date_modified'] }}" />@endif
|
||||
@if(!empty($item['author']))
|
||||
<div itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
@if(!empty($item['author']['url']))<meta itemprop="url" content="{{ $item['author']['url'] }}" />@endif
|
||||
@if(!empty($item['author']['name']))<meta itemprop="name" content="{{ $item['author']['name'] }}" />@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
Reference in New Issue
Block a user