elektronikamaster blade auth

This commit is contained in:
merdan 2024-07-17 12:47:32 +05:00
parent 95aa2ec6e8
commit 2dbd2af067
3 changed files with 41 additions and 48 deletions

View File

@ -7,10 +7,9 @@
} }
$cart = cart()->getCart(); $cart = cart()->getCart();
?> ?>
<my-mobile-nav></my-mobile-nav> <my-mobile-nav></my-mobile-nav>
@push('scripts') @push('scripts')
@auth('customer')
<script type="text/x-template" id="profile-btn-template"> <script type="text/x-template" id="profile-btn-template">
<div class="login logged-true logged" @click.prevent="toggleProfileDropdown"> <div class="login logged-true logged" @click.prevent="toggleProfileDropdown">
<button type="button" class="nav-link"> <button type="button" class="nav-link">
@ -21,7 +20,18 @@
</button> </button>
</div> </div>
</script> </script>
<script>
Vue.component('profile-btn', {
template: '#profile-btn-template',
methods: {
toggleProfileDropdown() {
let obj = document.querySelector('.profile-dropdown')
obj.classList.toggle('shown')
}
}
})
</script>
@endauth
<script type="text/x-template" id="my-mobile-nav-template"> <script type="text/x-template" id="my-mobile-nav-template">
<nav class="nav-block container"> <nav class="nav-block container">
<div class="burger-mobile" @click.capture="closeMobileMenu($event)"> <div class="burger-mobile" @click.capture="closeMobileMenu($event)">
@ -313,21 +323,8 @@
</div> </div>
</nav> </nav>
</script> </script>
<script>
</script>
<script>
Vue.component('profile-btn', {
template: '#profile-btn-template',
methods: {
toggleProfileDropdown() {
let obj = document.querySelector('.profile-dropdown')
obj.classList.toggle('shown')
}
}
})
</script>
<script> <script>
Vue.component('my-mobile-nav', { Vue.component('my-mobile-nav', {

View File

@ -19,12 +19,9 @@
<div class="flag-wrapper"> <div class="flag-wrapper">
<img src="{{ core()->getCurrentLocale()->image_url }}" alt="" width="30" height="20" /> <img src="{{ core()->getCurrentLocale()->image_url }}" alt="" width="30" height="20" />
</div> </div>
<div class="language-wrapper"> <div class="language-wrapper">
<span class="language">{{ core()->getCurrentLocale()->name }}</span> <span class="language">{{ core()->getCurrentLocale()->name }}</span>
<ul class="language-list hidden" id="locale-switcher" onchange="window.location.href = this.value" <ul class="language-list hidden" id="locale-switcher" onchange="window.location.href = this.value">
@if (count(core()->getCurrentChannel()->locales) == 1) disabled="disabled" @endif>
@foreach (core()->getCurrentChannel()->locales as $locale) @foreach (core()->getCurrentChannel()->locales as $locale)
@if (isset($serachQuery)) @if (isset($serachQuery))
<li class="language-el" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}><a href="?{{ $serachQuery }}&locale={{ $locale->code }}">{{ $locale->name }}</a></li> <li class="language-el" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}><a href="?{{ $serachQuery }}&locale={{ $locale->code }}">{{ $locale->name }}</a></li>

View File

@ -9,24 +9,23 @@
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="content-language" content="{{ app()->getLocale() }}"> <meta http-equiv="content-language" content="{{ app()->getLocale() }}">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
@if ($favicon = core()->getCurrentChannel()->favicon_url) @if ($favicon = core()->getCurrentChannel()->favicon_url)
<link rel="icon" sizes="16x16" href="{{ $favicon }}" /> <link rel="icon" sizes="16x16" href="{{ $favicon }}" />
@else @else
<link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" /> <link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" />
@endif @endif
@yield('head') @yield('head')
@section('seo') @section('seo')
@if (! request()->is('/')) @if (! request()->is('/'))
<meta name="description" content="{{ core()->getCurrentChannel()->description }}"/> <meta name="description" content="{{ core()->getCurrentChannel()->description }}"/>
@endif @endif
@show @show
@stack('css_before') @stack('css_before')
<link rel="stylesheet" href="{{bagisto_asset('styles/style.css')}}" /> <link rel="stylesheet" href="{{bagisto_asset('styles/style.css')}}" />
@stack('css') @stack('css')
<style> <style>
{!! core()->getConfigData('general.content.custom_scripts.custom_css') !!} {!! core()->getConfigData('general.content.custom_scripts.custom_css') !!}
</style> </style>
</head> </head>
<body style="scroll-behavior: smooth;"> <body style="scroll-behavior: smooth;">
@include('shop::layouts.header.top-nav') @include('shop::layouts.header.top-nav')