From 9566ea89b1976199448c83f7e86f50f404050f08 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 15 Apr 2021 20:51:04 +0200 Subject: [PATCH] fix stylesheets locations, in chill-bundles or in project files --- .../ChillMainBundle/Resources/public/main.js | 4 +- .../public/modules/scratch/_custom.scss | 12 ++++-- .../Resources/public/scss/chillmain.scss | 41 +++++++++++++++++++ .../ChillMainBundle/chill.webpack.config.js | 11 ++--- .../views/AccompanyingCourse/layout.html.twig | 25 ----------- 5 files changed, 56 insertions(+), 37 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss diff --git a/src/Bundle/ChillMainBundle/Resources/public/main.js b/src/Bundle/ChillMainBundle/Resources/public/main.js index 83221da35..2eeecd27e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/main.js +++ b/src/Bundle/ChillMainBundle/Resources/public/main.js @@ -21,6 +21,7 @@ global.chill = chill; /* * load requirements in chill entrypoint */ +require('./scss/chillmain.scss'); require('./css/chillmain.css'); require('./css/pikaday.css'); @@ -34,10 +35,11 @@ require('./modules/download-report/index.js'); require('./modules/select_interactive_loading/index.js'); require('./modules/export-list/export-list.scss'); require('./modules/entity/index.js'); +require('./modules/tabs/index.js'); /* * load img */ require('./img/favicon.ico'); require('./img/logo-chill-sans-slogan_white.png'); -require('./img/logo-chill-outil-accompagnement_white.png'); \ No newline at end of file +require('./img/logo-chill-outil-accompagnement_white.png'); diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/scratch/_custom.scss b/src/Bundle/ChillMainBundle/Resources/public/modules/scratch/_custom.scss index 0fe6bd846..e44fdebcc 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/modules/scratch/_custom.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/modules/scratch/_custom.scss @@ -1,3 +1,9 @@ +/* + * NOTE 2021.04 + * scss/chill.scss is the main sass file for the new chill.2 + * scratch will be replaced by bootstrap, please avoid to edit in modules/scratch/_custom.scss + */ + // YOUR CUSTOM SCSS @import 'custom/config/colors'; @import 'custom/config/variables'; @@ -156,7 +162,6 @@ dl.chill_view_data { } - blockquote.chill-user-quote, div.chill-user-quote { border-left: 10px solid $chill-yellow; @@ -164,12 +169,12 @@ div.chill-user-quote { padding: 0.5em 10px; quotes: "\201C""\201D""\2018""\2019"; background-color: $chill-llight-gray; - + blockquote { margin: 1.5em 10px; padding: 0.5em 10px; } - + blockquote:before { color: #ccc; content: open-quote; @@ -182,5 +187,4 @@ div.chill-user-quote { .chill-no-data-statement { font-style: italic; - } diff --git a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss new file mode 100644 index 000000000..fd58e1c46 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss @@ -0,0 +1,41 @@ +/* + * NOTE 2021.04 + * scss/chill.scss is the main sass file for the new chill.2 + * scratch will be replaced by bootstrap, please avoid to edit in modules/scratch/_custom.scss + * + * when possible, try to use bootstrap class naming +*/ + +/* + * Header custom for Accompanying Course + */ + +div#header-accompanying_course-name { + background: none repeat scroll 0 0 #718596; + color: #FFF; + padding-top: 1em; + padding-bottom: 1em; + + span { + a { + color: white; + } + a:hover { + text-decoration: underline; + } + } +} + +div#header-accompanying_course-details { + background: none repeat scroll 0 0 #718596ab; + color: #FFF; + padding-top: 1em; + padding-bottom: 1em; +} + +/* /!\ Contourne le positionnement problématique du div#content_conainter suivant, + * car sa position: relative le place au-dessus du bandeau et les liens sont incliquables */ + +div.subheader { + height: 130px; +} diff --git a/src/Bundle/ChillMainBundle/chill.webpack.config.js b/src/Bundle/ChillMainBundle/chill.webpack.config.js index d8e796c33..aa9286014 100644 --- a/src/Bundle/ChillMainBundle/chill.webpack.config.js +++ b/src/Bundle/ChillMainBundle/chill.webpack.config.js @@ -42,19 +42,16 @@ module.exports = function(encore, entries) // Push into "chill" entrypoint entries.push(__dirname + '/Resources/public/main.js'); - // Add new separate entrypoints - encore - .addEntry('scratch', __dirname + '/Resources/public/modules/scratch/index.js') - .addEntry('login', __dirname + '/Resources/public/modules/login_page/index.js') - .addEntry('tabs', __dirname + '/Resources/public/modules/tabs/index.js') - ; - // Aliases are used when webpack is trying to resolve modules path encore.addAliases({ ChillMainSass: __dirname + '/Resources/public/modules/scratch', ShowHide: __dirname + '/Resources/public/modules/show_hide' }); + // Add separate entrypoints + encore.addEntry('login', __dirname + '/Resources/public/modules/login_page/index.js'); + encore.addEntry('scratch', __dirname + '/Resources/public/modules/scratch/index.js'); + // Chill2 new assets encore.addEntry('forkawesome', __dirname + '/Resources/public/modules/forkawesome/index.js'); encore.addEntry('bootstrap', __dirname + '/Resources/public/modules/bootstrap/index.js'); diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig index 3e880fb62..82def471c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig @@ -16,31 +16,6 @@ {% endblock %} {% block css %} - {% endblock %} {% block js %}