Browse Source

Demi tour -> AdminLTE

master
Fab 3 years ago
parent
commit
de379a6e57
8 changed files with 1244 additions and 34 deletions
  1. +1
    -1
      assets/apps/backend/common/common.scss
  2. +3
    -0
      config/packages/lc_sov.yaml
  3. +2
    -2
      config/packages/translation.yaml
  4. +1
    -1
      config/packages/webpack_encore.yaml
  5. +6
    -1
      package.json
  6. +4
    -3
      src/Controller/Admin/PageCrudController.php
  7. +20
    -12
      webpack.config.js
  8. +1207
    -14
      yarn.lock

+ 1
- 1
assets/apps/backend/common/common.scss View File



$color: red ;
$color: #444 ;


body { body {
background-color: $color ; background-color: $color ;

+ 3
- 0
config/packages/lc_sov.yaml View File

# see https://symfony.com/doc/current/reference/configuration/framework.html
lc_sov:
homepage_route: '_homepage'

+ 2
- 2
config/packages/translation.yaml View File

framework: framework:
default_locale: en
default_locale: '%app.default_locale%'
translator: translator:
default_path: '%kernel.project_dir%/translations' default_path: '%kernel.project_dir%/translations'
fallbacks: fallbacks:
- en
- '%app.default_locale%'

+ 1
- 1
config/packages/webpack_encore.yaml View File



# Set attributes that will be rendered on all script and link tags # Set attributes that will be rendered on all script and link tags
script_attributes: script_attributes:
defer: true
defer: false
# link_attributes: # link_attributes:


# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials') # If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')

+ 6
- 1
package.json View File

"devDependencies": { "devDependencies": {
"@symfony/stimulus-bridge": "^2.0.0", "@symfony/stimulus-bridge": "^2.0.0",
"@symfony/webpack-encore": "^1.0.0", "@symfony/webpack-encore": "^1.0.0",
"admin-lte": "^3.1",
"core-js": "^3.0.0", "core-js": "^3.0.0",
"jquery": "^3.6.0",
"regenerator-runtime": "^0.13.2", "regenerator-runtime": "^0.13.2",
"sass": "^1.32.12", "sass": "^1.32.12",
"sass-loader": "^11.0.0", "sass-loader": "^11.0.0",
"select2": "^4.1.0-rc.0",
"select2-bootstrap4-theme": "^1.0.0",
"stimulus": "^2.0.0", "stimulus": "^2.0.0",
"webpack-notifier": "^1.6.0" "webpack-notifier": "^1.6.0"
}, },
"dev": "encore dev", "dev": "encore dev",
"watch": "encore dev --watch", "watch": "encore dev --watch",
"build": "encore production --progress" "build": "encore production --progress"
}
},
"dependencies": {}
} }

+ 4
- 3
src/Controller/Admin/PageCrudController.php View File

TextField::new('title'), TextField::new('title'),
CKEditorField::new('description'), CKEditorField::new('description'),
FileManagerField::new('image'), FileManagerField::new('image'),
GalleryManagerField::new('gallery'),
TextField::new('devAlias'),
ChoiceField::new('status') ChoiceField::new('status')
->setChoices(['En ligne' => 1, 'Hors ligne' => 0]) ->setChoices(['En ligne' => 1, 'Hors ligne' => 0])
->setFormTypeOption('expanded', false) ->setFormTypeOption('expanded', false)
->setFormTypeOption('multiple', false) ->setFormTypeOption('multiple', false)
->setCustomOption('widget', false)
->setCustomOption('widget', false),
GalleryManagerField::new('gallery'),
TextField::new('devAlias'),

]; ];
} }



+ 20
- 12
webpack.config.js View File

//.setManifestKeyPrefix('build/') //.setManifestKeyPrefix('build/')
.enableSassLoader() .enableSassLoader()
.addAliases({ .addAliases({
'core-js': path.resolve(__dirname, './node_modules/core-js')
'adminlte': path.resolve(__dirname, './node_modules/admin-lte/dist/js/adminlte.min.js'),
'adminltePlugin': path.resolve(__dirname, './node_modules/admin-lte/plugins/'),
'core-js': path.resolve(__dirname, './node_modules/core-js'),
'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery'),
'select2': path.join(__dirname, 'node_modules/select2/dist/js/select2.js'),
'select2-css': path.join(__dirname, 'node_modules/select2/dist/css/select2.min.css'),
//'select2-bootstrap-theme': path.join(__dirname, 'node_modules/select2-bootstrap-5-theme/dist/select2-bootstrap-5-theme.min.css')
}) })


/* /*
* and one CSS file (e.g. app.css) if your JavaScript imports CSS. * and one CSS file (e.g. app.css) if your JavaScript imports CSS.
*/ */
//.addEntry('backend-common', './assets/apps/backend/common/app.common.js') //.addEntry('backend-common', './assets/apps/backend/common/app.common.js')
//.addEntry('jquery', './node_modules/jquery/dist/jquery.slim.js')
.addEntry('common', './Lc/SovBundle/Resources/assets/apps/common/app.common.js')
.addEntry('tabler', './Lc/SovBundle/Resources/assets/apps/tabler/app.tabler.js') .addEntry('tabler', './Lc/SovBundle/Resources/assets/apps/tabler/app.tabler.js')
//.addEntry('easyadmin', './vendor/easycorp/easyadmin-bundle/assets/js/app.js') //.addEntry('easyadmin', './vendor/easycorp/easyadmin-bundle/assets/js/app.js')


config.corejs = 3; config.corejs = 3;
}) })


// enables Sass/SCSS support
//.enableSassLoader()
// enables Sass/SCSS support
//.enableSassLoader()


// uncomment if you use TypeScript
//.enableTypeScriptLoader()
// uncomment if you use TypeScript
//.enableTypeScriptLoader()


// uncomment if you use React
//.enableReactPreset()
// 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 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()
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
; ;


module.exports = Encore.getWebpackConfig(); module.exports = Encore.getWebpackConfig();

+ 1207
- 14
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save