Login Header Painted
This commit is contained in:
parent
cccea73f7d
commit
4ea3627a53
|
|
@ -338,10 +338,9 @@
|
|||
<i class="rango-toggle hamburger"></i>
|
||||
</div>
|
||||
|
||||
<logo-component
|
||||
img-src="{{ core()->getCurrentChannel()->logo_url ?? asset('themes/velocity/assets/images/logo-text.png') }}"
|
||||
redirect-src="{{ route('shop.home.index') }}">
|
||||
</logo-component>
|
||||
<a class="left" href="{{ route('shop.home.index') }}" aria-label="Logo">
|
||||
<img class="logo" src="{{ core()->getCurrentChannel()->logo_url ?? asset('themes/velocity/assets/images/logo-text.png') }}" alt="" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@php
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
direction="{{ core()->getCurrentLocale()->direction }}"
|
||||
default-banner="{{ asset('/themes/velocity/assets/images/banner.webp') }}"
|
||||
:banners="{{ json_encode($sliderData) }}">
|
||||
|
||||
{{-- this is default content if js is not loaded --}}
|
||||
<img class="col-12 no-padding banner-icon" src="{{ asset('/themes/velocity/assets/images/banner.webp') }}" alt=""/>
|
||||
|
||||
</slider-component>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
<header class="sticky-header">
|
||||
<div class="row remove-padding-margin velocity-divide-page">
|
||||
<logo-component
|
||||
add-class="navbar-brand"
|
||||
img-src="{{ core()->getCurrentChannel()->logo_url ?? asset('themes/velocity/assets/images/logo-text.png') }}"
|
||||
redirect-src="{{ route('shop.home.index') }}">
|
||||
</logo-component>
|
||||
|
||||
<a class="left navbar-brand" href="{{ route('shop.home.index') }}" aria-label="Logo">
|
||||
<img class="logo" src="{{ core()->getCurrentChannel()->logo_url ?? asset('themes/velocity/assets/images/logo-text.png') }}" alt="" />
|
||||
</a>
|
||||
|
||||
<searchbar-component></searchbar-component>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -22,6 +20,6 @@
|
|||
document.querySelector('header').classList.remove('header-shadow');
|
||||
}
|
||||
});
|
||||
})()
|
||||
})();
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -66,7 +66,14 @@
|
|||
:header-content="{{ json_encode($velocityContent) }}"
|
||||
heading= "{{ __('velocity::app.menu-navbar.text-category') }}"
|
||||
category-count="{{ $velocityMetaData ? $velocityMetaData->sidebar_category_count : 10 }}"
|
||||
></mobile-header>
|
||||
>
|
||||
|
||||
{{-- this is default content if js is not loaded --}}
|
||||
<a class="left" href="{{ route('shop.home.index') }}" aria-label="Logo">
|
||||
<img class="logo" src="{{ core()->getCurrentChannel()->logo_url ?? asset('themes/velocity/assets/images/logo-text.png') }}" alt="" />
|
||||
</a>
|
||||
|
||||
</mobile-header>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1,134 +1,122 @@
|
|||
{!! view_render_event('bagisto.shop.layout.header.account-item.before') !!}
|
||||
<login-header></login-header>
|
||||
|
||||
<div class="dropdown">
|
||||
<div id="account">
|
||||
<div class="d-inline-block welcome-content" @click="togglePopup">
|
||||
<i class="material-icons align-vertical-top">perm_identity</i>
|
||||
|
||||
<span class="text-center">
|
||||
@guest('customer')
|
||||
{{ __('velocity::app.header.welcome-message', ['customer_name' => trans('velocity::app.header.guest')]) }}!
|
||||
@endguest
|
||||
|
||||
@auth('customer')
|
||||
{{ __('velocity::app.header.welcome-message', ['customer_name' => auth()->guard('customer')->user()->first_name]) }}
|
||||
@endauth
|
||||
</span>
|
||||
|
||||
<span class="select-icon rango-arrow-down"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="account-modal" class="account-modal sensitive-modal hide mt5">
|
||||
@guest('customer')
|
||||
<div class="modal-content">
|
||||
<div class="modal-header no-border pb0">
|
||||
<label class="fs18 grey">{{ __('shop::app.header.title') }}</label>
|
||||
|
||||
<button type="button" class="close disable-box-shadow" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true" class="white-text fs20" @click="togglePopup">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="pl10 fs14">
|
||||
<p>{{ __('shop::app.header.dropdown-text') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div>
|
||||
<a href="{{ route('customer.session.index') }}">
|
||||
<button
|
||||
type="button"
|
||||
class="theme-btn fs14 fw6">
|
||||
|
||||
{{ __('shop::app.header.sign-in') }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="{{ route('customer.register.index') }}">
|
||||
<button
|
||||
type="button"
|
||||
class="theme-btn fs14 fw6">
|
||||
{{ __('shop::app.header.sign-up') }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endguest
|
||||
|
||||
@auth('customer')
|
||||
<div class="modal-content customer-options">
|
||||
<div class="customer-session">
|
||||
<label class="">
|
||||
{{ auth()->guard('customer')->user()->first_name }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<ul type="none">
|
||||
<li>
|
||||
<a href="{{ route('customer.profile.index') }}" class="unset">{{ __('shop::app.header.profile') }}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.orders.index') }}" class="unset">{{ __('velocity::app.shop.general.orders') }}</a>
|
||||
</li>
|
||||
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
|
||||
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}" class="unset">{{ __('shop::app.header.wishlist') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($showCompare)
|
||||
<li>
|
||||
<a href="{{ route('velocity.customer.product.compare') }}" class="unset">{{ __('velocity::app.customer.compare.text') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.session.destroy') }}" class="unset">{{ __('shop::app.header.logout') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.account-item.after') !!}
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="login-header-template">
|
||||
<div class="dropdown">
|
||||
<div id="account">
|
||||
<div class="d-inline-block welcome-content" @click="togglePopup">
|
||||
<i class="material-icons align-vertical-top">perm_identity</i>
|
||||
<span class="text-center">
|
||||
@guest('customer')
|
||||
{{ __('velocity::app.header.welcome-message', ['customer_name' => trans('velocity::app.header.guest')]) }}!
|
||||
@endguest
|
||||
<script>
|
||||
function togglePopup(event) {
|
||||
let accountModal = $('#account-modal');
|
||||
|
||||
@auth('customer')
|
||||
{{ __('velocity::app.header.welcome-message', ['customer_name' => auth()->guard('customer')->user()->first_name]) }}
|
||||
@endauth
|
||||
</span>
|
||||
<span class="select-icon rango-arrow-down"></span>
|
||||
</div>
|
||||
</div>
|
||||
let modal = $('#cart-modal-content');
|
||||
|
||||
<div class="account-modal sensitive-modal hide mt5">
|
||||
@guest('customer')
|
||||
<div class="modal-content">
|
||||
<!-- header -->
|
||||
<div class="modal-header no-border pb0">
|
||||
<label class="fs18 grey">{{ __('shop::app.header.title') }}</label>
|
||||
if (modal) modal.addClass('hide');
|
||||
|
||||
<button type="button" class="close disable-box-shadow" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true" class="white-text fs20" @click="togglePopup">×</span>
|
||||
</button>
|
||||
</div>
|
||||
accountModal.toggleClass('hide');
|
||||
|
||||
<!-- body -->
|
||||
<div class="pl10 fs14">
|
||||
<p>{{ __('shop::app.header.dropdown-text') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- footer -->
|
||||
<div class="modal-footer">
|
||||
<div>
|
||||
<a href="{{ route('customer.session.index') }}">
|
||||
<button
|
||||
type="button"
|
||||
class="theme-btn fs14 fw6">
|
||||
|
||||
{{ __('shop::app.header.sign-in') }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="{{ route('customer.register.index') }}">
|
||||
<button
|
||||
type="button"
|
||||
class="theme-btn fs14 fw6">
|
||||
{{ __('shop::app.header.sign-up') }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endguest
|
||||
|
||||
@auth('customer')
|
||||
<div class="modal-content customer-options">
|
||||
<div class="customer-session">
|
||||
<label class="">
|
||||
{{ auth()->guard('customer')->user()->first_name }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<ul type="none">
|
||||
<li>
|
||||
<a href="{{ route('customer.profile.index') }}" class="unset">{{ __('shop::app.header.profile') }}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.orders.index') }}" class="unset">{{ __('velocity::app.shop.general.orders') }}</a>
|
||||
</li>
|
||||
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
|
||||
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}" class="unset">{{ __('shop::app.header.wishlist') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($showCompare)
|
||||
<li>
|
||||
<a href="{{ route('velocity.customer.product.compare') }}" class="unset">{{ __('velocity::app.customer.compare.text') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.session.destroy') }}" class="unset">{{ __('shop::app.header.logout') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
event.stopPropagation();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
Vue.component('login-header', {
|
||||
template: '#login-header-template',
|
||||
|
||||
methods: {
|
||||
togglePopup: function (event) {
|
||||
let accountModal = this.$el.querySelector('.account-modal');
|
||||
let modal = $('#cart-modal-content')[0];
|
||||
|
||||
if (modal)
|
||||
modal.classList.add('hide');
|
||||
|
||||
accountModal.classList.toggle('hide');
|
||||
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@endpush
|
||||
Loading…
Reference in New Issue