optimized firefooter

pull/49/head
A1Gard 4 months ago
parent 42c9b0453c
commit 73fc73dd6b

@ -747,7 +747,7 @@ function getSettingsGroup($group)
$result = []; $result = [];
foreach (Setting::where('key', 'LIKE', $group . '%') foreach (Setting::where('key', 'LIKE', $group . '%')
->whereNotNull('value')->get(['key', 'value']) as $r) { ->whereNotNull('value')->get(['key', 'value']) as $r) {
if ($r->value != null) { if ($r->value != null && $r->value != '') {
$result[substr($r->key, mb_strlen($group))] = $r->value; $result[substr($r->key, mb_strlen($group))] = $r->value;
} }
} }

@ -275,8 +275,7 @@
{{getSetting($data->area->name.'_'.$data->part.'_title2')}} {{getSetting($data->area->name.'_'.$data->part.'_title2')}}
</h3> </h3>
<ul> <ul>
@foreach( getGroupBySetting($data->area->name.'_'.$data->part.'_group')->posts()->limit(5)->get() as $post ) @foreach( getGroupPostsBySetting($data->area->name.'_'.$data->part.'_group',5) as $post )
<li> <li>
<a href="{{$post->webUrl()}}"> <a href="{{$post->webUrl()}}">
{{Str::limit($post->title,40)}} {{Str::limit($post->title,40)}}
@ -291,9 +290,9 @@
</div> </div>
</div> </div>
<div class="p2 text-center"> <div class="p2 text-center">
<ul class="justify-content-center d-flex social"> <ul class="social text-center">
@foreach(getSettingsGroup('social_')??[] as $k => $social) @foreach(getSettingsGroup('social_')??[] as $k => $social)
<li class="mx-3"> <li class="d-inline-block mx-2">
<a href="{{$social}}"> <a href="{{$social}}">
<i class="ri-{{$k}}-line"></i> <i class="ri-{{$k}}-line"></i>
</a> </a>

Loading…
Cancel
Save