Skip to content

Commit

Permalink
Merge pull request #76 from lara-zeus/update-assets
Browse files Browse the repository at this point in the history
add nav assets
  • Loading branch information
atmonshi authored Nov 2, 2023
2 parents 2b7fa34 + 22958c0 commit 07b64a7
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 114 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '^8.1'
coverage: none

- name: Install composer dependencies
Expand Down
221 changes: 113 additions & 108 deletions composer.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"purge": "filament-purge -i ./resources/dist/filament-tail.css -o ./resources/dist/lara-zeus.css -v 3.x"
},
"devDependencies": {
"sortablejs": "^1.15.0",
"@tailwindcss/forms": "^0.5.6",
"@tailwindcss/typography": "^0.5.10",
"alpinejs": "^3.13.0",
Expand Down
2 changes: 1 addition & 1 deletion resources/dist/filament-tail.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/dist/frontend.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/dist/lara-zeus.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions resources/dist/plugin.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions resources/dist/plugin.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**!
* Sortable 1.15.0
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
*/
24 changes: 24 additions & 0 deletions resources/js/plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Sortable from 'sortablejs'

document.addEventListener('alpine:initializing', () => {
window.Alpine.data('navigationSortableContainer', ({ statePath }) => ({
statePath,
sortable: null,
init() {
this.sortable = new Sortable(this.$el, {
group: 'nested',
animation: 150,
fallbackOnBody: true,
swapThreshold: 0.50,
draggable: '[data-sortable-item]',
handle: '[data-sortable-handle]',
onSort: () => {
this.sorted()
}
})
},
sorted() {
this.$wire.sortNavigation(this.statePath, this.sortable.toArray())
}
}))
})
5 changes: 3 additions & 2 deletions resources/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"/dist/frontend.css": "/dist/frontend.css?id=a40e52a4dd2d4a10a560fc2a31bcca58",
"/dist/filament-tail.css": "/dist/filament-tail.css?id=d47ca6ee10d3571b29d555fecff2269e"
"/dist/plugin.js": "/dist/plugin.js?id=d8eae76b5e99023184aa18c28e75a3e1",
"/dist/frontend.css": "/dist/frontend.css?id=b7453bf0fd646c6eb11fa33d139303d9",
"/dist/filament-tail.css": "/dist/filament-tail.css?id=ab7af5d8158a0129916aecc9d3de4c12"
}
2 changes: 2 additions & 0 deletions src/CoreServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Composer\InstalledVersions;
use Filament\Support\Assets\Css;
use Filament\Support\Assets\Js;
use Filament\Support\Facades\FilamentAsset;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Support\Facades\App;
Expand Down Expand Up @@ -44,6 +45,7 @@ public function packageBooted(): void

FilamentAsset::register([
Css::make('filament-lara-zeus', __DIR__ . '/../resources/dist/lara-zeus.css'),
Js::make('filament-lara-zeus', __DIR__ . '/../resources/dist/plugin.js'),
], 'lara-zeus');
}

Expand Down
1 change: 1 addition & 0 deletions tailwind-filament.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
// Wind
'../wind/src/Filament/Resources/LetterResource.php',
// Sky
'../sky/resources/views/components/nav-item.blade.php',
'../sky/resources/views/filament/**/*.blade.php',
'../sky/src/Models/PostStatus.php',
// Rain
Expand Down
2 changes: 2 additions & 0 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ mix
tailwindcss("./tailwind-frontend.config.js"),
])

.js('resources/js/plugin.js', 'resources/dist/plugin.js')

.setPublicPath('resources')
;

Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5131,6 +5131,11 @@ sockjs@^0.3.24:
uuid "^8.3.2"
websocket-driver "^0.7.4"

sortablejs@^1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.15.0.tgz#53230b8aa3502bb77a29e2005808ffdb4a5f7e2a"
integrity sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==

source-list-map@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
Expand Down

0 comments on commit 07b64a7

Please sign in to comment.