mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 23:52:31 -05:00
Add a more feature-specific body class to dashboard pages
This commit is contained in:
parent
40f4ca4f7f
commit
bbd6aeb68d
1 changed files with 7 additions and 1 deletions
|
@ -40,7 +40,13 @@
|
|||
@endif
|
||||
</head>
|
||||
|
||||
<body class="page-{{ Request::path() == '/' ? 'index' : preg_replace('/\/.*/', '', Request::path()) }} {{ $device_mobile ? 'mobile-browser' : 'desktop-browser' }}">
|
||||
@if(preg_match('/^dashboard/', Request::path()))
|
||||
@set('body_class', preg_replace([ '/\/(new|[0-9][0-9]*)$/', '/\//' ], [ '', '-' ], Request::path()))
|
||||
@else
|
||||
@set('body_class', Request::path() == '/' ? 'index' : preg_replace('/\/.*/', '', Request::path()))
|
||||
@endif
|
||||
|
||||
<body class="page-{{ $body_class }} {{ $device_mobile ? 'mobile-browser' : 'desktop-browser' }}">
|
||||
@yield('page-top')
|
||||
|
||||
<div id="page-content">
|
||||
|
|
Loading…
Reference in a new issue