feat: purification webpack
This commit is contained in:
6456
package-lock.json
generated
6456
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@hotwired/stimulus": "^3.0.0",
|
||||
"@hotwired/turbo": "^7.1.0 || ^8.0",
|
||||
"@symfony/stimulus-bridge": "^3.2.0 || ^4.0.0",
|
||||
"@symfony/ux-turbo": "file:vendor/symfony/ux-turbo/assets",
|
||||
"@symfony/webpack-encore": "^6.0.0",
|
||||
"core-js": "^3.38.0",
|
||||
"regenerator-runtime": "^0.13.9",
|
||||
"tailwindcss": "^3.4.19",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-cli": "^5.1.0"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev-server": "encore dev-server",
|
||||
"dev": "encore dev",
|
||||
"watch": "encore dev --watch",
|
||||
"build": "encore production --progress"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/postcss": "^4.2.1",
|
||||
"postcss": "^8.5.8",
|
||||
"postcss-loader": "^8.2.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export default {
|
||||
plugins: {
|
||||
"@tailwindcss/postcss": {},
|
||||
},
|
||||
};
|
||||
@@ -353,7 +353,6 @@
|
||||
"assets/styles/app.css",
|
||||
"config/packages/webpack_encore.yaml",
|
||||
"package.json",
|
||||
"webpack.config.js"
|
||||
]
|
||||
},
|
||||
"symfonycasts/tailwind-bundle": {
|
||||
|
||||
@@ -1,28 +1,78 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Accueil | Tableau de bord KAZ{% endblock %}
|
||||
{% block title %}Tableau de bord | Association KAZ{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="mt-8 p-6 bg-white rounded-lg shadow-md border border-gray-200">
|
||||
<h1 class="text-3xl font-bold mb-4">Bienvenue sur ton tableau de bord KAZ </h1>
|
||||
<div class="min-h-screen bg-gray-50 py-8 w-full">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
|
||||
{# Vérification si un utilisateur est connecté #}
|
||||
{% if app.user %}
|
||||
<div class="p-4 bg-green-100 text-green-800 rounded mb-4">
|
||||
<p class="font-semibold">Succès ! Tu es connecté avec l'adresse :</p>
|
||||
<p class="text-xl">{{ app.user.userIdentifier }}</p>
|
||||
{# --- EN-TÊTE DU TABLEAU DE BORD --- #}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 px-6 py-6 mb-8 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-gray-900">Espace Adhérent KAZ</h1>
|
||||
<p class="text-sm text-gray-500 mt-1">Bienvenue sur votre intranet associatif.</p>
|
||||
</div>
|
||||
|
||||
{% if app.user %}
|
||||
<div class="flex items-center space-x-4">
|
||||
<span class="inline-flex items-center rounded-full bg-blue-50 px-3 py-1 text-sm font-medium text-blue-700 ring-1 ring-inset ring-blue-700/10">
|
||||
👤 {{ app.user.userIdentifier }}
|
||||
</span>
|
||||
<a href="{{ path('app_logout') }}" class="rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 transition-colors duration-200">
|
||||
Déconnexion
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p class="mt-4">
|
||||
<a href="{{ path('app_logout') }}" class="inline-block px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700">
|
||||
Se déconnecter
|
||||
</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="mb-4">Tu n'es pas encore connecté à ton espace.</p>
|
||||
<a href="{{ path('app_login') }}" class="inline-block px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
|
||||
Aller à la page de connexion
|
||||
</a>
|
||||
{% endif %}
|
||||
{# --- GRILLE DES FONCTIONNALITÉS --- #}
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
|
||||
{# Carte 1 : Profil #}
|
||||
<div class="bg-white overflow-hidden shadow-sm border border-gray-100 rounded-xl hover:shadow-md transition-shadow duration-200">
|
||||
<div class="p-5">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 bg-blue-600 rounded-lg p-3">
|
||||
<span class="text-2xl">📋</span>
|
||||
</div>
|
||||
<div class="ml-5 w-0 flex-1">
|
||||
<dl>
|
||||
<dt class="text-sm font-medium text-gray-500 truncate">Mon Profil</dt>
|
||||
<dd class="text-lg font-semibold text-gray-900">Gérer mes informations</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-5 py-3 border-t border-gray-100">
|
||||
<div class="text-sm">
|
||||
<a href="#" class="font-medium text-blue-600 hover:text-blue-500">Voir mon profil →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Carte 2 : Mon abonnement KAZ #}
|
||||
<div class="bg-white overflow-hidden shadow-sm border border-gray-100 rounded-xl hover:shadow-md transition-shadow duration-200">
|
||||
<div class="p-5">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 bg-green-500 rounded-lg p-3">
|
||||
<span class="text-2xl">💳</span>
|
||||
</div>
|
||||
<div class="ml-5 w-0 flex-1">
|
||||
<dl>
|
||||
<dt class="text-sm font-medium text-gray-500 truncate">Mon abonnement KAZ</dt>
|
||||
<dd class="text-lg font-semibold text-gray-900">À jour</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-5 py-3 border-t border-gray-100">
|
||||
<div class="text-sm">
|
||||
<a href="#" class="font-medium text-green-600 hover:text-green-500">Voir l'historique →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,79 +0,0 @@
|
||||
const Encore = require('@symfony/webpack-encore');
|
||||
|
||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||
// It's useful when you use tools that rely on webpack.config.js file.
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
}
|
||||
|
||||
Encore
|
||||
// directory where compiled assets will be stored
|
||||
.setOutputPath('public/build/')
|
||||
// public path used by the web server to access the output path
|
||||
.setPublicPath('/build')
|
||||
// only needed for CDN's or subdirectory deploy
|
||||
//.setManifestKeyPrefix('build/')
|
||||
|
||||
/*
|
||||
* ENTRY CONFIG
|
||||
*
|
||||
* Each entry will result in one JavaScript file (e.g. app.js)
|
||||
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
|
||||
*/
|
||||
.addEntry('app', './assets/app.js')
|
||||
|
||||
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
|
||||
.splitEntryChunks()
|
||||
|
||||
// enables the Symfony UX Stimulus bridge (used in assets/stimulus_bootstrap.js)
|
||||
.enableStimulusBridge('./assets/controllers.json')
|
||||
|
||||
// will require an extra script tag for runtime.js
|
||||
// but, you probably want this, unless you're building a single-page app
|
||||
.enableSingleRuntimeChunk()
|
||||
|
||||
/*
|
||||
* FEATURE CONFIG
|
||||
*
|
||||
* Enable & configure other features below. For a full
|
||||
* list of features, see:
|
||||
* https://symfony.com/doc/current/frontend.html#adding-more-features
|
||||
*/
|
||||
.cleanupOutputBeforeBuild()
|
||||
|
||||
// Displays build status system notifications to the user
|
||||
// .enableBuildNotifications()
|
||||
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
// enables hashed filenames (e.g. app.abc123.css)
|
||||
.enableVersioning(Encore.isProduction())
|
||||
|
||||
// configure Babel
|
||||
// .configureBabel((config) => {
|
||||
// config.plugins.push('@babel/a-babel-plugin');
|
||||
// })
|
||||
|
||||
// enables and configure @babel/preset-env polyfills
|
||||
.configureBabelPresetEnv((config) => {
|
||||
config.useBuiltIns = 'usage';
|
||||
config.corejs = '3.38';
|
||||
})
|
||||
|
||||
// enables Sass/SCSS support
|
||||
//.enableSassLoader()
|
||||
|
||||
// uncomment if you use TypeScript
|
||||
//.enableTypeScriptLoader()
|
||||
|
||||
// uncomment if you use React
|
||||
//.enableReactPreset()
|
||||
|
||||
// uncomment to get integrity="..." attributes on your script & link tags
|
||||
// requires WebpackEncoreBundle 1.4 or higher
|
||||
//.enableIntegrityHashes(Encore.isProduction())
|
||||
|
||||
// uncomment if you're having problems with a jQuery plugin
|
||||
//.autoProvidejQuery()
|
||||
;
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
||||
Reference in New Issue
Block a user