@extends('themes.one.master') @section('title') {{ __('Creativity Details') }} @endsection @section('content') @php use Carbon\Carbon; $date = $artical['date'] ?? null; $fromTime = $artical['from_time'] ?? null; $toTime = $artical['to_time'] ?? null; $dateLabel = $date ? Carbon::parse($date)->format('d M, Y') : ''; $fromLabel = $fromTime ? Carbon::parse($fromTime)->format('g:i A') : ''; $toLabel = $toTime ? Carbon::parse($toTime)->format('g:i A') : ''; $img = $artical['image'] ?? null; $embed = $artical['embed_url'] ?? null; if ($embed) { if (preg_match('~youtu\.be/([^?&]+)~i', $embed, $m)) { $embed = 'https://www.youtube.com/embed/' . $m[1]; } elseif (preg_match('~watch\?v=([^&]+)~i', $embed, $m)) { $embed = 'https://www.youtube.com/embed/' . $m[1]; } } @endphp
@if ($img && $embed) @elseif (!$img && $embed)
@else @if ($img) {{ $artical['title'] }} @endif @endif
{{ transField($artical, 'title') }}
@if($dateLabel || $fromLabel || $toLabel)
    @if ($dateLabel)
  • {{ $dateLabel }}
  • @endif @if ($fromLabel || $toLabel)
  • {{ $fromLabel }}@if($fromLabel || $toLabel) - @endif{{ $toLabel }}
  • @endif
@endif
{!! transField($artical, 'long_desc') !!}
@include('themes.one.sections.subscribe') @endsection