Skip to content

Commit 7712dfa

Browse files
committed
Merge branch 'asset-mapper' into v2
2 parents 68c8a3f + 8a37840 commit 7712dfa

25 files changed

+616
-455
lines changed

.env

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
1616

1717
SUPPORT_EMAIL=[email protected]
18-
1918
2019

20+
# DEPRECATED
21+
22+
23+
24+
2125
FSR_KOM_ACCOUNT_ID=0
2226

2327
# The email address from which all automatic notifications should be sent

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ public/uploads/*
4141
###> phpstan/phpstan ###
4242
phpstan.neon
4343
###< phpstan/phpstan ###
44+
45+
###> symfony/asset-mapper ###
46+
/public/assets/
47+
/assets/vendor/
48+
###< symfony/asset-mapper ###

assets/bootstrap.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { startStimulusApp } from '@symfony/stimulus-bundle';
2+
3+
const app = startStimulusApp();
4+
// register any custom, 3rd party controllers here
5+
// app.register('some_controller_name', SomeImportedController);

assets/controllers.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"controllers": {
3+
"@symfony/ux-autocomplete": {
4+
"autocomplete": {
5+
"enabled": true,
6+
"fetch": "eager",
7+
"autoimport": {
8+
"tom-select/dist/css/tom-select.default.css": true,
9+
"tom-select/dist/css/tom-select.bootstrap4.css": false,
10+
"tom-select/dist/css/tom-select.bootstrap5.css": true
11+
}
12+
}
13+
}
14+
},
15+
"entrypoints": []
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Controller } from '@hotwired/stimulus';
2+
3+
/*
4+
* This is an example Stimulus controller!
5+
*
6+
* Any element with a data-controller="hello" attribute will cause
7+
* this controller to be executed. The name "hello" comes from the filename:
8+
* hello_controller.js -> "hello"
9+
*
10+
* Delete this file or adapt it for your use!
11+
*/
12+
export default class extends Controller {
13+
connect() {
14+
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
15+
}
16+
}

assets/frontend.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Welcome to your app's main JavaScript file!
3+
*
4+
* This file will be included onto the page via the importmap() Twig function,
5+
* which should already be in your base.html.twig.
6+
*/
7+
import './styles/frontend.css';
8+
9+
//Default CSS
10+
import 'bootstrap/dist/css/bootstrap.min.css';
11+
import '@fortawesome/fontawesome-free/css/solid.min.css';
12+
import '@fortawesome/fontawesome-free/css/fontawesome.min.css';
13+
14+
import "bootstrap";
15+
import * as bootstrap from "bootstrap";
16+
17+
//Load stimulus
18+
import "./bootstrap.js";
19+
20+
//Show flash messages
21+
document.addEventListener('DOMContentLoaded', function () {
22+
const toastElList = [].slice.call(document.querySelectorAll('.toast'))
23+
const toastList = toastElList.map(function (toastEl) {
24+
return new bootstrap.Toast(toastEl)
25+
})
26+
toastList.forEach(toast => toast.show())
27+
});

public/styles.css renamed to assets/styles/frontend.css

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,11 @@
1616
z-index: 1030;
1717
}
1818

19-
20-
:root {
21-
--border-radius: 4px;
22-
--border-width: 1px;
23-
--border-style: solid;
24-
--border-color: #e3e7ee;
25-
}
26-
2719
fieldset {
28-
background: var(--fieldset-bg);
29-
border: var(--border-width) var(--border-style) var(--border-color);
30-
border-radius: var(--border-radius);
31-
margin: 10px 0;
32-
padding: 10px 20px 15px;
20+
/* background: var(--fieldset-bg); */
21+
border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
22+
border-radius: var(--bs-border-radius) !important;
23+
padding: 10px 20px 15px !important;
3324
}
3425

