Skip to content

Commit

Permalink
fix: import bsi comuni styles
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Oct 11, 2024
1 parent 5c47890 commit 00b6756
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-assets-comuni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
run: |
git clone https://github.com/italia/design-comuni-pagine-statiche
cd design-comuni-pagine-statiche && npm i && npm run build && cd ..
cp ./design-comuni-pagine-statiche/dist/assets/css/bootstrap-italia-comuni.css ./assets/css/comuni.css
cp ./design-comuni-pagine-statiche/dist/assets/css/bootstrap-italia-comuni.css ./assets/css/bootstrap-italia-comuni.min.css
cp ./design-comuni-pagine-statiche/dist/assets/script/scripts.js ./assets/js/comuni.js
rm -rf design-comuni-pagine-statiche
npm i
npm run build
git add assets/css/comuni.css assets/js/comuni.js
git add assets/css/bootstrap-italia-comuni.css assets/js/comuni.js
git commit -m "chore(deps): update assets"
git checkout .
- name: Create Pull Request
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion assets/css/bootstrap-italia.min.css

This file was deleted.

10 changes: 2 additions & 8 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,8 @@ function dci_scripts() {

//wp_deregister_script('jquery');

//load Bootstrap Italia latest css if exists in node_modules
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'node_modules/bootstrap-italia/dist/css/bootstrap-italia-comuni.min.css')) {
wp_enqueue_style( 'dci-boostrap-italia-min', get_template_directory_uri() . '/node_modules/bootstrap-italia/dist/css/bootstrap-italia-comuni.min.css');
}
else {
wp_enqueue_style( 'dci-boostrap-italia-min', get_template_directory_uri() . '/assets/css/bootstrap-italia.min.css');
}
wp_enqueue_style( 'dci-comuni', get_template_directory_uri() . '/assets/css/comuni.css', array('dci-boostrap-italia-min'));
//load bootstrap-italia-comuni
wp_enqueue_style( 'dci-comuni', get_template_directory_uri() . '/assets/css/bootstrap-italia-comuni.min.css');

wp_enqueue_style( 'dci-font', get_template_directory_uri() . '/assets/css/fonts.css', array('dci-comuni'));
wp_enqueue_style( 'dci-wp-style', get_template_directory_uri()."/style.css", array('dci-comuni'));
Expand Down
16 changes: 11 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/italia/design-comuni-wordpress-theme#readme",
"dependencies": {
"bootstrap-italia": "^2.5.1"
"bootstrap-italia": "^2.9.2"
},
"devDependencies": {
"clean-css-cli": "^5.6.1",
Expand Down

0 comments on commit 00b6756

Please sign in to comment.