Added ads, adblocker, fixed scrollbar, fixed route and asset links of blog
This commit is contained in:
@@ -62,3 +62,6 @@
|
||||
.mailbox-min-height {
|
||||
min-height: 60vh;
|
||||
}
|
||||
.magic-box {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
@@ -129,3 +129,29 @@ window.addEventListener("printFile", function (event) {
|
||||
printWindow.print();
|
||||
printWindow.close();
|
||||
});
|
||||
|
||||
(function detectAdBlockReal() {
|
||||
const bait = document.createElement('div');
|
||||
bait.className = 'adsbygoogle ad-banner ad-unit';
|
||||
bait.style.cssText = 'width: 1px; height: 1px; position: absolute; left: -9999px;';
|
||||
document.body.appendChild(bait);
|
||||
|
||||
setTimeout(() => {
|
||||
const baitBlocked =
|
||||
!bait ||
|
||||
bait.offsetParent === null ||
|
||||
bait.offsetHeight === 0 ||
|
||||
window.getComputedStyle(bait).getPropertyValue('display') === 'none' ||
|
||||
window.getComputedStyle(bait).getPropertyValue('visibility') === 'hidden';
|
||||
|
||||
if (baitBlocked) {
|
||||
const elementShow = document.getElementById('sidebar-magic');
|
||||
elementShow.classList.remove('hidden');
|
||||
window.adBlockDetected = true;
|
||||
} else {
|
||||
window.adBlockDetected = false;
|
||||
}
|
||||
|
||||
bait.remove();
|
||||
}, 100);
|
||||
})();
|
||||
|
||||
@@ -28,14 +28,13 @@
|
||||
<body class="min-h-screen bg-white dark:bg-zinc-800">
|
||||
<flux:sidebar sticky stashable class="bg-zinc-50 dark:bg-zinc-900 border-r rtl:border-r-0 rtl:border-l border-zinc-200 dark:border-zinc-700">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" />
|
||||
<a class="flex items-center px-2 py-2 cursor-pointer" href="{{ route('home') }}" wire:navigate>
|
||||
<a class="flex items-center px-2 py-2 cursor-pointer" href="{{ route('home') }}">
|
||||
<img src="{{ asset('images/zemail-logo-light.webp') }}" class="dark:hidden" alt="logo"/>
|
||||
<img src="{{ asset('images/zemail-logo-dark.webp') }}" class="hidden dark:flex" alt="logo"/>
|
||||
</a>
|
||||
|
||||
<flux:navlist variant="outline">
|
||||
<flux:button class="cursor-pointer inbox-btn" variant="filled" icon="inbox" x-on:click="window.location.href = '{{ route('mailbox') }}'">{{ __('Inbox') }}</flux:button>
|
||||
{{-- <flux:button class="mt-2 cursor-pointer" variant="filled" icon="refresh-cw" x-on:click="Livewire.dispatch('fetchMessages')">Refresh</flux:button>--}}
|
||||
<button type="button" class="relative items-center font-medium justify-center gap-2 whitespace-nowrap disabled:opacity-75 dark:disabled:opacity-75 disabled:cursor-default disabled:pointer-events-none h-10 text-sm rounded-lg px-4 inline-flex bg-zinc-800/5 hover:bg-zinc-800/10 dark:bg-white/10 dark:hover:bg-white/20 text-zinc-800 dark:text-white [[data-flux-button-group]_&]:border-e [:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-e-0 [[data-flux-button-group]_&]:border-zinc-200/80 dark:[[data-flux-button-group]_&]:border-zinc-900/50 mt-2 cursor-pointer" data-flux-button="data-flux-button" data-flux-group-target="data-flux-group-target" x-on:click="Livewire.dispatch('fetchMessages'); document.getElementById('refresh-icon').classList.add('animate-spin')">
|
||||
<svg id="refresh-icon" class="shrink-0 [:where(&)]:size-4" data-flux-icon="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path>
|
||||
@@ -47,7 +46,12 @@
|
||||
{{ __('Refresh') }}
|
||||
</button>
|
||||
</flux:navlist>
|
||||
<img src="https://placehold.co/300x250?font=roboto" alt="sideAds" />
|
||||
<div id="sidebar-magic" class="items-center border-1 dark:border-zinc-800 border-zinc-200 hidden">
|
||||
<p class="px-6 py-4 text-sm dark:bg-zinc-900 bg-zinc-100 dark:text-white accent-zinc-700">Support us by disabling ad blockеrs on our site 🙏</p>
|
||||
</div>
|
||||
<div class="magic-box overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->one !!}
|
||||
</div>
|
||||
<flux:spacer />
|
||||
<flux:navlist variant="outline">
|
||||
@if(config('app.menus'))
|
||||
@@ -59,7 +63,7 @@
|
||||
@endif
|
||||
<flux:separator variant="subtle" />
|
||||
</flux:navlist>
|
||||
<p class="text-sm font-medium">© {{ config('app.settings.app_name') }}</p>
|
||||
<p class="text-sm font-medium dark:text-white accent-zinc-700">© {{ config('app.settings.app_name') }}</p>
|
||||
</flux:sidebar>
|
||||
|
||||
<flux:header sticky container class="bg-zinc-50 dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-700">
|
||||
@@ -69,7 +73,6 @@
|
||||
<livewire:frontend.email type="header"/>
|
||||
<flux:spacer />
|
||||
<flux:navbar class="me-4">
|
||||
|
||||
<flux:dropdown position="top" align="start">
|
||||
<flux:tooltip content="Language">
|
||||
<flux:button x-data x-on:click="" icon="language" variant="subtle" aria-label="Language" />
|
||||
@@ -84,7 +87,10 @@
|
||||
</flux:dropdown>
|
||||
|
||||
<flux:tooltip content="Switch Theme">
|
||||
<flux:button x-data x-on:click="$flux.dark = ! $flux.dark" icon="moon" variant="subtle" aria-label="Toggle dark mode" />
|
||||
<flux:button x-on:click="$flux.dark = ! $flux.dark" variant="subtle" aria-label="Toggle dark mode">
|
||||
<flux:icon.sun x-show="$flux.appearance === 'dark'" variant="mini" />
|
||||
<flux:icon.moon x-show="$flux.appearance === 'light'" variant="mini" />
|
||||
</flux:button>
|
||||
</flux:tooltip>
|
||||
<flux:dropdown position="top" align="start">
|
||||
<flux:tooltip content="Account">
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
<span class="w-full">
|
||||
<img class="min-w-full px-4 pt-4 sm:pt-6 sm:px-6 rounded-tl-4xl rounded-tr-4xl rounded-bl-3xl rounded-br-3xl" src="/{{ $postDetail->post_image }}" alt="{{ $postDetail->post }}" />
|
||||
</span>
|
||||
<div class="flex w-full items-center justify-center px-4 py-4 sm:px-6">
|
||||
<div class="magic-box my-2 px-4 sm:px-6 min-w-full flex flex-col items-center overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->two !!}
|
||||
</div>
|
||||
<div class="flex w-full items-center justify-center px-4 py-2 sm:px-6">
|
||||
<flux:text>{!! $postDetail->content !!}</flux:text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
<div x-show="!show" class="list">
|
||||
<flux:heading class="mb-3" size="xl" level="1">Inbox</flux:heading>
|
||||
<div class="mb-3"></div>
|
||||
@foreach(array_reverse($messages) as $message)
|
||||
@foreach(array_reverse($messages) as $i => $message)
|
||||
@if($i % 5 == 0 && json_decode(config('app.settings.ads_settings'))->five)
|
||||
<div class="magic-box my-2 min-w-full flex flex-col items-center overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->five !!}
|
||||
</div>
|
||||
@endif
|
||||
<div class="inbox-list cursor-pointer" x-on:click="show = true; id = {{ $message['id'] }};" data-id="{{ $message['id'] }}">
|
||||
<div class="block rounded-lg bg-white shadow-md dark:bg-zinc-700 text-left">
|
||||
<div class="flex items-center px-4 py-4 sm:px-6">
|
||||
@@ -112,11 +117,16 @@
|
||||
</time>
|
||||
</div>
|
||||
</div>
|
||||
<div class="magic-box mt-3 min-w-full flex flex-col items-center overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->three !!}
|
||||
</div>
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<iframe srcdoc="{{ $message['content'] }}" class="w-full iframe-min-height">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="magic-box mt-3 min-w-full flex flex-col items-center overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->four !!}
|
||||
</div>
|
||||
@if (count($message['attachments']) > 0)
|
||||
<div class="grid grid-cols-1 mt-2 text-sm leading-5 text-gray-900 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2">
|
||||
@foreach ($message['attachments'] as $attachment)
|
||||
@@ -144,7 +154,6 @@
|
||||
@else
|
||||
<flux:heading class="mb-3" size="xl" level="1">Inbox</flux:heading>
|
||||
<div class="mb-3"></div>
|
||||
|
||||
<div class="block rounded-lg bg-white shadow-md dark:bg-zinc-700 items-center">
|
||||
<div class="flex mailbox-min-height w-full items-center justify-center px-4 py-4 sm:px-6">
|
||||
<div class="waitingBox flex flex-col items-center relative -space-y-4">
|
||||
@@ -160,6 +169,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="magic-box mt-3 min-w-full flex flex-col items-center overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->two !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -83,14 +83,14 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 p-1">
|
||||
|
||||
@foreach(config('app.blogs') as $blog)
|
||||
<a wire:navigate href="/blog/{{ $blog->slug }}">
|
||||
<a wire:navigate href="{{ route('blog', $blog->slug) }}">
|
||||
<div class="flex items-center">
|
||||
<div class="group relative mx-auto w-96 overflow-hidden rounded-[16px] dark:bg-zinc-800 bg-zinc-200 p-[1px] ease-in-out hover:bg-gradient-to-r hover:from-zinc-600 hover:via-zinc-800 hover:to-zinc-700">
|
||||
<div class="group-hover:animate-spin-slow invisible absolute -top-40 -bottom-40 left-10 right-10 bg-gradient-to-r from-transparent via-gray-600 to-transparent group-hover:visible"></div>
|
||||
<div class="relative rounded-[15px] dark:bg-zinc-900 bg-zinc-100 dark:text-white text-accent-content p-6">
|
||||
<div class="space-y-4">
|
||||
<p class="font-md text-slate-500">
|
||||
<img src="/{{ $blog->post_image }}" class="card-img-top" alt="{{ $blog->slug }}">
|
||||
<img src="{{ asset($blog->post_image) }}" class="card-img-top" alt="{{ $blog->slug }}">
|
||||
</p>
|
||||
<p class="text-lg font-semibold dark:text-white text-accent-content truncate">{{ $blog->post }}</p>
|
||||
</div>
|
||||
|
||||
@@ -28,4 +28,7 @@
|
||||
<flux:text>{!! $page->content !!}</flux:text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="magic-box mt-3 min-w-full flex flex-col items-center overflow-auto">
|
||||
{!! json_decode(config('app.settings.ads_settings'))->two !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user