3526
fieldset>legend {
@@ -40,6 +31,7 @@ fieldset>legend {
4031
margin: 0 0 5px -5px;
4132
padding: 0 5px;
4233
width: auto;
34+
float: none;
4335
}
4436

4537
legend {
@@ -61,16 +53,17 @@ legend {
6153
background-color: #f5f5f5;
6254
}
6355

64-
.form-group .col-form-label.required:after, .form-group label.required:after {
56+
form .col-form-label.required:after, form label.required:after {
6557
bottom: 4px;
66-
color: var(--color-danger);
58+
color: var(--bs-secondary-color);
6759
content: "\2022";
6860
filter: opacity(75%);
6961
position: relative;
7062
right: -2px;
71-
z-index: var(--zindex-700);
63+
z-index: 700;
7264
}
7365

74-
.custom-file-label {
75-
z-index: 0;
66+
/*** Make form-control placeholders italic ***/
67+
.form-control::placeholder {
68+
font-style: italic;
7669
}

composer.json

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"doctrine/orm": "^2.19.5",
1919
"easycorp/easyadmin-bundle": "^4.10.3",
2020
"endroid/qr-code": "^5.0.9",
21-
"fortawesome/font-awesome": "^5.14",
2221
"league/html-to-markdown": "^5.0",
2322
"nelmio/security-bundle": "^v3.3.0",
2423
"nesbot/carbon": "^3.6.0",
@@ -27,12 +26,10 @@
2726
"scheb/2fa-bundle": "^6.8.0",
2827
"scheb/2fa-google-authenticator": "^6.8.0",
2928
"scheb/2fa-trusted-device": "^6.8.0",
30-
"select2/select2": "^4.0",
31-
"slowprog/composer-copy-file": "^0.3.3",
32-
"snapappointments/bootstrap-select": "^1.13",
3329
"stevegrunwell/mailto-link-formatter": "^1.0",
3430
"symfony/apache-pack": "^1.0",
3531
"symfony/asset": "6.4.*",
32+
"symfony/asset-mapper": "6.4.*",
3633
"symfony/console": "6.4.*",
3734
"symfony/dotenv": "6.4.*",
3835
"symfony/expression-language": "6.4.*",
@@ -54,16 +51,17 @@
5451
"symfony/runtime": "6.4.*",
5552
"symfony/security-bundle": "6.4.*",
5653
"symfony/serializer": "6.4.*",
54+
"symfony/stimulus-bundle": "^2.19",
5755
"symfony/string": "6.4.*",
5856
"symfony/translation": "6.4.*",
5957
"symfony/twig-bridge": "6.4.*",
6058
"symfony/twig-bundle": "6.4.*",
59+
"symfony/ux-autocomplete": "^2.19",
6160
"symfony/validator": "6.4.*",
6261
"symfony/web-link": "6.4.*",
6362
"symfony/yaml": "6.4.*",
6463
"symfonycasts/reset-password-bundle": "^1.6",
6564
"tecnickcom/tcpdf": "^6.3",
66-
"twbs/bootstrap": "^v5.3.3",
6765
"twig/cssinliner-extra": "^3.0",
6866
"twig/extra-bundle": "^3.0",
6967
"twig/inky-extra": "^3.0",
@@ -133,15 +131,14 @@
133131
"scripts": {
134132
"auto-scripts": {
135133
"cache:clear": "symfony-cmd",
136-
"assets:install %PUBLIC_DIR%": "symfony-cmd"
134+
"assets:install %PUBLIC_DIR%": "symfony-cmd",
135+
"importmap:install": "symfony-cmd"
137136
},
138137
"post-install-cmd": [
139-
"@auto-scripts",
140-
"SlowProg\\CopyFile\\ScriptHandler::copy"
138+
"@auto-scripts"
141139
],
142140
"post-update-cmd": [
143-
"@auto-scripts",
144-
"SlowProg\\CopyFile\\ScriptHandler::copy"
141+
"@auto-scripts"
145142
],
146143
"phpstan": "vendor/bin/phpstan analyse src --memory-limit 1G --level 3"
147144
},
@@ -152,18 +149,6 @@
152149
"symfony": {
153150
"allow-contrib": false,
154151
"require": "6.4.*"
155-
},
156-
"copy-file": {
157-
"vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js": "public/assets/js/bootstrap.js",
158-
"vendor/twbs/bootstrap/dist/css/bootstrap.min.css": "public/assets/css/bootstrap.css",
159-
"vendor/snapappointments/bootstrap-select/dist/css/bootstrap-select.min.css": "public/assets/css/bootstrap-select.css",
160-
"vendor/snapappointments/bootstrap-select/dist/js/bootstrap-select.min.js": "public/assets/js/bootstrap-select.js",
161-
"vendor/components/jquery/jquery.slim.min.js": "public/assets/js/jquery.slim.js",
162-
"vendor/fortawesome/font-awesome/css/all.min.css": "public/assets/css/fa-all.css",
163-
"vendor/fortawesome/font-awesome/webfonts/": "public/assets/webfonts/",
164-
165-
"vendor/select2/select2/dist/css/select2.min.css": "public/assets/css/select2.min.css",
166-
"vendor/select2/select2/dist/js/select2.full.min.js": "public/assets/js/select2.full.min.js"
167152
}
168153
}
169154
}

0 commit comments

Comments
 (0)