Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add named assets and SRI hashes to assets #5720

Open
wants to merge 8 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"require": {
"laravel/framework": "^10.0|^11.0",
"prologue/alerts": "^1.0",
"backpack/basset": "^1.1.1|^1.3.2",
"backpack/basset": "dev-next as 1.99.99",
"creativeorange/gravatar": "~1.0",
"doctrine/dbal": "^3.0|^4.0",
"guzzlehttp/guzzle": "^7.0"
Expand Down
65 changes: 63 additions & 2 deletions src/BackpackServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,67 @@ public function boot(Router $router)
$this->sendUsageStats();

Basset::addViewPath(realpath(__DIR__.'/resources/views'));

Basset::map('bp-jquery', 'https://unpkg.com/[email protected]/dist/jquery.min.js', ['integrity' => 'sha384-i61gTtaoovXtAbKjo903+O55Jkn2+RtzHtvNez+yI49HAASvznhe9sZyjaSHTau9', 'crossorigin' => 'anonymous']);
Basset::map('bp-popper-js', 'https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js', ['integrity' => 'sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3', 'crossorigin' => 'anonymous']);
Basset::map('bp-summernote-css', 'https://unpkg.com/[email protected]/dist/summernote-lite.min.css', ['integrity' => 'sha384-vmPR5F5DxvnVZxuw9+hxaSj8MDX3rP49GZu/JvPS1qYD2xeg+0TGJUJ/H6e/HTkV', 'crossorigin' => 'anonymous']);
Basset::map('bp-summernote-woof', 'https://unpkg.com/[email protected]/dist/font/summernote.woff2', ['integrity' => 'sha384-jin6VSG0kKkHctWc/DhVx2PL8YqVcnWvrAcqrTkLdi9evxi77MNjsgSUqbNGWijo', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-js', 'https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js', ['integrity' => 'sha384-t11ZTRbO9om+k0pVXmc3c8SsIHonT3oUvoi3FxMm1c9DVQwl9VbTNv3+UjbUrI6Z', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-bootstrap-js', 'https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.min.js', ['integrity' => 'sha384-bHpoWS7HfBjbqWmqPFVsEwT0EyCKgMw/hbKswCjYLSLS+TyPUAG51MTMIXgy/4Pl', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-bootstrap-css', 'https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.min.css', ['integrity' => 'sha384-GADhaOJCr6lsUqdHJnYcH/QaARzVT92beGzAYxLTSoxUorHjQZci1FW+X9BqbnE3', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-responsive-js', 'https://cdn.datatables.net/responsive/2.4.0/js/dataTables.responsive.min.js', ['integrity' => 'sha384-yYqZ2Jue83rlzHS23Jp/xwZjRZ9KQCACGR5lhhWFtDIQeBMwAuav+irRqSKrucSP', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-responsive-css', 'https://cdn.datatables.net/responsive/2.4.0/css/responsive.dataTables.min.css', ['integrity' => 'sha384-cWgz6YKDgXz/mTomsnOIXd/1s0iivK+FhwVdmzN0ErdazMmt4RieKmZXMWdwScEm', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-fixedheader-js', 'https://cdn.datatables.net/fixedheader/3.3.1/js/dataTables.fixedHeader.min.js', ['integrity' => 'sha384-PeR7ate8YuUE8EYJp3d9zNrgSm9jFJL1b2Hrb8Za0RtVj6YMU8IZlyBwlRjiXq0i', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-fixedheader-css', 'https://cdn.datatables.net/fixedheader/3.3.1/css/fixedHeader.dataTables.min.css', ['integrity' => 'sha384-g0QDiyi3I9zPzO1O8mvkZd0/MWDKDs8Lk+pHQo3+kkTJEFTdzDCwjqIuoOG+yG0q', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-buttons-bs5-css', 'https://cdn.datatables.net/buttons/2.3.3/css/buttons.bootstrap5.min.css', ['integrity' => 'sha384-vLlNBaHuV6cqBlVjiJITSKkzOaeomPYdKV54KsyxIF88PDfOKqDRzlHSe5FVMe/4', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-dt-buttons-bs5-js', 'https://cdn.datatables.net/buttons/2.3.3/js/dataTables.buttons.min.js', ['integrity' => 'sha384-4UCu2Y40paen66DRD9HqMQTQDFzPOPrHQQ3Hj3il7NOYMVE9+8PKV9YqrNjOvB+G', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-buttons-bs5-js', 'https://cdn.datatables.net/buttons/2.3.3/js/buttons.bootstrap5.min.js', ['integrity' => 'sha384-ydNsKc6RC3ZCjn9sUZuBlPsIf/bBKmjNuYZZzBTvNag/JKDcIlRstd/eU+ZifNxM', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-jszip', 'https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js', ['integrity' => 'sha384-yib/J8n+cev8VyEYY+4A3nSvnqCRhEkxUQhVFp8X+YuIXd0qhT3rTYXqel0zWzni', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-pdfmake', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.18/pdfmake.min.js', ['integrity' => 'sha384-7B0GkWcyEmGJnsHkE0Z0cCpXaUS9i1tFM1/e0jAKoxA2YkI2XYaZdCOJo0kBBsS5', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-pdfmake-fonts', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.18/vfs_fonts.js', ['integrity' => 'sha384-Zu5dDR1DhOW4Qpz55vgv84xMQSt0V2nX/rGj309pIyhOnc2KHssTcYszIjiYUjYL', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-html5-button', 'https://cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js', ['integrity' => 'sha384-+KP6ruIqPlKDSU+EJ+oMlSh7cUCDWe2rHFaGVL4iHG4plXJaco2DetEl6yOrugqf', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-print-button', 'https://cdn.datatables.net/buttons/2.3.2/js/buttons.print.min.js', ['integrity' => 'sha384-5MVvNT5w7ht9uU89ZuYPDHs3Yap4hV/h/cPjiKBHdbS2pDKuY4ADmve/XwXN5oPQ', 'crossorigin' => 'anonymous']);
Basset::map('bp-datatables-colvis-button', 'https://cdn.datatables.net/buttons/2.3.2/js/buttons.colVis.min.js', ['integrity' => 'sha384-iWhT+VbS/XoLnEHwlRhpwgeNPjEFIs88MypVWxe99IVGqXljIX4vdFLr3fAbRGHM', 'crossorigin' => 'anonymous']);
Basset::map('bp-urijs', 'https://unpkg.com/[email protected]/src/URI.min.js', ['integrity' => 'sha384-VS1T95+I9NZNIjvlP0D/3HRlU1sKmoBzh71Pt08ckCdxEM2++7QEdbbp/3gi20js', 'crossorigin' => 'anonymous']);
Basset::map('bp-highlight-js', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js', ['integrity' => 'sha512-gU7kztaQEl7SHJyraPfZLQCNnrKdaQi5ndOyt4L4UPL/FHDd/uB9Je6KDARIqwnNNE27hnqoWLBq+Kpe4iHfeQ==', 'crossorigin' => 'anonymous']);
Basset::map('bp-highlight-css', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/base16/dracula.min.css', ['integrity' => 'sha512-GfRggx2Wc+POEPR0asMTNTyNug3rWJ9Jp4wxnHZ5VApMOUJRK4cEaRriXsx5tV1DakKHQWQ2noCbuzFiPJaYqA==', 'crossorigin' => 'anonymous']);
Basset::map('bp-animate-css', 'https://unpkg.com/[email protected]/animate.compat.css', ['integrity' => 'sha384-B6emdNLLuHwwngyCsBGzzo6MQPmSygQu5cG4lfUfdSxzj0FJVJZu+7GOmB8/NHpd', 'crossorigin' => 'anonymous']);
Basset::map('bp-noty-css', 'https://unpkg.com/[email protected]/lib/noty.css', ['integrity' => 'sha384-J/zBMo8aKN23nuimkvPbkLpGS1Uf1eCha++IoQfNVUpYCjvkuzLqO9nc4wizNAsv', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-css', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css', ['integrity' => 'sha512-vebUliqxrVkBy3gucMhClmyQP9On/HAWQdKDXRaAlb/FKuTbxkjPKUyqVOxAcGwFDka79eTF+YXwfke1h3/wfg==', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-regular-400', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.woff2', ['integrity' => 'sha384-2MTGaE1Ew+cNL5I7ilrE0E2sXLiuf90OL5DDceb5boJQOSLbVZCEHWpUPpvdOF4Z', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-solid-900', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.woff2', ['integrity' => 'sha384-6Y7zlEnVxM1wRcJx7qtpAK54L2QoP4CcAaosx1EKa3QOLvq0LjT7Fus7E9IDidgR', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-brands-400', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.woff2', ['integrity' => 'sha384-4EZZRKjFRNbc6sX193USv6Is1dJHSHzcGtijtyeUV2KQFRhVgpeWsrebTKu7RKEl', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-regular-400-woff', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.woff', ['integrity' => 'sha384-Pu6x4bfCQDro/gELWySVvZ04SlesuYt1QlQH2zvv1i43+7E6HkUIGGOixPLtP3XX', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-solid-900-woff', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.woff', ['integrity' => 'sha384-Ik+er7DjVwGt6ex3J05QtimAVRCq1JxCWf+t5n7fW80EAQS99uIIk+FJfIRy8sSN', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-brands-400-woff', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.woff', ['integrity' => 'sha384-gamww7YJnsFRoFVACJb6kLAoK2emK2ZIuoZgyvBM4kaEPEu3xDE/ivmXQmrYKp+l', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-regular-400-ttf', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.ttf', ['integrity' => 'sha384-1zzwN3v7UDtBGkTNjIFcNTy1U3dQTa5nix6OaV0CY5YXqxhlXDm0dum9bWOfpbqF', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-solid-900-ttf', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.ttf', ['integrity' => 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.ttf', 'crossorigin' => 'anonymous']);
Basset::map('bp-lineawesome-brands-400-ttf', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.ttf', ['integrity' => 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.ttf', 'crossorigin' => 'anonymous']);
Basset::map('bp-summernote-js', 'https://unpkg.com/[email protected]/dist/summernote-lite.min.js', ['integrity' => 'sha384-fq3mhgSZ+13XGKx7olcZUFWes9hDmAR3b/WnNLKH6fRFsHonf6CGG+Dj1wypCgLq', 'crossorigin' => 'anonymous']);
Basset::map('bp-noty-js', 'https://unpkg.com/[email protected]/lib/noty.min.js', ['integrity' => 'sha384-z7oxDqgQB0ThPzpmEjy9pcQT5oLRWvagLjZypnMIdKqBBLLvKNINZdifoEEPmrn1', 'crossorigin' => 'anonymous']);
Basset::map('bp-sweet-alert-js', 'https://unpkg.com/[email protected]/dist/sweetalert.min.js', ['integrity' => 'sha384-RIQuldGV8mnjGdob13cay/K1AJa+LR7VKHqSXrrB5DPGryn4pMUXRLh92Ev8KlGF', 'crossorigin' => 'anonymous']);
Basset::map('bp-bootstrap4-js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.min.js', ['integrity' => 'sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g==', 'crossorigin' => 'anonymous']);
Basset::map('bp-bootstrap5-js', 'https://unpkg.com/[email protected]/dist/js/bootstrap.min.js', ['integrity' => 'sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V', 'crossorigin' => 'anonymous']);

foreach (config('backpack.ui.styles', []) as $style) {
if (is_array($style)) {
foreach ($style as $file) {
Basset::map($file);
}
} else {
Basset::map($style);
}
}

foreach (config('backpack.ui.scripts', []) as $script) {
if (is_array($script)) {
foreach ($script as $file) {
Basset::map($file);
}
} else {
Basset::map($script);
}
}
}

/**
Expand Down Expand Up @@ -177,7 +238,7 @@ public function publishFiles()
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @param Router $router
* @return void
*/
public function setupRoutes(Router $router)
Expand All @@ -196,7 +257,7 @@ public function setupRoutes(Router $router)
/**
* Load custom routes file.
*
* @param \Illuminate\Routing\Router $router
* @param Router $router
* @return void
*/
public function setupCustomRoutes(Router $router)
Expand Down
19 changes: 19 additions & 0 deletions src/ThemeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,25 @@ public function loadViews()

// Add basset view path
Basset::addViewPath($this->packageViewsPath());
foreach (config($this->vendorNameDotPackageName().'.styles', []) as $path) {
if (is_array($path)) {
foreach ($path as $style) {
Basset::map($style, $style);
}
} else {
Basset::map($path, $path);
}
}

foreach (config($this->vendorNameDotPackageName().'.scripts', []) as $path) {
if (is_array($path)) {
foreach ($path as $script) {
Basset::map($script, $script);
}
} else {
Basset::map($path, $path);
}
}
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/resources/views/crud/fields/summernote.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
{{-- FIELD CSS - will be loaded in the after_styles section --}}
@push('crud_fields_styles')
{{-- include summernote css --}}
@basset('https://unpkg.com/summernote@0.8.20/dist/summernote-lite.min.css')
@basset('https://unpkg.com/summernote@0.8.20/dist/font/summernote.woff2', false)
@basset('bp-summernote-css')
@basset('bp-summernote-woof', false)
@bassetBlock('backpack/crud/fields/summernote-field.css')
<style type="text/css">
.note-editor.note-frame .note-status-output, .note-editor.note-airframe .note-status-output {
Expand All @@ -45,7 +45,7 @@
{{-- FIELD JS - will be loaded in the after_scripts section --}}
@push('crud_fields_scripts')
{{-- include summernote js --}}
@basset('https://unpkg.com/summernote@0.8.20/dist/summernote-lite.min.js')
@basset('bp-summernote-js')
@bassetBlock('backpack/crud/fields/summernote-field.js')
<script>
function bpFieldInitSummernoteElement(element) {
Expand Down
10 changes: 4 additions & 6 deletions src/resources/views/crud/inc/datatables_logic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
@endphp

{{-- DATA TABLES SCRIPT --}}
@basset('https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js')
@basset('https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.min.js')
@basset('https://cdn.datatables.net/responsive/2.4.0/js/dataTables.responsive.min.js')
@basset('https://cdn.datatables.net/responsive/2.4.0/css/responsive.dataTables.min.css')
@basset('https://cdn.datatables.net/fixedheader/3.3.1/js/dataTables.fixedHeader.min.js')
@basset('https://cdn.datatables.net/fixedheader/3.3.1/css/fixedHeader.dataTables.min.css')
@basset('bp-datatables-js')
@basset('bp-datatables-bootstrap-js')
@basset('bp-datatables-responsive-js')
@basset('bp-datatables-fixedheader-js')

@basset(base_path('vendor/backpack/crud/src/resources/assets/img/spinner.svg'), false)

Expand Down
18 changes: 9 additions & 9 deletions src/resources/views/crud/inc/export_buttons.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@if ($crud->exportButtons())
@basset('https://cdn.datatables.net/buttons/2.3.3/css/buttons.bootstrap5.min.css')
@basset('https://cdn.datatables.net/buttons/2.3.3/js/dataTables.buttons.min.js')
@basset('https://cdn.datatables.net/buttons/2.3.3/js/buttons.bootstrap5.min.js')
@basset('https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js')
@basset('https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.18/pdfmake.min.js')
@basset('https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.18/vfs_fonts.js')
@basset('https://cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js')
@basset('https://cdn.datatables.net/buttons/2.3.2/js/buttons.print.min.js')
@basset('https://cdn.datatables.net/buttons/2.3.2/js/buttons.colVis.min.js')
@basset('bp-datatables-buttons-bs5-css')
@basset('bp-datatables-dt-buttons-bs5-js')
@basset('bp-datatables-buttons-bs5-js')
@basset('bp-datatables-jszip')
@basset('bp-datatables-pdfmake')
@basset('bp-datatables-pdfmake-fonts')
@basset('bp-datatables-html5-button')
@basset('bp-datatables-print-button')
@basset('bp-datatables-colvis-button')
<script>
let dataTablesExportStrip = text => {
if ( typeof text !== 'string' ) {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/crud/inc/filters_navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</nav>

@push('crud_list_scripts')
@basset('https://unpkg.com/urijs@1.19.11/src/URI.min.js')
@basset('bp-urijs')
<script>
function addOrUpdateUriParameter(uri, parameter, value) {
var new_url = normalizeAmpersand(uri);
Expand Down
6 changes: 3 additions & 3 deletions src/resources/views/crud/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ class="{{ backpack_theme_config('classes.table') ?? 'table table-striped table-h

@section('after_styles')
{{-- DATA TABLES --}}
@basset('https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.min.css')
@basset('https://cdn.datatables.net/fixedheader/3.3.1/css/fixedHeader.dataTables.min.css')
@basset('https://cdn.datatables.net/responsive/2.4.0/css/responsive.dataTables.min.css')
@basset('bp-datatables-bootstrap-css')
@basset('bp-datatables-fixedheader-css')
@basset('bp-datatables-responsive-css')

{{-- CRUD LIST CONTENT - crud_list_styles stack --}}
@stack('crud_list_styles')
Expand Down
4 changes: 2 additions & 2 deletions src/resources/views/ui/inc/getting_started.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ protected function setupUpdateOperation()
</div>

@push('after_styles')
@basset('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/base16/dracula.min.css')
@basset('bp-highlight-css')
@endpush

@push('after_scripts')
@basset('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js')
@basset('bp-highlight-js')
<script>hljs.highlightAll();</script>
@endpush
12 changes: 7 additions & 5 deletions src/resources/views/ui/inc/scripts.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
@basset('https://unpkg.com/jquery@3.6.1/dist/jquery.min.js')
@basset('https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js')
@basset('https://unpkg.com/[email protected]/lib/noty.min.js')
@basset('https://unpkg.com/[email protected]/dist/sweetalert.min.js')
@basset('bp-jquery')
@basset('bp-popper-js')
@basset('bp-noty-js')
@basset('bp-sweet-alert-js')

@if (backpack_theme_config('scripts') && count(backpack_theme_config('scripts')))
@foreach (backpack_theme_config('scripts') as $path)
@if(is_array($path))
@basset(...$path)
@foreach($path as $script)
@basset($script)
@endforeach
@else
@basset($path)
@endif
Expand Down
28 changes: 15 additions & 13 deletions src/resources/views/ui/inc/styles.blade.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
@basset('https://unpkg.com/animate[email protected]/animate.compat.css')
@basset('https://unpkg.com/[email protected]/lib/noty.css')
@basset('bp-animate-css')
@basset('bp-noty-css')

@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.woff2')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.woff2')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.woff2')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.woff')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.woff')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.woff')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.ttf')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.ttf')
@basset('https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.ttf')
@basset('bp-lineawesome-css')
@basset('bp-lineawesome-regular-400')
@basset('bp-lineawesome-solid-900')
@basset('bp-lineawesome-brands-400')
@basset('bp-lineawesome-regular-400-woff')
@basset('bp-lineawesome-solid-900-woff')
@basset('bp-lineawesome-brands-400-woff')
@basset('bp-lineawesome-regular-400-ttf')
@basset('bp-lineawesome-solid-900-ttf')
@basset('bp-lineawesome-brands-400-ttf')

@basset(base_path('vendor/backpack/crud/src/resources/assets/css/common.css'))

@if (backpack_theme_config('styles') && count(backpack_theme_config('styles')))
@foreach (backpack_theme_config('styles') as $path)
@if(is_array($path))
@basset(...$path)
@foreach($path as $style)
@basset($style)
@endforeach
@else
@basset($path)
@endif
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/ui/widgets/style.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
@endphp

@push($widget['stack'] ?? 'after_styles')
@basset($href, true, $attributes, 'style')
@basset($href, true, $attributes)
@endpush