diff --git a/.gitignore b/.gitignore
index e18380330..91eb951d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,7 @@ vendor
src/vendor
node_modules
npm-debug.log
-src/assets/*.js
+src/assets/js/*.js
last-js-build.md5
last-sass-build.md5
last-composer-build.md5
diff --git a/src/assets/css/fonts/materialdesignicons.css b/src/assets/css/materialdesignicons.css
similarity index 99%
rename from src/assets/css/fonts/materialdesignicons.css
rename to src/assets/css/materialdesignicons.css
index 3b46a7213..89f9ac86e 100644
--- a/src/assets/css/fonts/materialdesignicons.css
+++ b/src/assets/css/materialdesignicons.css
@@ -1,8 +1,8 @@
/* MaterialDesignIcons.com */
@font-face {
font-family: "Material Design Icons";
- src: url("../fonts/materialdesignicons-webfont.eot?v=2.1.19");
- src: url("../fonts/materialdesignicons-webfont.eot?#iefix&v=2.1.19") format("embedded-opentype"), url("../fonts/materialdesignicons-webfont.woff2?v=2.1.19") format("woff2"), url("../fonts/materialdesignicons-webfont.woff?v=2.1.19") format("woff"), url("../fonts/materialdesignicons-webfont.ttf?v=2.1.19") format("truetype"), url("../fonts/materialdesignicons-webfont.svg?v=2.1.19#materialdesigniconsregular") format("svg");
+ src: url("./materialdesignicons-webfont.eot?v=2.1.19");
+ src: url("./materialdesignicons-webfont.eot?#iefix&v=2.1.19") format("embedded-opentype"), url("../fonts/materialdesignicons-webfont.woff2?v=2.1.19") format("woff2"), url("../fonts/materialdesignicons-webfont.woff?v=2.1.19") format("woff"), url("../fonts/materialdesignicons-webfont.ttf?v=2.1.19") format("truetype"), url("../fonts/materialdesignicons-webfont.svg?v=2.1.19#materialdesigniconsregular") format("svg");
font-weight: normal;
font-style: normal;
}
diff --git a/src/assets/css/fonts/tainacanicons.css b/src/assets/css/tainacanicons.css
similarity index 97%
rename from src/assets/css/fonts/tainacanicons.css
rename to src/assets/css/tainacanicons.css
index 2bb2f387b..77f8c0bf8 100644
--- a/src/assets/css/fonts/tainacanicons.css
+++ b/src/assets/css/tainacanicons.css
@@ -2,12 +2,12 @@
font-family: "TainacanIcons";
src: url("../fonts/TainacanIcons.eot");
src: url("../fonts/TainacanIcons.eot#iefix") format("embedded-opentype"),
- url("../fonts/TainacanIcons.woff2") format("woff2"),
- url("../fonts/TainacanIcons.otf") format("otf"),
- url("../fonts/TainacanIcons.woff") format("woff"),
- url("../fonts/TainacanIcons.ttf") format("truetype"),
- url("../fonts/TainacanIcons.svg") format("svg");
- font-weight: normal;
+ url("../fonts/TainacanIcons.woff2") format("woff2"),
+ url("../fonts/TainacanIcons.otf") format("otf"),
+ url("../fonts/TainacanIcons.woff") format("woff"),
+ url("../fonts/TainacanIcons.ttf") format("truetype"),
+ url("../fonts/TainacanIcons.svg") format("svg");
+font-weight: normal;
font-style: normal;
text-rendering: optimizeLegibility;
}
diff --git a/src/assets/css/fonts/TainacanIcons.eot b/src/assets/fonts/TainacanIcons.eot
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.eot
rename to src/assets/fonts/TainacanIcons.eot
diff --git a/src/assets/css/fonts/TainacanIcons.otf b/src/assets/fonts/TainacanIcons.otf
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.otf
rename to src/assets/fonts/TainacanIcons.otf
diff --git a/src/assets/css/fonts/TainacanIcons.svg b/src/assets/fonts/TainacanIcons.svg
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.svg
rename to src/assets/fonts/TainacanIcons.svg
diff --git a/src/assets/css/fonts/TainacanIcons.ttf b/src/assets/fonts/TainacanIcons.ttf
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.ttf
rename to src/assets/fonts/TainacanIcons.ttf
diff --git a/src/assets/css/fonts/TainacanIcons.vfc b/src/assets/fonts/TainacanIcons.vfc
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.vfc
rename to src/assets/fonts/TainacanIcons.vfc
diff --git a/src/assets/css/fonts/TainacanIcons.woff b/src/assets/fonts/TainacanIcons.woff
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.woff
rename to src/assets/fonts/TainacanIcons.woff
diff --git a/src/assets/css/fonts/TainacanIcons.woff2 b/src/assets/fonts/TainacanIcons.woff2
similarity index 100%
rename from src/assets/css/fonts/TainacanIcons.woff2
rename to src/assets/fonts/TainacanIcons.woff2
diff --git a/src/assets/css/fonts/materialdesignicons-webfont.eot b/src/assets/fonts/materialdesignicons-webfont.eot
similarity index 100%
rename from src/assets/css/fonts/materialdesignicons-webfont.eot
rename to src/assets/fonts/materialdesignicons-webfont.eot
diff --git a/src/assets/css/fonts/materialdesignicons-webfont.svg b/src/assets/fonts/materialdesignicons-webfont.svg
similarity index 100%
rename from src/assets/css/fonts/materialdesignicons-webfont.svg
rename to src/assets/fonts/materialdesignicons-webfont.svg
diff --git a/src/assets/css/fonts/materialdesignicons-webfont.ttf b/src/assets/fonts/materialdesignicons-webfont.ttf
similarity index 100%
rename from src/assets/css/fonts/materialdesignicons-webfont.ttf
rename to src/assets/fonts/materialdesignicons-webfont.ttf
diff --git a/src/assets/css/fonts/materialdesignicons-webfont.woff b/src/assets/fonts/materialdesignicons-webfont.woff
similarity index 100%
rename from src/assets/css/fonts/materialdesignicons-webfont.woff
rename to src/assets/fonts/materialdesignicons-webfont.woff
diff --git a/src/assets/css/fonts/materialdesignicons-webfont.woff2 b/src/assets/fonts/materialdesignicons-webfont.woff2
similarity index 100%
rename from src/assets/css/fonts/materialdesignicons-webfont.woff2
rename to src/assets/fonts/materialdesignicons-webfont.woff2
diff --git a/src/assets/js/report.html b/src/assets/js/report.html
new file mode 100644
index 000000000..00c3313c0
--- /dev/null
+++ b/src/assets/js/report.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+ Webpack Bundle Analyzer
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/theme-helper/class-tainacan-theme-helper.php b/src/theme-helper/class-tainacan-theme-helper.php
index a06562abb..bc5d18471 100644
--- a/src/theme-helper/class-tainacan-theme-helper.php
+++ b/src/theme-helper/class-tainacan-theme-helper.php
@@ -105,7 +105,7 @@ class Theme_Helper {
global $TAINACAN_BASE_URL;
if ( $force || is_post_type_archive( \Tainacan\Repositories\Repository::get_collections_db_identifiers() ) || tainacan_get_term() || get_query_var('tainacan_repository_archive') == 1 ) {
//\Tainacan\Admin::get_instance()->add_admin_js();
- wp_enqueue_script('tainacan-search', $TAINACAN_BASE_URL . '/assets/theme_search.js' , [] , TAINACAN_VERSION, true);
+ wp_enqueue_script('tainacan-search', $TAINACAN_BASE_URL . '/assets/js/theme_search.js' , [] , TAINACAN_VERSION, true);
wp_localize_script('tainacan-search', 'tainacan_plugin', \Tainacan\Admin::get_instance()->get_admin_js_localization_params());
}
}
diff --git a/src/views/admin/scss/tainacan-admin.scss b/src/views/admin/scss/tainacan-admin.scss
index 77cbb137b..dc9f8f83c 100644
--- a/src/views/admin/scss/tainacan-admin.scss
+++ b/src/views/admin/scss/tainacan-admin.scss
@@ -1,11 +1,11 @@
// TAINACAN ICON FONT
-@import "../../../assets/css/fonts/tainacanicons.css";
+@import "../../../assets/css/tainacanicons.css";
// Tainacan custom colors and bulma's core
@import "./_variables.scss";
// Import Bulma and Buefy styles
-@import "../../../assets/css/fonts/materialdesignicons.css";
+@import "../../../assets/css/materialdesignicons.css";
@import "../../../../node_modules/bulma/bulma.sass";
@import "../../../../node_modules/buefy/src/scss/buefy.scss";
diff --git a/src/views/class-tainacan-admin.php b/src/views/class-tainacan-admin.php
index 50ace3af6..601f730e0 100644
--- a/src/views/class-tainacan-admin.php
+++ b/src/views/class-tainacan-admin.php
@@ -87,8 +87,8 @@ class Admin {
function add_theme_files() {
global $TAINACAN_BASE_URL;
- // wp_enqueue_style( 'style', $TAINACAN_BASE_URL . '/assets/css/fonts/materialdesignicons.css' );
- wp_enqueue_style( 'tainacan-fonts', $TAINACAN_BASE_URL . '/assets/css/fonts/tainacanicons.css', [], TAINACAN_VERSION );
+ // wp_enqueue_style( 'style', $TAINACAN_BASE_URL . '/assets/css/materialdesignicons.css' );
+ wp_enqueue_style( 'tainacan-fonts', $TAINACAN_BASE_URL . '/assets/css/tainacanicons.css', [], TAINACAN_VERSION );
wp_enqueue_style( 'roboto-fonts', 'https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i', [], TAINACAN_VERSION );
wp_enqueue_script('underscore');
}
@@ -103,7 +103,7 @@ class Admin {
global $TAINACAN_BASE_URL;
- wp_enqueue_script( 'tainacan-roles', $TAINACAN_BASE_URL . '/assets/roles.js', ['underscore', 'wp-i18n'], TAINACAN_VERSION, true );
+ wp_enqueue_script( 'tainacan-roles', $TAINACAN_BASE_URL . '/assets/js/roles.js', ['underscore', 'wp-i18n'], TAINACAN_VERSION, true );
$settings = $this->get_admin_js_localization_params();
wp_localize_script( 'tainacan-roles', 'tainacan_plugin', $settings );
@@ -163,7 +163,7 @@ class Admin {
function add_admin_js() {
global $TAINACAN_BASE_URL;
- wp_enqueue_script( 'tainacan-admin', $TAINACAN_BASE_URL . '/assets/admin.js', ['underscore', 'media-editor', 'media-views', 'customize-controls'], TAINACAN_VERSION, true );
+ wp_enqueue_script( 'tainacan-admin', $TAINACAN_BASE_URL . '/assets/js/admin.js', ['underscore', 'media-editor', 'media-views', 'customize-controls'], TAINACAN_VERSION, true );
$settings = $this->get_admin_js_localization_params();
diff --git a/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php b/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php
index f0b64e577..dc853afc4 100644
--- a/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php
+++ b/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php
@@ -46,7 +46,7 @@ function tainacan_blocks_register_tainacan_terms_list(){
wp_register_script(
'terms-list',
- $TAINACAN_BASE_URL . '/assets/block_terms_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_terms_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor', 'underscore')
);
@@ -69,13 +69,13 @@ function tainacan_blocks_register_tainacan_facets_list(){
wp_enqueue_script(
'facets-list-theme',
- $TAINACAN_BASE_URL . '/assets/block_facets_list_theme.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_facets_list_theme.js',
array('wp-components')
);
wp_register_script(
'facets-list',
- $TAINACAN_BASE_URL . '/assets/block_facets_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_facets_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -99,7 +99,7 @@ function tainacan_blocks_register_tainacan_items_list(){
wp_register_script(
'items-list',
- $TAINACAN_BASE_URL . '/assets/block_items_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_items_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -122,13 +122,13 @@ function tainacan_blocks_register_tainacan_dynamic_items_list(){
wp_enqueue_script(
'dynamic-items-list-theme',
- $TAINACAN_BASE_URL . '/assets/block_dynamic_items_list_theme.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_dynamic_items_list_theme.js',
array('wp-components')
);
wp_register_script(
'dynamic-items-list',
- $TAINACAN_BASE_URL . '/assets/block_dynamic_items_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_dynamic_items_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -152,13 +152,13 @@ function tainacan_blocks_register_tainacan_carousel_items_list(){
wp_enqueue_script(
'carousel-items-list-theme',
- $TAINACAN_BASE_URL . '/assets/block_carousel_items_list_theme.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_carousel_items_list_theme.js',
array('wp-components')
);
wp_register_script(
'carousel-items-list',
- $TAINACAN_BASE_URL . '/assets/block_carousel_items_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_carousel_items_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -182,13 +182,13 @@ function tainacan_blocks_register_tainacan_carousel_terms_list(){
wp_enqueue_script(
'carousel-terms-list-theme',
- $TAINACAN_BASE_URL . '/assets/block_carousel_terms_list_theme.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_carousel_terms_list_theme.js',
array('wp-components')
);
wp_register_script(
'carousel-terms-list',
- $TAINACAN_BASE_URL . '/assets/block_carousel_terms_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_carousel_terms_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -212,13 +212,13 @@ function tainacan_blocks_register_tainacan_search_bar(){
wp_enqueue_script(
'search-bar-theme-script',
- $TAINACAN_BASE_URL . '/assets/block_search_bar_script.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_search_bar_script.js',
array('wp-components')
);
wp_register_script(
'search-bar',
- $TAINACAN_BASE_URL . '/assets/block_search_bar.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_search_bar.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -241,7 +241,7 @@ function tainacan_blocks_register_tainacan_collections_list(){
wp_register_script(
'collections-list',
- $TAINACAN_BASE_URL . '/assets/block_collections_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_collections_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
@@ -264,13 +264,13 @@ function tainacan_blocks_register_tainacan_carousel_collections_list(){
wp_enqueue_script(
'carousel-collections-list-theme',
- $TAINACAN_BASE_URL . '/assets/block_carousel_collections_list_theme.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_carousel_collections_list_theme.js',
array('wp-components')
);
wp_register_script(
'carousel-collections-list',
- $TAINACAN_BASE_URL . '/assets/block_carousel_collections_list.js',
+ $TAINACAN_BASE_URL . '/assets/js/block_carousel_collections_list.js',
array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
);
diff --git a/webpack.config.js b/webpack.config.js
index 3e1a24d65..c43b94021 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -35,8 +35,8 @@ module.exports = {
},
output: {
- path: path.resolve(__dirname, './src/assets/'),
- publicPath: './src/assets/',
+ path: path.resolve(__dirname, './src/assets/js/'),
+ publicPath: './src/assets/js/',
filename: '[name].js'
},
module: {