ヘッダーのドロップダウンメニューの中身を別ファイルに分割
This commit is contained in:
parent
d7d2bc2397
commit
be098c38cb
15
resources/views/components/header-dropdown-menu.blade.php
Normal file
15
resources/views/components/header-dropdown-menu.blade.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<a href="{{ route('user.profile', ['name' => Auth::user()->name]) }}" class="dropdown-item">
|
||||||
|
<strong>{{ Auth::user()->display_name }}</strong>
|
||||||
|
<p class="mb-0 text-muted">
|
||||||
|
<span>@{{ Auth::user()->name }}</span>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a href="{{ route('user.profile', ['name' => Auth::user()->name]) }}" class="dropdown-item">プロフィール</a>
|
||||||
|
<a href="{{ route('user.likes', ['name' => Auth::user()->name]) }}" class="dropdown-item">いいね</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a href="{{ route('setting') }}" class="dropdown-item">設定</a>
|
||||||
|
@can ('admin')
|
||||||
|
<a href="{{ route('admin.dashboard') }}" class="dropdown-item">管理</a>
|
||||||
|
@endcan
|
||||||
|
<a href="{{ route('logout') }}" class="dropdown-item" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">ログアウト</a>
|
@ -43,21 +43,7 @@
|
|||||||
<img src="{{ Auth::user()->getProfileImageUrl(30) }}" srcset="{{ Formatter::profileImageSrcSet(Auth::user(), 30) }}" width="30" height="30" class="rounded d-inline-block align-top">
|
<img src="{{ Auth::user()->getProfileImageUrl(30) }}" srcset="{{ Formatter::profileImageSrcSet(Auth::user(), 30) }}" width="30" height="30" class="rounded d-inline-block align-top">
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right position-absolute" aria-labelledby="navbarDropdownMenuLink" id="navbarAccountDropdownSp">
|
<div class="dropdown-menu dropdown-menu-right position-absolute" aria-labelledby="navbarDropdownMenuLink" id="navbarAccountDropdownSp">
|
||||||
<a href="{{ route('user.profile', ['name' => Auth::user()->name]) }}" class="dropdown-item text-truncate">
|
@include('components.header-dropdown-menu')
|
||||||
<strong>{{ Auth::user()->display_name }}</strong>
|
|
||||||
<p class="mb-0 text-muted">
|
|
||||||
<span>@{{ Auth::user()->name }}</span>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a href="{{ route('user.profile', ['name' => Auth::user()->name]) }}" class="dropdown-item">プロフィール</a>
|
|
||||||
<a href="{{ route('user.likes', ['name' => Auth::user()->name]) }}" class="dropdown-item">いいね</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a href="{{ route('setting') }}" class="dropdown-item">設定</a>
|
|
||||||
@can ('admin')
|
|
||||||
<a href="{{ route('admin.dashboard') }}" class="dropdown-item">管理</a>
|
|
||||||
@endcan
|
|
||||||
<a href="{{ route('logout') }}" class="dropdown-item" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">ログアウト</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -106,21 +92,7 @@
|
|||||||
<img src="{{ Auth::user()->getProfileImageUrl(30) }}" srcset="{{ Formatter::profileImageSrcSet(Auth::user(), 30) }}" width="30" height="30" class="rounded d-inline-block align-top">
|
<img src="{{ Auth::user()->getProfileImageUrl(30) }}" srcset="{{ Formatter::profileImageSrcSet(Auth::user(), 30) }}" width="30" height="30" class="rounded d-inline-block align-top">
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
|
||||||
<a href="{{ route('user.profile', ['name' => Auth::user()->name]) }}" class="dropdown-item">
|
@include('components.header-dropdown-menu')
|
||||||
<strong>{{ Auth::user()->display_name }}</strong>
|
|
||||||
<p class="mb-0 text-muted">
|
|
||||||
<span>@{{ Auth::user()->name }}</span>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a href="{{ route('user.profile', ['name' => Auth::user()->name]) }}" class="dropdown-item">プロフィール</a>
|
|
||||||
<a href="{{ route('user.likes', ['name' => Auth::user()->name]) }}" class="dropdown-item">いいね</a>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a href="{{ route('setting') }}" class="dropdown-item">設定</a>
|
|
||||||
@can ('admin')
|
|
||||||
<a href="{{ route('admin.dashboard') }}" class="dropdown-item">管理</a>
|
|
||||||
@endcan
|
|
||||||
<a href="{{ route('logout') }}" class="dropdown-item" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">ログアウト</a>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user