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">
<img id="Lazy"
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 }}"
alt="Bordered avatar">
</div>
@ -108,24 +108,30 @@ class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none
</ul>
</div>
@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))
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($blog as $blogValue)
<li class="py-3 sm:py-4">
<div class="flex items-center space-x-4">
<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">
</div>
<div class="flex-1 min-w-0">
<p class="text-sm font-bold text-gray-900 truncate dark:text-white">
{{ $blogValue->blogName }}
</p>
<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">
@foreach($blog as $blogValue)
<li class="py-3 sm:py-4">
<div class="flex items-center space-x-4">
<div class="flex-shrink-0">
<img id="Lazy"
class="w-10 h-10 p-1 rounded-full ring-2 {{ $blogColor[$blogValue->blogSetColor-1]->colorLightType }}
{{ $blogColor[$blogValue->blogSetColor-1]->colorDarkType }} sm:me-4"
src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}"
alt="Bordered avatar">
</div>
<div class="flex-1 min-w-0">
<p class="text-sm font-bold text-gray-900 truncate dark:text-white">
{{ $blogValue->blogName }}
</p>
<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">
<i class="bi bi-pencil"></i>
<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="text-right">{{ $userName }}</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 -->
<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">
<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">
<i class="bi bi-person-rolodex"></i>
<span class="flex-1 ml-3 whitespace-nowrap">管理员</span>
</a>
@if($userAdmin)
<a href="{{ route('console.dashboard') }}"
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">
<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">
<i class="bi bi-person-rolodex"></i>
<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>
</ul>
<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>
<span class="flex-1 ml-3 whitespace-nowrap">登出</span>
</a>