AddFeature: 图片显示优化,管理员逻辑控制

添加管理员判断
添加后台颜色列表显示内容

Signed-off-by: XiaoLFeng <gm@x-lf.cn>
This commit is contained in:
筱锋xiao_lfeng 2023-07-09 16:10:13 +08:00
parent 70e9146212
commit 7dae1b0470
2 changed files with 34 additions and 23 deletions

View File

@ -51,7 +51,7 @@ class="text-black dark:text-white">{{ $blogFriendsCheck }}</b> 条</p>
<div class="flex-shrink-0"> <div class="flex-shrink-0">
<img id="Lazy" <img id="Lazy"
class="w-10 h-10 p-1 rounded-full ring-2 {{ $blogColor[$blogValue->blogSetColor-1]->colorLightType }} class="w-10 h-10 p-1 rounded-full ring-2 {{ $blogColor[$blogValue->blogSetColor-1]->colorLightType }}
{{ $blogColor[$blogValue->blogSetColor-1]->colorDarkType }} sm:me-4" {{ $blogColor[$blogValue->blogSetColor-1]->colorDarkType }} sm:me-4"
src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}" src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}"
alt="Bordered avatar"> alt="Bordered avatar">
</div> </div>
@ -108,24 +108,30 @@ class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none
</ul> </ul>
</div> </div>
@elseif(!empty($request->search)) @elseif(!empty($request->search))
<a href="{{ route('console.friends-link.list') }}" type="button" class="text-white mt-4 mb-10 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i class="bi bi-box-arrow-left me-1"></i> 返回友链列表</a> <a href="{{ route('console.friends-link.list') }}" type="button"
class="text-white mt-4 mb-10 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i
class="bi bi-box-arrow-left me-1"></i> 返回友链列表</a>
@if(!empty($blog)) @if(!empty($blog))
<ul class="divide-y divide-gray-200 dark:divide-gray-700"> <ul class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($blog as $blogValue) @foreach($blog as $blogValue)
<li class="py-3 sm:py-4"> <li class="py-3 sm:py-4">
<div class="flex items-center space-x-4"> <div class="flex items-center space-x-4">
<div class="flex-shrink-0"> <div class="flex-shrink-0">
<img id="Lazy" class="w-10 h-10 rounded-full" src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}" alt="Neil image"> <img id="Lazy"
</div> class="w-10 h-10 p-1 rounded-full ring-2 {{ $blogColor[$blogValue->blogSetColor-1]->colorLightType }}
<div class="flex-1 min-w-0"> {{ $blogColor[$blogValue->blogSetColor-1]->colorDarkType }} sm:me-4"
<p class="text-sm font-bold text-gray-900 truncate dark:text-white"> src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}"
{{ $blogValue->blogName }} alt="Bordered avatar">
</p> </div>
<p class="text-sm text-gray-400 truncate dark:text-gray-300"> <div class="flex-1 min-w-0">
<a href="{{ $blogValue->blogUrl }}" target="_blank">{{ $blogValue->blogUrl }}</a> <p class="text-sm font-bold text-gray-900 truncate dark:text-white">
</p> {{ $blogValue->blogName }}
</div> </p>
<a href="?" type="button" class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white"> <p class="text-sm text-gray-400 truncate dark:text-gray-300">
<a href="{{ $blogValue->blogUrl }}" target="_blank">{{ $blogValue->blogUrl }}</a>
</p>
</div>
<a href="?" type="button" class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">
<a href="{{ route('console.friends-link.edit',$blogValue->id) }}" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"> <a href="{{ route('console.friends-link.edit',$blogValue->id) }}" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
<i class="bi bi-pencil"></i> <i class="bi bi-pencil"></i>
<span class="ps-1">编辑</span> <span class="ps-1">编辑</span>

View File

@ -46,15 +46,19 @@ class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray
<div class="font-medium dark:text-white"> <div class="font-medium dark:text-white">
<div class="text-right">{{ $userName }}</div> <div class="text-right">{{ $userName }}</div>
</div> </div>
<img id="avatarButton" type="button" data-dropdown-toggle="userDropdown" data-dropdown-placement="bottom-start" class="w-8 h-8 rounded-full cursor-pointer" src="{{ $userIcon }}" alt=""> <img id="avatarButton" type="button" data-dropdown-toggle="userDropdown" data-dropdown-placement="bottom-start"
class="w-8 h-8 rounded-full cursor-pointer" src="{{ $userIcon }}" alt="">
<!-- Dropdown menu --> <!-- Dropdown menu -->
<div id="userDropdown" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"> <div id="userDropdown" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600">
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="avatarButton"> <ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="avatarButton">
<li> <li>
<a href="{{ route('console.dashboard') }}" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"> @if($userAdmin)
<i class="bi bi-person-rolodex"></i> <a href="{{ route('console.dashboard') }}"
<span class="flex-1 ml-3 whitespace-nowrap">管理员</span> class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">
</a> <i class="bi bi-person-circle"></i>
<span class="flex-1 ml-3 whitespace-nowrap">管理员</span>
</a>
@endif
<a href="#" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"> <a href="#" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">
<i class="bi bi-person-rolodex"></i> <i class="bi bi-person-rolodex"></i>
<span class="flex-1 ml-3 whitespace-nowrap">个人设置</span> <span class="flex-1 ml-3 whitespace-nowrap">个人设置</span>
@ -62,7 +66,8 @@ class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray
</li> </li>
</ul> </ul>
<div class="py-1"> <div class="py-1">
<a href="{{ route('logout') }}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"> <a href="{{ route('logout') }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white">
<i class="bi bi-box-arrow-left"></i> <i class="bi bi-box-arrow-left"></i>
<span class="flex-1 ml-3 whitespace-nowrap">登出</span> <span class="flex-1 ml-3 whitespace-nowrap">登出</span>
</a> </a>