@php // column count $count = 0; if (isset($footer['main'])) { foreach ($footer['main'] as $key => $value) { if (is_array($value) && $value['status']) { $count++; } } } @endphp @if (isActive('Popup')) @php $routeName = request()->route()->getName(); $routePage = ['Home' => 'site.index', 'Product Details' => 'site.productDetails', 'Cart' => 'site.cart', 'Checkout' => 'site.checkOut', 'Confirm Order' => 'site.orderConfirm']; $popups = \Modules\Popup\Entities\Popup::getAll()->where('status', 'Active') ->where('start_date', '<=', date("Y-m-d")) ->where('end_date', '>=', date("Y-m-d")) @endphp @foreach ($popups as $key => $popup) @php if (!empty($popup) && $routePage[$popup->page_link] == $routeName) { $content = json_decode($popup->param); // Default content $arr = ['Center' => "top: 50%; left: 50%; transform: translate(-50%, -50%);", 'Top Left' => "top: 0; left: 0;", 'Top Right' => "top: 0; right: 0;", 'Bottom Left' => "bottom: 0; left: 0;", 'Bottom Right' => "bottom: 0; right: 0;"]; $style = "height: {$content->height}px; width: {$content->width}px;"; $style .= $arr[$content->position]; if ($content->background == 'Color') { $style .= "background: {$content->popup_bg_color};"; } else { $file = getBackgroundImage($popup->fileUrl()); $style .= "background-image: url({$file}); background-size: cover;"; } // Default content end if ($popup->type == 'Another page link') { $btnStyle = "--textHoverColor: {$content->button_hover_text_color}; --bgHoverColor: {$content->button_hover_bg_color};"; $btnStyle .= "color: {$content->button_text_color};"; $btnStyle .= "background: {$content->button_bg_color};"; $btnStyle .= "margin: " . (!empty($content->button_margin_top) ? $content->button_margin_top : 0) . 'px ' . (!empty($content->button_margin_right) ? $content->button_margin_right : 0) . 'px ' . (!empty($content->button_margin_bottom) ? $content->button_margin_bottom : 0) . 'px ' . (!empty($content->button_margin_left) ? $content->button_margin_left : 0) . 'px;'; $btnStyle .= "display: inline-block; padding: 8px 16px; border-radius: 5px;"; } else if ($popup->type == 'Send mail') { $mailStyle = "margin: " . (!empty($content->email_margin_top) ? $content->email_margin_top : 0) . 'px ' . (!empty($content->email_margin_right) ? $content->email_margin_right : 0) . 'px ' . (!empty($content->email_margin_bottom) ? $content->email_margin_bottom : 0) . 'px ' . (!empty($content->email_button_margin_left) ? $content->email_button_margin_left : 0) . 'px;'; } else if ($popup->type == 'Subscribed') { $subscribeStyle = "margin: " . (!empty($content->subscription_margin_top) ? $content->subscription_margin_top : 0) . 'px ' . (!empty($content->subscription_margin_right) ? $content->subscription_margin_right : 0) . 'px ' . (!empty($content->subscription_margin_bottom) ? $content->subscription_margin_bottom : 0) . 'px ' . (!empty($content->subscription_button_margin_left) ? $content->subscription_button_margin_left : 0) . 'px;'; } } @endphp @if (!empty($popup) && $routePage[$popup->page_link] == $routeName)
show_time }} data-loginRequired = "{{ $popup->login_enabled }}" data-isLogin = "{{ auth()->user() ? 'true' : 'false' }}" data-popupPage = {{ $routePage[$popup->page_link] == $routeName ? 'true' : 'false' }} class="close-modal close-popup-window">X @foreach ($content->text as $text) @php $textStyle = " word-break: break-word; color: $text->text_color; font-size: {$text->text_size}px; margin: " . (!empty($text->text_margin_top) ? $text->text_margin_top : 0) . 'px ' . (!empty($text->text_margin_right) ? $text->text_margin_right : 0) . 'px ' . (!empty($text->text_margin_bottom) ? $text->text_margin_bottom : 0) . 'px ' . (!empty($text->text_margin_left) ? $text->text_margin_left : 0) . 'px;' . "text-align: $text->text_alignment; "; if ($text->text_font_weight == 'italic') { $textStyle .= "font-style: italic;"; } else { $textStyle .= "font-weight: $text->text_font_weight;"; } @endphp
{{ $text->text }}
@endforeach @if ($popup->type == 'Another page link') {{ $content->button_title }} @elseif ($popup->type == 'Send mail')
@csrf
@elseif ($popup->type == 'Subscribed')
@csrf
@endif
@endif @endforeach @endif @php $direction = ['left' => 'justify-start', 'center' => 'justify-center', 'right' => 'justify-end']; @endphp @if ($count)
@endif
@if ($footer['bottom']['status'])

{!! isset($footer['bottom']['title']) ? $footer['bottom']['title'] : '' !!}

@endif