Skip to content

Commit

Permalink
rewrite front js in vanilla - Fix philbuchanan#121
Browse files Browse the repository at this point in the history
add alignment support - Fix philbuchanan#103

use hidden until-found - Fix philbuchanan#161

Remove the use of children - Maybe Fix philbuchanan#117

add resize event dispatch - Fix philbuchanan#59

revert removal of the button option

use <accordion-item> custom element
add js documentation
requestIdleCallback before window scroll

remove use of "window."
  • Loading branch information
Corentin Gautier committed Jul 31, 2022
1 parent ecee6dd commit 4d1f75a
Show file tree
Hide file tree
Showing 15 changed files with 32,212 additions and 31,283 deletions.
6 changes: 3 additions & 3 deletions accordion-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function enqueue_frontend_assets() {
wp_register_script(
'pb-accordion-blocks-frontend-script',
plugins_url("js/accordion-blocks$min.js", __FILE__),
array('jquery'),
null,
$this->plugin_version,
true
);
Expand All @@ -110,7 +110,7 @@ public function enqueue_frontend_assets() {

if ($load_scripts_globally || has_block('pb/accordion-item', get_the_ID())) {
wp_enqueue_script('pb-accordion-blocks-frontend-script');
wp_enqueue_style('pb-accordion-blocks-style');
wp_enqueue_style('pb-accordion-blocks-style');
}
}

Expand All @@ -121,7 +121,7 @@ public function enqueue_frontend_assets() {
*/
public function enqueue_assets_on_render($output) {
wp_enqueue_script('pb-accordion-blocks-frontend-script');
wp_enqueue_style('pb-accordion-blocks-style');
wp_enqueue_style('pb-accordion-blocks-style');
return $output;
}

Expand Down
3 changes: 2 additions & 1 deletion block.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
}
},
"supports": {
"anchor": true
"anchor": true,
"align": true
},
"editorScript": "file:./build/index.js",
"editorStyle": "file:./build/index.css"
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '348416c729ba3f21f077b8a632fd9ba7');
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '486ee08b32cf35239445b86fc13385b8');
4 changes: 2 additions & 2 deletions build/index.css

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

2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4d1f75a

Please sign in to comment.