Updates do assets folder structure.

This commit is contained in:
Mateus Machado Luna 2020-01-14 13:26:15 -03:00
parent 0314a384f7
commit e074dd3f8a
21 changed files with 97 additions and 33 deletions

2
.gitignore vendored
View File

@ -11,7 +11,7 @@ vendor
src/vendor src/vendor
node_modules node_modules
npm-debug.log npm-debug.log
src/assets/*.js src/assets/js/*.js
last-js-build.md5 last-js-build.md5
last-sass-build.md5 last-sass-build.md5
last-composer-build.md5 last-composer-build.md5

View File

@ -1,8 +1,8 @@
/* MaterialDesignIcons.com */ /* MaterialDesignIcons.com */
@font-face { @font-face {
font-family: "Material Design Icons"; font-family: "Material Design Icons";
src: url("../fonts/materialdesignicons-webfont.eot?v=2.1.19"); src: url("./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?#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-weight: normal;
font-style: normal; font-style: normal;
} }

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

64
src/assets/js/report.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -105,7 +105,7 @@ class Theme_Helper {
global $TAINACAN_BASE_URL; 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 ) { 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(); //\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()); wp_localize_script('tainacan-search', 'tainacan_plugin', \Tainacan\Admin::get_instance()->get_admin_js_localization_params());
} }
} }

View File

@ -1,11 +1,11 @@
// TAINACAN ICON FONT // TAINACAN ICON FONT
@import "../../../assets/css/fonts/tainacanicons.css"; @import "../../../assets/css/tainacanicons.css";
// Tainacan custom colors and bulma's core // Tainacan custom colors and bulma's core
@import "./_variables.scss"; @import "./_variables.scss";
// Import Bulma and Buefy styles // 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/bulma/bulma.sass";
@import "../../../../node_modules/buefy/src/scss/buefy.scss"; @import "../../../../node_modules/buefy/src/scss/buefy.scss";

View File

@ -87,8 +87,8 @@ class Admin {
function add_theme_files() { function add_theme_files() {
global $TAINACAN_BASE_URL; global $TAINACAN_BASE_URL;
// wp_enqueue_style( 'style', $TAINACAN_BASE_URL . '/assets/css/fonts/materialdesignicons.css' ); // wp_enqueue_style( 'style', $TAINACAN_BASE_URL . '/assets/css/materialdesignicons.css' );
wp_enqueue_style( 'tainacan-fonts', $TAINACAN_BASE_URL . '/assets/css/fonts/tainacanicons.css', [], TAINACAN_VERSION ); 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_style( 'roboto-fonts', 'https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i', [], TAINACAN_VERSION );
wp_enqueue_script('underscore'); wp_enqueue_script('underscore');
} }
@ -103,7 +103,7 @@ class Admin {
global $TAINACAN_BASE_URL; 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(); $settings = $this->get_admin_js_localization_params();
wp_localize_script( 'tainacan-roles', 'tainacan_plugin', $settings ); wp_localize_script( 'tainacan-roles', 'tainacan_plugin', $settings );
@ -163,7 +163,7 @@ class Admin {
function add_admin_js() { function add_admin_js() {
global $TAINACAN_BASE_URL; 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(); $settings = $this->get_admin_js_localization_params();

View File

@ -46,7 +46,7 @@ function tainacan_blocks_register_tainacan_terms_list(){
wp_register_script( wp_register_script(
'terms-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor', 'underscore')
); );
@ -69,13 +69,13 @@ function tainacan_blocks_register_tainacan_facets_list(){
wp_enqueue_script( wp_enqueue_script(
'facets-list-theme', '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') array('wp-components')
); );
wp_register_script( wp_register_script(
'facets-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -99,7 +99,7 @@ function tainacan_blocks_register_tainacan_items_list(){
wp_register_script( wp_register_script(
'items-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -122,13 +122,13 @@ function tainacan_blocks_register_tainacan_dynamic_items_list(){
wp_enqueue_script( wp_enqueue_script(
'dynamic-items-list-theme', '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') array('wp-components')
); );
wp_register_script( wp_register_script(
'dynamic-items-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -152,13 +152,13 @@ function tainacan_blocks_register_tainacan_carousel_items_list(){
wp_enqueue_script( wp_enqueue_script(
'carousel-items-list-theme', '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') array('wp-components')
); );
wp_register_script( wp_register_script(
'carousel-items-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -182,13 +182,13 @@ function tainacan_blocks_register_tainacan_carousel_terms_list(){
wp_enqueue_script( wp_enqueue_script(
'carousel-terms-list-theme', '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') array('wp-components')
); );
wp_register_script( wp_register_script(
'carousel-terms-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -212,13 +212,13 @@ function tainacan_blocks_register_tainacan_search_bar(){
wp_enqueue_script( wp_enqueue_script(
'search-bar-theme-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') array('wp-components')
); );
wp_register_script( wp_register_script(
'search-bar', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -241,7 +241,7 @@ function tainacan_blocks_register_tainacan_collections_list(){
wp_register_script( wp_register_script(
'collections-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );
@ -264,13 +264,13 @@ function tainacan_blocks_register_tainacan_carousel_collections_list(){
wp_enqueue_script( wp_enqueue_script(
'carousel-collections-list-theme', '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') array('wp-components')
); );
wp_register_script( wp_register_script(
'carousel-collections-list', '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') array('wp-blocks', 'wp-element', 'wp-components', 'wp-editor')
); );

View File

@ -35,8 +35,8 @@ module.exports = {
}, },
output: { output: {
path: path.resolve(__dirname, './src/assets/'), path: path.resolve(__dirname, './src/assets/js/'),
publicPath: './src/assets/', publicPath: './src/assets/js/',
filename: '[name].js' filename: '[name].js'
}, },
module: { module: {