diff --git a/.gitignore b/.gitignore index a0cba48..d5dd081 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,18 @@ node_modules/ /.php-cs-fixer.php /.php-cs-fixer.cache ###< friendsofphp/php-cs-fixer ### + +###> symfony/asset-mapper ### +/public/assets/ +/assets/vendor/ +###< symfony/asset-mapper ### + +###> spomky-labs/pwa-bundle ### +/public/idb +/public/pwa +/public/workbox +/public/favicon.ico +/public/site.webmanifest +/public/site.*.webmanifest +/public/sw.js +###< spomky-labs/pwa-bundle ### diff --git a/assets/styles/app.css b/assets/styles/app.css new file mode 100644 index 0000000..dd6181a --- /dev/null +++ b/assets/styles/app.css @@ -0,0 +1,3 @@ +body { + background-color: skyblue; +} diff --git a/composer.json b/composer.json index ddc8af6..f7d5092 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "nelmio/security-bundle": "^3.9", "phpdocumentor/reflection-docblock": "^6.0", "phpstan/phpdoc-parser": "^2.3", + "spomky-labs/pwa-bundle": "^1.5", "stevenmaguire/oauth2-keycloak": "^6.1", "stripe/stripe-php": "*", "symfony/amazon-mailer": "8.0.*", @@ -91,7 +92,8 @@ "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd" + "assets:install %PUBLIC_DIR%": "symfony-cmd", + "importmap:install": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" diff --git a/composer.lock b/composer.lock index da9c8ed..3360ad0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cb8493c3f2e7f5a5fd9625178d808e03", + "content-hash": "c0065b34464dda1ae6cf59c080b878e6", "packages": [ { "name": "async-aws/core", @@ -266,6 +266,83 @@ ], "time": "2025-12-08T15:06:51+00:00" }, + { + "name": "composer/semver", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2025-08-20T19:15:30+00:00" + }, { "name": "dasprid/enum", "version": "1.0.7", @@ -4249,6 +4326,118 @@ }, "time": "2026-03-03T17:31:43+00:00" }, + { + "name": "spomky-labs/pwa-bundle", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/Spomky-Labs/pwa-bundle.git", + "reference": "af032890aebac9311703edeebef4c3ddb4b36224" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Spomky-Labs/pwa-bundle/zipball/af032890aebac9311703edeebef4c3ddb4b36224", + "reference": "af032890aebac9311703edeebef4c3ddb4b36224", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "phpdocumentor/reflection-docblock": "^5.3|^6.0", + "psr/log": "^1.1|^2.0|^3.0", + "symfony/asset": "^6.4|^7.0|^8.0", + "symfony/asset-mapper": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/deprecation-contracts": "^3.5", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/routing": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^3.0", + "symfony/web-link": "^6.4|^7.0|^8.0", + "twig/twig": "^3.8" + }, + "require-dev": { + "dbrekelmans/bdi": "*", + "matthiasnoback/symfony-config-test": "^5.1|^6.0", + "monolog/monolog": "^3.0", + "nelmio/security-bundle": "^3.3", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/filesystem": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/framework-bundle": "^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/monolog-bridge": "^6.4|^7.0|^8.0", + "symfony/monolog-bundle": "^3.10|^4.0", + "symfony/panther": "^2.3", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/twig-bundle": "^7.0|^8.0", + "symfony/ux-icons": "^2.29", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "suggest": { + "ext-gd": "Required to generate icons (or Imagick).", + "ext-imagick": "Required to generate icons (or GD).", + "symfony/filesystem": "For generating and manipulating icons or screenshots", + "symfony/mime": "For generating and manipulating icons or screenshots", + "symfony/ux-icons": "For using SVG icons (e.g. for shortcuts)" + }, + "type": "symfony-bundle", + "extra": { + "thanks": { + "url": "https://github.com/spomky-labs/pwa-bundle", + "name": "spomky-labs/pwa-bundle" + } + }, + "autoload": { + "psr-4": { + "SpomkyLabs\\PwaBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florent Morselli", + "homepage": "https://github.com/Spomky" + }, + { + "name": "All contributors", + "homepage": "https://github.com/spomky-labs/pwa-bundle/contributors" + } + ], + "description": "Progressive Web App Manifest Generator Bundle for Symfony.", + "homepage": "https://github.com/spomky-labs", + "keywords": [ + "bundle", + "pwa", + "symfony", + "symfony-ux" + ], + "support": { + "issues": "https://github.com/Spomky-Labs/pwa-bundle/issues", + "source": "https://github.com/Spomky-Labs/pwa-bundle/tree/1.5.7" + }, + "funding": [ + { + "url": "https://www.buymeacoffee.com/FlorentMorselli", + "type": "custom" + }, + { + "url": "https://github.com/Spomky", + "type": "github" + }, + { + "url": "https://www.patreon.com/FlorentMorselli", + "type": "patreon" + } + ], + "time": "2026-03-11T08:50:08+00:00" + }, { "name": "stevenmaguire/oauth2-keycloak", "version": "6.1.0", @@ -4510,6 +4699,87 @@ ], "time": "2026-02-09T10:14:57+00:00" }, + { + "name": "symfony/asset-mapper", + "version": "v8.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/asset-mapper.git", + "reference": "80635c3722b9bb5481e0282497ae23796dcd3712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/asset-mapper/zipball/80635c3722b9bb5481e0282497ae23796dcd3712", + "reference": "80635c3722b9bb5481e0282497ae23796dcd3712", + "shasum": "" + }, + "require": { + "composer/semver": "^3.0", + "php": ">=8.4", + "symfony/filesystem": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0" + }, + "require-dev": { + "symfony/asset": "^7.4|^8.0", + "symfony/browser-kit": "^7.4|^8.0", + "symfony/console": "^7.4|^8.0", + "symfony/event-dispatcher-contracts": "^3.0", + "symfony/finder": "^7.4|^8.0", + "symfony/framework-bundle": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/runtime": "^7.4|^8.0", + "symfony/web-link": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\AssetMapper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps directories of assets & makes them available in a public directory with versioned filenames.", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/asset-mapper/tree/v8.0.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-17T13:07:04+00:00" + }, { "name": "symfony/cache", "version": "v8.0.6", @@ -10634,83 +10904,6 @@ ], "time": "2024-11-12T16:29:46+00:00" }, - { - "name": "composer/semver", - "version": "3.4.4", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2025-08-20T19:15:30+00:00" - }, { "name": "composer/xdebug-handler", "version": "3.0.5", diff --git a/config/bundles.php b/config/bundles.php index e36e03b..d59752b 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -18,4 +18,5 @@ return [ Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true], KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true], Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true], + SpomkyLabs\PwaBundle\SpomkyLabsPwaBundle::class => ['all' => true], ]; diff --git a/config/packages/asset_mapper.yaml b/config/packages/asset_mapper.yaml new file mode 100644 index 0000000..f7653e9 --- /dev/null +++ b/config/packages/asset_mapper.yaml @@ -0,0 +1,11 @@ +framework: + asset_mapper: + # The paths to make available to the asset mapper. + paths: + - assets/ + missing_import_mode: strict + +when@prod: + framework: + asset_mapper: + missing_import_mode: warn diff --git a/config/reference.php b/config/reference.php index 5c7234e..4795ff8 100644 --- a/config/reference.php +++ b/config/reference.php @@ -280,7 +280,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * }>, * }, * asset_mapper?: bool|array{ // Asset Mapper configuration - * enabled?: bool|Param, // Default: false + * enabled?: bool|Param, // Default: true * paths?: array, * excluded_patterns?: list, * exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true @@ -1813,6 +1813,410 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * convert_exception?: bool|Param, // Default: false * remove_first_page_param?: bool|Param, // Default: false * } + * @psalm-type PwaConfig = array{ + * asset_compiler?: bool|Param, // When true, the assets will be compiled when the command "asset-map:compile" is run. // Default: true + * early_hints?: bool|array{ // Early Hints (HTTP 103) configuration. Requires a compatible server (FrankenPHP, Caddy). + * enabled?: bool|Param, // Default: false + * preload_manifest?: bool|Param, // Preload the PWA manifest file. // Default: true + * preload_serviceworker?: bool|Param, // Preload the service worker script. Disabled by default as SW registration is usually deferred. // Default: false + * preconnect_workbox_cdn?: bool|Param, // Preconnect to Workbox CDN when using CDN mode. // Default: true + * }, + * favicons?: bool|array{ + * enabled?: bool|Param, // Default: false + * default?: array{ // The favicon source and parameters. When used with "dark", this favicon will become the light version. + * src?: scalar|Param|null, // The path to the icon. Can be served by Asset Mapper, an absolute path or a Symfony UX Icon (if the bundle is installed). + * background_color?: scalar|Param|null, // The background color of the application. If this value is not defined and that of the Manifest section is, the value of the latter will be used. // Default: null + * border_radius?: int|Param, // The border radius of the icon. // Default: null + * image_scale?: int|Param, // The scale of the icon. // Default: null + * svg_attr?: array, + * }, + * dark?: array{ // The favicon source and parameters for the dark theme. Should only be used with "default". + * src?: scalar|Param|null, // The path to the icon. Can be served by Asset Mapper, an absolute path or a Symfony UX Icon (if the bundle is installed). + * background_color?: scalar|Param|null, // The background color of the application. If this value is not defined and that of the Manifest section is, the value of the latter will be used. // Default: null + * border_radius?: int|Param, // The border radius of the icon. // Default: null + * image_scale?: int|Param, // The scale of the icon. // Default: null + * svg_attr?: array, + * }, + * src?: scalar|Param|null, // Deprecated: The "src" configuration key is deprecated. Use the "default.src" configuration key instead. // The source of the favicon. Shall be a SVG or large PNG. // Default: null + * src_dark?: scalar|Param|null, // Deprecated: The "src_dark" configuration key is deprecated. Use the "dark.src" configuration key instead. // The source of the favicon in dark mode. Shall be a SVG or large PNG. // Default: null + * background_color?: scalar|Param|null, // Deprecated: The "background_color" configuration key is deprecated. Use the "default.background_color" configuration key instead. // The background color of the icon. // Default: null + * background_color_dark?: scalar|Param|null, // Deprecated: The "background_color_dark" configuration key is deprecated. Use the "dark.background_color" configuration key instead. // The background color of the icon in dark mode. // Default: null + * safari_pinned_tab_color?: scalar|Param|null, // The color of the Safari pinned tab. Requires "use_silhouette" to be set to "true". // Default: null + * tile_color?: scalar|Param|null, // The color of the tile for Windows 8+. // Default: null + * border_radius?: int|Param, // Deprecated: The "border_radius" configuration key is deprecated. Use the "default.border_radius" or "dark.border_radius" configuration key instead. // The border radius of the icon. // Default: null + * image_scale?: int|Param, // Deprecated: The "image_scale" configuration key is deprecated. Use the "default.image_scale" or "dark.image_scale" configuration key instead. // The scale of the icon. // Default: null + * low_resolution?: bool|Param, // Include low resolution icons. // Default: false + * use_silhouette?: bool|Param|null, // Use only the silhouette of the icon. Applicable for macOS Safari and Windows 8+. Requires potrace to be installed. // Default: null + * use_start_image?: bool|Param, // Use the icon as a start image for the iOS splash screen. // Default: true + * svg_color?: scalar|Param|null, // When the asset is a SVG file, replaces the currentColor attribute with this color. // Default: "#000" + * monochrome?: bool|Param, // Use a monochrome icon. // Default: false + * potrace?: scalar|Param|null, // The path to the potrace binary. // Default: "potrace" + * }, + * image_processor?: scalar|Param|null, // The image processor to use to generate the icons of different sizes. // Default: null + * logger?: scalar|Param|null, // The logger service to use. If not set, the default logger will be used. // Default: null + * manifest?: bool|array{ + * enabled?: bool|Param, // Default: false + * public_url?: scalar|Param|null, // The public URL of the manifest file. // Default: "/site.webmanifest" + * use_credentials?: bool|Param, // Indicates whether the manifest should be fetched with credentials. // Default: true + * background_color?: scalar|Param|null, // The background color of the application. It should match the background-color CSS property in the sites stylesheet for a smooth transition between launching the web application and loading the site's content. + * categories?: list, + * description?: scalar|Param|null, // The description of the application. + * display?: scalar|Param|null, // The display mode of the application. + * display_override?: list, + * id?: scalar|Param|null, // A string that represents the identity of the web application. + * orientation?: scalar|Param|null, // The orientation of the application. + * dir?: scalar|Param|null, // The direction of the application. + * lang?: scalar|Param|null, // The language of the application. + * name?: scalar|Param|null, // The name of the application. + * short_name?: scalar|Param|null, // The short name of the application. + * scope?: scalar|Param|null, // The scope of the application. + * start_url?: string|array{ // The start URL of the application. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * theme_color?: scalar|Param|null, // The theme color of the application. If a dark theme color is specified, the theme color will be used for the light theme. + * dark_theme_color?: scalar|Param|null, // The dark theme color of the application. + * edge_side_panel?: array{ // Specifies whether or not your app supports the side panel view in Microsoft Edge. + * preferred_width?: int|Param, // Specifies the preferred width of the side panel view in Microsoft Edge. + * }, + * iarc_rating_id?: scalar|Param|null, // Specifies the International Age Rating Coalition (IARC) rating ID for the app. See https://www.globalratings.com/how-iarc-works.aspx for more information. + * scope_extensions?: list, + * handle_links?: scalar|Param|null, // Specifies the default link handling for the web app. + * note_taking?: array{ // The note-taking capabilities of the application. + * note_taking_url?: string|array{ // The URL to the note-taking service. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * }, + * icons?: list, + * background_color?: scalar|Param|null, // The background color of the application. If this value is not defined and that of the Manifest section is, the value of the latter will be used. // Default: null + * border_radius?: int|Param, // The border radius of the icon. // Default: null + * image_scale?: int|Param, // The scale of the icon. // Default: null + * type?: scalar|Param|null, // The icon mime type. + * format?: scalar|Param|null, // The icon format. When set, the "type" option is ignored and the image will be converted. + * purpose?: scalar|Param|null, // The purpose of the icon. + * svg_attr?: array, + * }>, + * screenshots?: list, + * file_handlers?: list, + * }, + * accept?: array>, + * }>, + * launch_handler?: array{ // The launch handler of the application. + * client_mode?: list, + * }, + * protocol_handlers?: list, + * }, + * }>, + * prefer_related_applications?: bool|Param, // prefer related native applications (instead of this application) // Default: false + * related_applications?: list, + * }, + * id?: scalar|Param|null, // The ID of the application. + * }>, + * shortcuts?: list, + * }, + * icons?: list, + * background_color?: scalar|Param|null, // The background color of the application. If this value is not defined and that of the Manifest section is, the value of the latter will be used. // Default: null + * border_radius?: int|Param, // The border radius of the icon. // Default: null + * image_scale?: int|Param, // The scale of the icon. // Default: null + * type?: scalar|Param|null, // The icon mime type. + * format?: scalar|Param|null, // The icon format. When set, the "type" option is ignored and the image will be converted. + * purpose?: scalar|Param|null, // The purpose of the icon. + * svg_attr?: array, + * }>, + * }>, + * share_target?: array{ // The share target of the application. + * action?: string|array{ // The action of the share target. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * method?: scalar|Param|null, // The method of the share target. + * enctype?: scalar|Param|null, // The enctype of the share target. Ignored if method is GET. + * params?: array{ // The parameters of the share target. + * title?: scalar|Param|null, // The title of the share target. + * text?: scalar|Param|null, // The text of the share target. + * url?: scalar|Param|null, // The URL of the share target. + * files?: list, + * }>, + * }, + * }, + * widgets?: list, + * background_color?: scalar|Param|null, // The background color of the application. If this value is not defined and that of the Manifest section is, the value of the latter will be used. // Default: null + * border_radius?: int|Param, // The border radius of the icon. // Default: null + * image_scale?: int|Param, // The scale of the icon. // Default: null + * type?: scalar|Param|null, // The icon mime type. + * format?: scalar|Param|null, // The icon format. When set, the "type" option is ignored and the image will be converted. + * purpose?: scalar|Param|null, // The purpose of the icon. + * svg_attr?: array, + * }>, + * screenshots?: list, + * tag?: scalar|Param|null, // A string used to reference the widget in the PWA service worker. + * template?: scalar|Param|null, // The template to use to display the widget in the operating system widgets dashboard. Note: this property is currently only informational and not used. See ms_ac_template below. + * ms_ac_template?: string|array{ // The URL of the custom Adaptive Cards template to use to display the widget in the operating system widgets dashboard. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * data?: string|array{ // The URL where the data to fill the template with can be found. If present, this URL is required to return valid JSON. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * type?: scalar|Param|null, // The MIME type for the widget data. + * auth?: bool|Param, // A boolean indicating if the widget requires authentication. + * update?: int|Param, // The frequency, in seconds, at which the widget will be updated. Code in your service worker must perform the updating; the widget is not updated automatically. See Access widget instances at runtime. + * multiple?: bool|Param, // A boolean indicating whether to allow multiple instances of the widget. Defaults to true. // Default: true + * }>, + * }, + * path_type_reference?: int|Param, // Deprecated: The "path_type_reference" configuration key is deprecated. Use the "path_type_reference" of URL nodes instead. // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * resource_hints?: bool|array{ // Resource Hints configuration for preconnect, dns-prefetch, and preload. + * enabled?: bool|Param, // Default: false + * auto_preconnect?: bool|Param, // Automatically add preconnect hints for detected external origins (Workbox CDN, Google Fonts). // Default: true + * preconnect?: list, + * dns_prefetch?: list, + * preload?: list, + * }, + * serviceworker?: bool|string|array{ + * enabled?: bool|Param, // Default: false + * src?: scalar|Param|null, // The path to the service worker source file. Can be served by Asset Mapper. + * dest?: scalar|Param|null, // The public URL to the service worker. // Default: "/sw.js" + * skip_waiting?: bool|Param, // Whether to skip waiting for the service worker to be activated. // Default: false + * scope?: scalar|Param|null, // The scope of the service worker. // Default: "/" + * use_cache?: bool|Param, // Whether the service worker should use the cache. // Default: true + * workbox?: bool|array{ // The configuration of the workbox. + * enabled?: bool|Param, // Default: true + * use_cdn?: bool|Param, // Deprecated: The "use_cdn" option is deprecated and will be removed in 2.0.0. use "config.use_cdn" instead. // Whether to use the local workbox or the CDN. // Default: false + * google_fonts?: bool|array{ + * enabled?: bool|Param, // Default: true + * cache_prefix?: scalar|Param|null, // The cache prefix for the Google fonts. // Default: null + * max_age?: scalar|Param|null, // The maximum age of the Google fonts cache (in seconds). // Default: null + * max_entries?: int|Param, // The maximum number of entries in the Google fonts cache. // Default: null + * }, + * cache_manifest?: bool|Param, // Whether to cache the manifest file. // Default: true + * version?: scalar|Param|null, // Deprecated: The "version" option is deprecated and will be removed in 2.0.0. use "config.version" instead. // The version of workbox. When using local files, the version shall be "7.0.0." // Default: "7.3.0" + * workbox_public_url?: scalar|Param|null, // Deprecated: The "workbox_public_url" option is deprecated and will be removed in 2.0.0. use "config.workbox_public_url" instead. // The public path to the local workbox. Only used if use_cdn is false. // Default: "/workbox" + * idb_public_url?: scalar|Param|null, // The public path to the local IndexDB. Only used if use_cdn is false. // Default: "/idb" + * workbox_import_placeholder?: scalar|Param|null, // Deprecated: The "workbox_import_placeholder" option is deprecated and will be removed in 2.0.0. No replacement. // The placeholder for the workbox import. Will be replaced by the workbox import. // Default: "//WORKBOX_IMPORT_PLACEHOLDER" + * standard_rules_placeholder?: scalar|Param|null, // Deprecated: The "standard_rules_placeholder" option is deprecated and will be removed in 2.0.0. No replacement. // The placeholder for the standard rules. Will be replaced by caching strategies. // Default: "//STANDARD_RULES_PLACEHOLDER" + * offline_fallback_placeholder?: scalar|Param|null, // Deprecated: The "offline_fallback_placeholder" option is deprecated and will be removed in 2.0.0. No replacement. // The placeholder for the offline fallback. Will be replaced by the URL. // Default: "//OFFLINE_FALLBACK_PLACEHOLDER" + * widgets_placeholder?: scalar|Param|null, // Deprecated: The "widgets_placeholder" option is deprecated and will be removed in 2.0.0. No replacement. // The placeholder for the widgets. Will be replaced by the widgets management events. // Default: "//WIDGETS_PLACEHOLDER" + * clear_cache?: bool|Param, // Whether to clear the cache during the service worker activation. // Default: true + * navigation_preload?: bool|Param, // Whether to enable navigation preload. This speeds up navigation requests by making the network request in parallel with service worker boot-up. Note: Do not enable if you are precaching HTML pages (e.g., with offline_fallback or warm_cache_urls), as it would be redundant. // Default: false + * config?: array{ + * debug?: bool|Param, // Controls workbox debug logging. Set to false to disable debug mode and logging. // Default: true + * version?: scalar|Param|null, // The version of workbox. When using local files, the version shall be "7.0.0." // Default: "7.3.0" + * use_cdn?: bool|Param, // Whether to use the local workbox or the CDN. // Default: false + * workbox_public_url?: scalar|Param|null, // The public path to the local workbox. Only used if use_cdn is false. // Default: "/workbox" + * }, + * offline_fallback?: array{ + * cache_name?: scalar|Param|null, // The name of the offline cache. // Default: "offline" + * page?: string|array{ // The URL of the offline page fallback. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * image?: string|array{ // The URL of the offline image fallback. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * font?: string|array{ // The URL of the offline font fallback. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * }, + * image_cache?: bool|array{ + * enabled?: bool|Param, // Default: true + * cache_name?: scalar|Param|null, // The name of the image cache. // Default: "images" + * regex?: scalar|Param|null, // The regex to match the images. // Default: "/\\.(ico|png|jpe?g|gif|svg|webp|bmp)$/" + * max_entries?: int|Param, // The maximum number of entries in the image cache. // Default: 60 + * max_age?: scalar|Param|null, // The maximum number of seconds before the image cache is invalidated. // Default: 31536000 + * }, + * asset_cache?: bool|array{ + * enabled?: bool|Param, // Default: true + * cache_name?: scalar|Param|null, // The name of the asset cache. // Default: "assets" + * regex?: scalar|Param|null, // The regex to match the assets. // Default: "/\\.(css|js|json|xml|txt|map|ico|png|jpe?g|gif|svg|webp|bmp)$/" + * max_age?: scalar|Param|null, // The maximum number of seconds before the asset cache is invalidated. // Default: 31536000 + * }, + * font_cache?: bool|array{ + * enabled?: bool|Param, // Default: true + * cache_name?: scalar|Param|null, // The name of the font cache. // Default: "fonts" + * regex?: scalar|Param|null, // The regex to match the fonts. // Default: "/\\.(ttf|eot|otf|woff2)$/" + * max_entries?: int|Param, // The maximum number of entries in the image cache. // Default: 60 + * max_age?: int|Param, // The maximum number of seconds before the font cache is invalidated. // Default: 31536000 + * }, + * resource_caches?: list, + * cacheable_response_statuses?: list, + * broadcast_headers?: list, + * preload_urls?: list, + * }>, + * }>, + * background_sync?: list, + * expect_redirect?: bool|Param, // Whether to expect a redirect (JS response type should be "opaqueredirect" or the "redirected" property is "true"). // Default: false + * method?: scalar|Param|null, // The HTTP method. // Default: "POST" + * broadcast_channel?: scalar|Param|null, // The broadcast channel. Set null to disable. // Default: null + * max_retention_time?: int|Param, // The maximum retention time in minutes. // Default: 1440 + * force_sync_fallback?: bool|Param, // If `true`, instead of attempting to use background sync events, always attempt to replay queued request at service worker startup. Most folks will not need this, unless you explicitly target a runtime like Electron that exposes the interfaces for background sync, but does not have a working implementation. // Default: false + * }>, + * background_fetch?: bool|array{ + * enabled?: bool|Param, // Default: false + * db_name?: scalar|Param|null, // The IndexDB name where downloads are stored // Default: "bgfetch-completed" + * progress_url?: string|array{ // The URL of the progress page. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * success_url?: string|array{ // The URL of the success page. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * success_message?: scalar|Param|null, // The message to display on success. This message is translated. // Default: null + * failure_message?: scalar|Param|null, // The message to display on success. This message is translated. // Default: null + * }, + * image_cache_name?: scalar|Param|null, // Deprecated: The "image_cache_name" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.image_cache.cache_name" instead. // The name of the image cache. // Default: "images" + * font_cache_name?: scalar|Param|null, // Deprecated: The "font_cache_name" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.font_cache.cache_name" instead. // The name of the font cache. // Default: "fonts" + * page_cache_name?: scalar|Param|null, // Deprecated: The "page_cache_name" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.resource_caches[].cache_name" instead. // The name of the page cache. // Default: "pages" + * asset_cache_name?: scalar|Param|null, // Deprecated: The "asset_cache_name" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.asset_cache.cache_name" instead. // The name of the asset cache. // Default: "assets" + * page_fallback?: string|array{ // The URL of the offline page fallback. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * image_fallback?: string|array{ // The URL of the offline image fallback. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * font_fallback?: string|array{ // The URL of the offline font fallback. + * path?: scalar|Param|null, // The URL or route name. + * path_type_reference?: int|Param, // The path type reference to generate paths/URLs. See https://symfony.com/doc/current/routing.html#generating-urls-in-controllers for more information. // Default: 1 + * params?: list, + * }, + * image_regex?: scalar|Param|null, // Deprecated: The "image_regex" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.image_cache.regex" instead. // The regex to match the images. // Default: "/\\.(ico|png|jpe?g|gif|svg|webp|bmp)$/" + * static_regex?: scalar|Param|null, // Deprecated: The "static_regex" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.asset_cache.regex" instead. // The regex to match the static files. // Default: "/\\.(css|js|json|xml|txt|map)$/" + * font_regex?: scalar|Param|null, // Deprecated: The "font_regex" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.font_cache.regex" instead. // The regex to match the static files. // Default: "/\\.(ttf|eot|otf|woff2)$/" + * max_image_cache_entries?: int|Param, // Deprecated: The "max_image_cache_entries" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.image_cache.max_entries" instead. // The maximum number of entries in the image cache. // Default: 60 + * max_image_age?: int|Param, // Deprecated: The "max_image_age" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.image_cache.max_age" instead. // The maximum number of seconds before the image cache is invalidated. // Default: 31536000 + * max_font_cache_entries?: int|Param, // Deprecated: The "max_font_cache_entries" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.font_cache.max_entries" instead. // The maximum number of entries in the font cache. // Default: 30 + * max_font_age?: int|Param, // Deprecated: The "max_font_age" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.font_cache.max_age" instead. // The maximum number of seconds before the font cache is invalidated. // Default: 31536000 + * network_timeout_seconds?: int|Param, // Deprecated: The "network_timeout_seconds" option is deprecated and will be removed in 2.0.0. Please use "pwa.serviceworker.workbox.resource_caches[].network_timeout" instead. // The network timeout in seconds before cache is called (for warm cache URLs only). // Default: 3 + * warm_cache_urls?: list, + * }>, + * }, + * }, + * speculation_rules?: bool|array{ // Speculation Rules API configuration for prefetching and prerendering pages. + * enabled?: bool|Param, // Default: false + * prefetch?: list, + * }>, + * selector_matches?: scalar|Param|null, // For "document" source: CSS selector to match links. // Default: null + * href_matches?: scalar|Param|null, // For "document" source: URL pattern to match href attributes. // Default: null + * eagerness?: "immediate"|"eager"|"moderate"|"conservative"|Param, // Eagerness level: "immediate" (viewport), "eager" (hover 200ms), "moderate" (hover 100ms), "conservative" (mousedown/touchstart). // Default: "moderate" + * referrer_policy?: scalar|Param|null, // Referrer policy for the speculative request. // Default: null + * }>, + * prerender?: list, + * }>, + * selector_matches?: scalar|Param|null, // For "document" source: CSS selector to match links. // Default: null + * href_matches?: scalar|Param|null, // For "document" source: URL pattern to match href attributes. // Default: null + * eagerness?: "immediate"|"eager"|"moderate"|"conservative"|Param, // Eagerness level. For prerender, "conservative" is recommended. // Default: "conservative" + * referrer_policy?: scalar|Param|null, // Referrer policy for the speculative request. // Default: null + * }>, + * }, + * web_client?: scalar|Param|null, // The Panther Client for generating screenshots. If not set, the default client will be used. // Default: null + * user_agent?: scalar|Param|null, // The user agent to use when generating screenshots. When this user agent is detected, the Symfony profiler and debug toolbar will be automatically disabled to ensure screenshots look like production. // Default: "PWAScreenshotBot" + * } * @psalm-type ConfigType = array{ * imports?: ImportsConfig, * parameters?: ParametersConfig, @@ -1831,6 +2235,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_security?: NelmioSecurityConfig, * knpu_oauth2_client?: KnpuOauth2ClientConfig, * knp_paginator?: KnpPaginatorConfig, + * pwa?: PwaConfig, * "when@dev"?: array{ * imports?: ImportsConfig, * parameters?: ParametersConfig, @@ -1852,6 +2257,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_security?: NelmioSecurityConfig, * knpu_oauth2_client?: KnpuOauth2ClientConfig, * knp_paginator?: KnpPaginatorConfig, + * pwa?: PwaConfig, * }, * "when@prod"?: array{ * imports?: ImportsConfig, @@ -1871,6 +2277,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_security?: NelmioSecurityConfig, * knpu_oauth2_client?: KnpuOauth2ClientConfig, * knp_paginator?: KnpPaginatorConfig, + * pwa?: PwaConfig, * }, * "when@test"?: array{ * imports?: ImportsConfig, @@ -1891,6 +2298,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_security?: NelmioSecurityConfig, * knpu_oauth2_client?: KnpuOauth2ClientConfig, * knp_paginator?: KnpPaginatorConfig, + * pwa?: PwaConfig, * }, * ... [ + 'path' => './assets/app.js', + 'entrypoint' => true, + ], + '@hotwired/stimulus' => [ + 'version' => '3.2.2', + ], + 'idb' => [ + 'version' => '8.0.3', + ], + 'idb-keyval' => [ + 'version' => '6.2.2', + ], + '@spomky-labs/pwa/helpers' => [ + 'path' => './vendor/spomky-labs/pwa-bundle/assets/src/helpers.js', + ], +]; diff --git a/public/logo.png b/public/logo.png index 27bff6e..839f93a 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/public/marker.png b/public/marker.png index ac4fcc8..0ebad04 100644 Binary files a/public/marker.png and b/public/marker.png differ diff --git a/symfony.lock b/symfony.lock index 5362c5f..35c1efd 100644 --- a/symfony.lock +++ b/symfony.lock @@ -120,6 +120,18 @@ "bin/phpunit" ] }, + "spomky-labs/pwa-bundle": { + "version": "1.5", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "1.3", + "ref": "ac33d9498ab25856f16d1d7df9ad4b9b0cad066d" + }, + "files": [ + "config/packages/pwa.yaml" + ] + }, "stripe/stripe-php": { "version": "19.4", "recipe": { @@ -138,6 +150,21 @@ "ref": "9648db3ecae5c8a6b1a5f74715d3907124348815" } }, + "symfony/asset-mapper": { + "version": "8.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.4", + "ref": "5ad1308aa756d58f999ffbe1540d1189f5d7d14a" + }, + "files": [ + "assets/app.js", + "assets/styles/app.css", + "config/packages/asset_mapper.yaml", + "importmap.php" + ] + }, "symfony/console": { "version": "8.0", "recipe": { diff --git a/templates/account/edit_event.html.twig b/templates/account/edit_event.html.twig index 41b0c80..26ecf48 100644 --- a/templates/account/edit_event.html.twig +++ b/templates/account/edit_event.html.twig @@ -3,7 +3,7 @@ {% block title %}Modifier un evenement - E-Ticket{% endblock %} {% block body %} -
+ -
+

