我采用了这个应用程序并添加了更多链接到这个菜单,但是无法弄清楚它们是如何设置的,以突出显示活动/聚焦的(实际灰色)。这是刀片代码:
<?php
$actions = array(
['show', 'Overview', '/customer', 'fa-user'],
['edit', 'Change Account Info', '/customer/edit', 'fa-pencil-square-
o'],
['editPassword', 'Change Password', '/customer/edit-password', 'fa-
lock'],
['editCreditCard', (is_null($customer->creditCard) ? 'Enter ' :
'Update '). 'Credit Card', '/customer/edit-credit-card', 'fa-credit-
card'],
['payment', 'Make Payment', '/payments/create', 'fa-money'],
['emailOpting', 'Email Preferences', '/emailOpting/email-opting',
'fa-envelope-o'],
['incident', 'My Support Tickets', '/incidents/index', 'fa-ticket']
);
?>
<div class="element small">
<h2>Actions</h2>
<ul>
@foreach ($actions as $action)
@if (ends_with(Route::currentRouteAction(), $action[0]))
<li><i class="fa {{ $action[3] }}"></i> {{ $action[1] }}</li>
@else
<li>{!! html_entity_decode(Html::link($action[2], '<i class="fa
'.$action[3].'"></i> ' . $action[1])) !!}</li>
@endunless
@endforeach
</ul>
</div>
我已经添加了数组中的最后三个链接,它们可以很好地用作链接,但是在聚焦或活动时不会突出显示。我正在玩html,但它似乎打破了各种方式。访问时,阵列中的前四个链接(概述,更改帐户信息,更改密码和更新信用卡)都会变为灰色。