fix(footer): show visible partners in footer-col and footer-bottom
This commit is contained in:
@@ -1508,6 +1508,34 @@ footer{position:relative}
|
||||
<div id="page-content">@yield('content')</div>
|
||||
|
||||
<footer>
|
||||
@php
|
||||
$__pFile = resource_path('data/partners.json');
|
||||
$__partners = \Illuminate\Support\Facades\Cache::remember(
|
||||
'footer_partners_' . (is_file($__pFile) ? @filemtime($__pFile) : '0'),
|
||||
86400,
|
||||
function () use ($__pFile) {
|
||||
if (! is_file($__pFile)) return [];
|
||||
$rows = json_decode((string) @file_get_contents($__pFile), true);
|
||||
if (! is_array($rows)) return [];
|
||||
return array_values(array_filter($rows, fn ($r) =>
|
||||
is_array($r)
|
||||
&& ! empty($r['url']) && ! empty($r['anchor'])
|
||||
&& filter_var($r['url'], FILTER_VALIDATE_URL)
|
||||
&& preg_match('#^https?://#i', $r['url'])
|
||||
));
|
||||
}
|
||||
);
|
||||
$__visiblePartners = [];
|
||||
$__hiddenPartners = [];
|
||||
foreach ($__partners as $__p) {
|
||||
$__isVisible = !empty($__p['visible']) || (isset($__p['opacity']) && (float)$__p['opacity'] > 0);
|
||||
if ($__isVisible) {
|
||||
$__visiblePartners[] = $__p;
|
||||
} else {
|
||||
$__hiddenPartners[] = $__p;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<div class="footer-in">
|
||||
<div class="footer-brand">
|
||||
<div class="logo">ANIMEXE</div>
|
||||
@@ -1544,35 +1572,22 @@ footer{position:relative}
|
||||
<li><a href="mailto:iletisim@animexe.com">İletişim</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@if(! empty($__visiblePartners))
|
||||
<div class="footer-col">
|
||||
<h5>Partnerler</h5>
|
||||
<ul>
|
||||
@foreach($__visiblePartners as $__vp)
|
||||
<li>
|
||||
<a href="{{ $__vp['url'] }}"
|
||||
@isset($__vp['title']) title="{{ $__vp['title'] }}" @endisset
|
||||
rel="{{ $__vp['rel'] ?? 'dofollow' }} noopener"
|
||||
target="_blank">{{ $__vp['anchor'] }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@php
|
||||
$__pFile = resource_path('data/partners.json');
|
||||
$__partners = \Illuminate\Support\Facades\Cache::remember(
|
||||
'footer_partners_' . (is_file($__pFile) ? @filemtime($__pFile) : '0'),
|
||||
86400,
|
||||
function () use ($__pFile) {
|
||||
if (! is_file($__pFile)) return [];
|
||||
$rows = json_decode((string) @file_get_contents($__pFile), true);
|
||||
if (! is_array($rows)) return [];
|
||||
return array_values(array_filter($rows, fn ($r) =>
|
||||
is_array($r)
|
||||
&& ! empty($r['url']) && ! empty($r['anchor'])
|
||||
&& filter_var($r['url'], FILTER_VALIDATE_URL)
|
||||
&& preg_match('#^https?://#i', $r['url'])
|
||||
));
|
||||
}
|
||||
);
|
||||
$__visiblePartners = [];
|
||||
$__hiddenPartners = [];
|
||||
foreach ($__partners as $__p) {
|
||||
$__isVisible = !empty($__p['visible']) || (isset($__p['opacity']) && (float)$__p['opacity'] > 0);
|
||||
if ($__isVisible) {
|
||||
$__visiblePartners[] = $__p;
|
||||
} else {
|
||||
$__hiddenPartners[] = $__p;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<div class="footer-bottom">
|
||||
<span>© {{ date('Y') }} Animexe — Tüm hakları saklıdır. Platform yalnızca teknik aracı konumundadır; içerikler ilgili hak sahiplerine aittir. · <a href="https://ayris.tech" target="_blank" rel="noopener" style="color:inherit;opacity:.75">Created by ayris.tech</a></span>
|
||||
<span style="display:flex;gap:16px;flex-wrap:wrap;justify-content:flex-end">
|
||||
|
||||
Reference in New Issue
Block a user