@php /** * About block at the top of the store's main column. * Mirrors farmart's info-box description toggle: short description visible * by default, full content revealed via "show more". * * Inputs: * $store \Botble\Marketplace\Models\Store */ use Botble\Base\Facades\BaseHelper; $description = trim((string) $store->description); $content = trim((string) $store->content); $cleanDescription = $description !== '' ? BaseHelper::clean($description) : ''; $cleanContent = $content !== '' ? BaseHelper::clean($content) : ''; @endphp @if ($cleanDescription !== '' || $cleanContent !== '') @php($hasMore = $cleanContent !== '' && $cleanDescription !== '' && strip_tags($cleanContent) !== strip_tags($cleanDescription))
@if ($hasMore)
{!! $cleanContent !!}
@endif
{!! $cleanDescription !== '' ? $cleanDescription : $cleanContent !!}
@if ($hasMore) {{ __('show more') }} @endif
{{-- Show more / show less toggle handler lives in assets/js/main.js → storeAboutToggle(). Labels read from data-label-more / data-label-less attributes on the toggle button. --}} @endif