@php use App\Library\ComponentLibrary as ComponentLibrary; use \App\Models\Theme\ThemeComponentConstant as ThemeComponentConstant; $themeComponentConstantList=ComponentLibrary::themeComponentConstantList($themeID,$themeComponentRelID); $imagePositions=ThemeComponentConstant::$imagePositions; @endphp @if(count($themeComponentConstantList) > 0) @php $position=$themeComponentConstantList["position"]; $imagePosition="left"; if(!empty($themeComponentConstantList["image_position"])){ $imagePosition=$themeComponentConstantList["image_position"]; if(!array_key_exists($imagePosition,$imagePositions)){ $imagePosition="left"; } } $margin=sprintf("margin:%spx %spx %spx %spx",$detail["margin_top"],$detail["margin_right"],$detail["margin_bottom"],$detail["margin_left"]); $padding=sprintf("padding:%spx %spx %spx %spx",$detail["padding_top"],$detail["padding_right"],$detail["padding_bottom"],$detail["padding_left"]); $bgColor=sprintf('background-color:%s',$detail["bg_color"]); @endphp
@if($imagePosition==="left") @if(!empty($themeComponentConstantList["image_url"]))
{!! $themeComponentConstantList[
@endif

{!! $themeComponentConstantList["title"] !!}

{!! $themeComponentConstantList["description"] !!} @if(!empty($themeComponentConstantList["link"])) {!! trans('theme/component.constant.read_more') !!} @endif
@elseif($imagePosition==="right")

{!! $themeComponentConstantList["title"] !!}

{!! $themeComponentConstantList["description"] !!} @if(!empty($themeComponentConstantList["link"])) {!! trans('theme/component.constant.read_more') !!} @endif
@if(!empty($themeComponentConstantList["image_url"]))
{!! $themeComponentConstantList[
@endif @endif
@endif