Affiche

diff --git a/templates/account/index.html.twig b/templates/account/index.html.twig index ae2127d..54a923c 100644 --- a/templates/account/index.html.twig +++ b/templates/account/index.html.twig @@ -77,7 +77,7 @@ {% endif %} {% endif %} -
+
{% if isOrganizer %} Evenements / Brocantes Sous-comptes @@ -142,6 +142,7 @@

Mes evenements / Brocantes / Reservations

{% if events|length > 0 %} +
@@ -185,6 +186,7 @@ {% endfor %}
+
{% else %}

Aucun evenement pour le moment.

@@ -240,6 +242,7 @@

Sous-comptes

{% if subAccounts|length > 0 %} +
@@ -277,6 +280,7 @@ {% endfor %}
+
{% else %}

Aucun sous-compte pour le moment.

@@ -295,6 +299,7 @@
{% endif %} {% if payouts|length > 0 %} +
@@ -333,6 +338,7 @@ {% endfor %}
+
{% else %}

Aucun virement pour le moment.

diff --git a/templates/admin/events.html.twig b/templates/admin/events.html.twig index 6283334..9800ec2 100644 --- a/templates/admin/events.html.twig +++ b/templates/admin/events.html.twig @@ -22,6 +22,7 @@
{% if events|length > 0 %} +
@@ -69,6 +70,7 @@ {% endfor %}
+
{% else %}

