Skip to content

Commit

Permalink
Admin layout tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanscherler committed Jan 10, 2021
1 parent 80e2354 commit a5cc7a7
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 82 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require-dev": {
"mockery/mockery": "^1.4.2",
"orchestra/testbench": "^6.0",
"pestphp/pest": "^0.3",
"pestphp/pest": "^1.0",
"vimeo/psalm": "^4.3",
"psalm/plugin-laravel": "^1.4"
},
Expand Down
149 changes: 82 additions & 67 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/filament.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/filament.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/filament.js": "/js/filament.js?id=575bb8a26dd76080eafa",
"/css/filament.css": "/css/filament.css?id=4800a6c64c508b4b2553"
"/css/filament.css": "/css/filament.css?id=023aff7cc5ff2ee37f96"
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"laravel-mix": "^6.0.9",
"postcss": "^8.2.3",
"postcss": "^8.2.4",
"postcss-import": "^14.0.0",
"postcss-nested": "^5.0.3",
"prettier": "^2.2.1",
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/app-header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
id="banner"
{{ $attributes->merge(['class' => 'bg-gray-900 text-gray-500 flex flex-col space-y-4 shadow-lg md:shadow-none']) }}>
<x-filament::app-branding />
<x-filament-nav />
<x-filament::dropdown class="w-full text-left flex-grow flex items-center p-4 space-x-3 transition-colors duration-200 hover:text-white hover:bg-gray-800" id="dropdown-user">
<x-filament-nav class="flex-grow px-4 overflow-y-auto" />
<x-filament::dropdown class="w-full text-left flex-grow flex items-center px-4 py-3 space-x-3 transition-colors duration-200 hover:text-white hover:bg-gray-800" id="dropdown-user">
<x-filament-avatar :user="Auth::user()" :size="32" class="flex-shrink-0 w-8 h-8 rounded-full" />
<span class="flex-grow text-sm leading-tight font-semibold">{{ Auth::user()->name }}</span>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/nav.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<nav aria-label="primary" class="flex-grow px-4">
<nav aria-label="primary" {{ $attributes }}>
<ol class="space-y-1">
@foreach($nav as $item)
<li>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

@section('content')
<a href="#content" class="sr-only">Skip to content</a>
<div class="relative overflow-hidden flex min-h-screen"
<div class="relative overflow-hidden"
role="group"
tabindex="-1"
x-data="{ headerIsOpen: false }"
@keydown.window.escape="headerIsOpen = false"
x-on:resize.window="if (window.outerWidth > 768) headerIsOpen = false"
>
<div class="flex-shrink-0 flex w-56 absolute md:relative z-20 inset-y-0 transform transition-transform duration-200 md:translate-x-0"
<div class="w-56 fixed z-20 h-screen transform transition-transform duration-200 md:translate-x-0 flex"
:class="headerIsOpen ? 'translate-x-0' : '-translate-x-full'">
<x-filament::app-header class="flex-grow" />
<x-filament::app-header class="flex-grow overflow-y-auto" />
<button
type="button"
aria-controls="banner"
Expand All @@ -26,7 +26,7 @@ class="md:hidden absolute top-2 right-0 transform translate-x-full p-3 text-gray
</button>
</div>
<span class="absolute z-10 inset-0 bg-gray-800 bg-opacity-50 md:hidden" x-cloak x-show="headerIsOpen" @click="headerIsOpen = false"></span>
<div class="flex-grow w-full flex flex-col">
<div class="min-h-screen w-full md:pl-56 flex flex-col">
<header class="p-4 md:p-6 flex justify-between items-center space-x-4">
<div class="flex items-center">
<button type="button" aria-controls="banner" @click.prevent="headerIsOpen = true" :aria-expanded="headerIsOpen" class="md:hidden text-blue-600 hover:text-blue-800 transition-colors duration-200 mr-4">
Expand Down

0 comments on commit a5cc7a7

Please sign in to comment.