diff --git a/resources/views/partials/head.blade.php b/resources/views/partials/head.blade.php index 6d9b66d..a7a4579 100644 --- a/resources/views/partials/head.blade.php +++ b/resources/views/partials/head.blade.php @@ -1,20 +1,17 @@ + - - @if (Route::currentRouteName() == 'hentai.index') - @if (isset($episode)) - Watch {{ $episode->title }} - {{ $episode->episode }} in 4k, 1080p, UHD, HD for Free - hstream.moe - @elseif (isset($hentai)) - Watch {{ $hentai->episodes[0]->title }} in 4k, 1080p, UHD, HD for Free - hstream.moe - @else - Watch Highest Quality Hentai in 4k, 1080p, UHD, HD for Free - hstream.moe - @endif + + @if (isset($socialSlot)) + {{ $socialSlot }} @else - Watch Highest Quality Hentai in 4k, 1080p, UHD, HD for Free - hstream.moe - + @include('partials.social-home-preview') @endif + + + @@ -37,11 +34,6 @@ - - @if (isset($episode) || isset($hentai)) - @include('partials.social-preview') - @endif - diff --git a/resources/views/partials/social-hentai-preview.blade.php b/resources/views/partials/social-hentai-preview.blade.php new file mode 100644 index 0000000..ddfa35c --- /dev/null +++ b/resources/views/partials/social-hentai-preview.blade.php @@ -0,0 +1,84 @@ +@php + $title = ''; + if (! isset($episode) && isset($hentai)) { + $episode = $hentai->episodes[0]; + $gallery = $episode->gallery; + $title = "{$episode->title} - Watch All Episodes English Subbed in 4K | hstream.moe"; + $canonical = url('/hentai/'.$hentai->slug); + } else { + $title = "{$episode->title} Episode {$episode->episode} - English Subbed 4K Stream | hstream.moe"; + $canonical = url('/hentai/'.$episode->slug); + } + + $description = Str::limit( + preg_replace('/\s+/', ' ', strip_tags($episode->description)), + 160 + ); +@endphp + + +{{ $title }} + + + + + + + + + + + + +@if(isset($gallery) && $episode->gallery->isNotEmpty()) + + + + + + +@endif + + + + + +@if($episode->gallery->isNotEmpty()) + + +@endif + + +@if (!isset($hentai)) +@php + $data = [ + "@context" => "https://schema.org", + "@type" => "VideoObject", + "name" => "$episode->title Episode $episode->episode", + "description" => $description, + "url" => $canonical, + "uploadDate" => $episode->created_at->toIso8601String() + ]; + + if ( $episode->gallery->isNotEmpty() ) { + $data["thumbnailUrl"] = url($episode->gallery[0]->image_url); + } + + $tags = []; + foreach($episode->tags as $tag) { + $tags[] = $tag->name; + } + $data["genre"] = $tags; + + $data["interactionStatistic"] = [ + "@type" => "InteractionCounter", + "interactionType" => [ + "@type" => "WatchAction" + ], + "userInteractionCount" => $episode->view_count + ]; +@endphp + +@endif \ No newline at end of file diff --git a/resources/views/partials/social-home-preview.blade.php b/resources/views/partials/social-home-preview.blade.php new file mode 100644 index 0000000..dd051e5 --- /dev/null +++ b/resources/views/partials/social-home-preview.blade.php @@ -0,0 +1,31 @@ + + +Watch English Subbed Hentai Online in HD & 4K | hstream.moe + + + + +@php + $noIndex = [ + 'hentai.search', + 'playlist.index' + ] +@endphp +@if (in_array(Route::currentRouteName(), $noIndex)) + +@else + +@endif + + + + + + + + + + + + + diff --git a/resources/views/partials/social-preview.blade.php b/resources/views/partials/social-preview.blade.php deleted file mode 100644 index 3b67f2a..0000000 --- a/resources/views/partials/social-preview.blade.php +++ /dev/null @@ -1,52 +0,0 @@ -@if (Route::currentRouteName() == 'hentai.index') -@php - $title = ''; - if (! isset($episode) && isset($hentai)) { - $episode = $hentai->episodes[0]; - $gallery = $episode->gallery; - $title = 'Watch all episodes from '.$episode->title.' in 4k, 2160p, 1080p, UHD, HD - hstream.moe'; - } else { - $title = 'Watch '.$episode->title.' - '.$episode->episode.' in 4k, 2160p, 1080p, UHD, HD - hstream.moe'; - } -@endphp - - - - - -@if(isset($gallery) && $episode->gallery->isNotEmpty()) - -@endif - - - - -@php - $tags = ''; - foreach ($episode->tags as $tag) { - if (!$tags){ - $tags .= $tag->name; - } else { - $tags .= ', '.$tag->name; - } - } -@endphp - - - - -@elseif (Route::currentRouteName() == 'home.index') - - - - - - - - - - - -@else - -@endif diff --git a/resources/views/series/index.blade.php b/resources/views/series/index.blade.php index ddb51aa..02802ea 100644 --- a/resources/views/series/index.blade.php +++ b/resources/views/series/index.blade.php @@ -1,4 +1,9 @@ + + + @include('partials.social-hentai-preview', ['hentai' => $hentai]) + + @php $episode = $hentai->episodes[0]; @endphp
diff --git a/resources/views/stream/index.blade.php b/resources/views/stream/index.blade.php index bc61f5a..8e243cb 100644 --- a/resources/views/stream/index.blade.php +++ b/resources/views/stream/index.blade.php @@ -1,4 +1,9 @@ + + + @include('partials.social-hentai-preview', ['episode' => $episode]) + +
@if($episode->is_dvd_aspect)