10
assets/app.js
Normal file
10
assets/app.js
Normal file
@ -0,0 +1,10 @@
|
||||
import './bootstrap.js';
|
||||
/*
|
||||
* Welcome to your app's main JavaScript file!
|
||||
*
|
||||
* This file will be included onto the page via the importmap() Twig function,
|
||||
* which should already be in your base.html.twig.
|
||||
*/
|
||||
import './styles/app.css';
|
||||
|
||||
console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉');
|
5
assets/bootstrap.js
vendored
Normal file
5
assets/bootstrap.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
||||
|
||||
const app = startStimulusApp();
|
||||
// register any custom, 3rd party controllers here
|
||||
// app.register('some_controller_name', SomeImportedController);
|
4
assets/controllers.json
Normal file
4
assets/controllers.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"controllers": [],
|
||||
"entrypoints": []
|
||||
}
|
10
assets/controllers/upload_file_controller.js
Normal file
10
assets/controllers/upload_file_controller.js
Normal file
@ -0,0 +1,10 @@
|
||||
import { Controller } from '@hotwired/stimulus';
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
console.log(this.element);
|
||||
this.element.querySelector('input').addEventListener('change', () => {
|
||||
this.element.querySelector('button[type="submit"]').click();
|
||||
});
|
||||
}
|
||||
}
|
1
assets/icons/file/default.svg
Normal file
1
assets/icons/file/default.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M13 9V3.5L18.5 9M6 2c-1.11 0-2 .89-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/></svg>
|
After Width: | Height: | Size: 203 B |
3
assets/icons/file/upload.svg
Normal file
3
assets/icons/file/upload.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg class="w-8 h-8 mb-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 16">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 400 B |
1
assets/icons/folder/closed.svg
Normal file
1
assets/icons/folder/closed.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 24 24"><path fill="currentColor" d="M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h6l2 2h8q.825 0 1.413.588T22 8v10q0 .825-.587 1.413T20 20z"/></svg>
|
After Width: | Height: | Size: 173 B |
3
assets/styles/app.css
Normal file
3
assets/styles/app.css
Normal file
@ -0,0 +1,3 @@
|
||||
body {
|
||||
background-color: transparent;
|
||||
}
|
Reference in New Issue
Block a user