diff --git a/templates/base.html.twig b/templates/base.html.twig index 433dd84..9cac99f 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -160,7 +160,7 @@

-
+

© {{ "now"|date("Y") }} E-TICKET.

Solution proposee par l'association e-cosplay.fr

diff --git a/templates/error/404.html.twig b/templates/error/404.html.twig index 28a9fe8..f370b13 100644 --- a/templates/error/404.html.twig +++ b/templates/error/404.html.twig @@ -6,12 +6,12 @@
- 404 + 404
-
-
404
+
+
404

Page introuvable

La page que vous cherchez n'existe pas ou a ete deplacee.

diff --git a/templates/error/500.html.twig b/templates/error/500.html.twig index 7d0207a..a6023c6 100644 --- a/templates/error/500.html.twig +++ b/templates/error/500.html.twig @@ -6,12 +6,12 @@
- 500 + 500
-
-
{{ status_code }}
+
+
{{ status_code }}

Erreur serveur

Une erreur inattendue s'est produite. Nos equipes ont ete notifiees.

{% if error_message is defined and error_message %} diff --git a/templates/home/event_detail.html.twig b/templates/home/event_detail.html.twig index 28faade..c2f1bc8 100644 --- a/templates/home/event_detail.html.twig +++ b/templates/home/event_detail.html.twig @@ -15,7 +15,7 @@
- EVENT + EVENT
diff --git a/templates/home/events.html.twig b/templates/home/events.html.twig index 2c0b546..85cec17 100644 --- a/templates/home/events.html.twig +++ b/templates/home/events.html.twig @@ -8,7 +8,7 @@
- EVENTS + EVENTS
diff --git a/templates/home/organizer_detail.html.twig b/templates/home/organizer_detail.html.twig index ad25f83..643e1ad 100644 --- a/templates/home/organizer_detail.html.twig +++ b/templates/home/organizer_detail.html.twig @@ -15,7 +15,7 @@
- ORGA + ORGA
diff --git a/templates/home/organizers.html.twig b/templates/home/organizers.html.twig index ebc01f2..ea489d1 100644 --- a/templates/home/organizers.html.twig +++ b/templates/home/organizers.html.twig @@ -10,7 +10,7 @@
- ORGA + ORGA
diff --git a/templates/security/email_verified.html.twig b/templates/security/email_verified.html.twig index d1287df..97ea9bf 100644 --- a/templates/security/email_verified.html.twig +++ b/templates/security/email_verified.html.twig @@ -5,7 +5,7 @@ {% block body %}
-
+

Email verifie !

diff --git a/templates/security/register.html.twig b/templates/security/register.html.twig index fb81522..643308b 100644 --- a/templates/security/register.html.twig +++ b/templates/security/register.html.twig @@ -32,7 +32,7 @@
{% endfor %} -
+