Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web/app/mu-plugins/juniper-commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ public function block( $args, $assoc_args ) {
$php = "<?php\n\n" .
"add_action('wp_enqueue_scripts', function() {\n" .
"\tif (has_block('acf/$slug_name')) {\n" .
"\t\$time = time();\n" .
"\t\$version = wp_get_theme()->get( 'Version' );\n" .
"\t\$theme_path = get_template_directory_uri();\n\n" .
"\t\twp_enqueue_style('$slug_name-css', \$theme_path . '/dist/blocks/$slug_name/style.css', array(), \$time, 'all');\n" .
"\t\twp_enqueue_script('$slug_name-js', \$theme_path . '/dist/blocks/$slug_name/script.js', array(), \$time, true);\n" .
"\t\twp_enqueue_style('$slug_name-css', \$theme_path . '/dist/blocks/$slug_name/style.css', array(), \$version, 'all');\n" .
"\t\twp_enqueue_script('$slug_name-js', \$theme_path . '/dist/blocks/$slug_name/script.js', array(), \$version, true);\n" .
"\t}\n" .
"});\n\n" .
"add_action('admin_init', function() {\n" .
Expand Down
125 changes: 0 additions & 125 deletions web/app/themes/juniper-theme/.bootstraprc

This file was deleted.

6 changes: 3 additions & 3 deletions web/app/themes/juniper-theme/blocks/cta/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
'wp_enqueue_scripts',
function() {
if ( has_block( 'acf/cta' ) ) {
$time = time();
$version = wp_get_theme()->get( 'Version' );
$theme_path = get_template_directory_uri();

wp_enqueue_style( 'cta-css', $theme_path . '/dist/blocks/cta/style.css', array(), $time, 'all' );
wp_enqueue_script( 'cta-js', $theme_path . '/dist/blocks/cta/script.js', array(), $time, true );
wp_enqueue_style( 'cta-css', $theme_path . '/dist/blocks/cta/style.css', array(), $version, 'all' );
wp_enqueue_script( 'cta-js', $theme_path . '/dist/blocks/cta/script.js', array(), $version, true );
}
}
);
Expand Down
18 changes: 15 additions & 3 deletions web/app/themes/juniper-theme/blocks/filteringposts/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@
'wp_enqueue_scripts',
function() {
if ( has_block( 'acf/filteringposts' ) ) {
wp_enqueue_style( 'filteringposts-css', get_template_directory_uri() . '/dist/blocks/filteringposts/style.css', array(), time(), 'all' );
wp_enqueue_script( 'filteringposts-js', get_template_directory_uri() . '/dist/blocks/filteringposts/script.js', array(), time(), true );
$version = wp_get_theme()->get( 'Version' );
$theme_path = get_template_directory_uri();

wp_enqueue_style( 'filteringposts-css', $theme_path . '/dist/blocks/filteringposts/style.css', array(), $version, 'all' );
wp_enqueue_script( 'filteringposts-js', $theme_path . '/dist/blocks/filteringposts/script.js', array(), $version, true );
}
}
);

add_action(
'admin_init',
function() {
add_editor_style( '/dist/blocks/filteringposts/style.css' );
}
);

add_filter(
'timber/acf-gutenberg-blocks-data/filteringposts',
function( $context ) {}
function( $context ) {
return $context;
}
);

$block_name = 'filteringposts';
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/juniper-theme/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"require": {
"php": ">=8.1",
"timber/timber": "^2.0",
"bartnovak/timber-acf-wp-blocks": "^0.1.0"
"bartnovak/timber-acf-wp-blocks": "^0.2.0"
},
"config": {
"optimize-autoloader": true,
Expand Down
6 changes: 3 additions & 3 deletions web/app/themes/juniper-theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
require_once 'inc/include.php';

function juniper_theme_enqueue() {
$refresh_cache_time = time();
$version = wp_get_theme()->get( 'Version' );
$template_directory_uri = get_template_directory_uri();

wp_enqueue_style( 'app-css', $template_directory_uri . '/dist/src/css/_app.css', array(), $refresh_cache_time );
wp_enqueue_script( 'app-js', $template_directory_uri . '/dist/src/js/_app.js', array(), $refresh_cache_time, true );
wp_enqueue_style( 'app-css', $template_directory_uri . '/dist/src/css/_app.css', array(), $version );
wp_enqueue_script( 'app-js', $template_directory_uri . '/dist/src/js/_app.js', array(), $version, true );
}

add_action( 'wp_enqueue_scripts', 'juniper_theme_enqueue' );
Expand Down
8 changes: 0 additions & 8 deletions web/app/themes/juniper-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@
"name": "parcel-juniper-theme",
"version": "1.0.0",
"dependencies": {
"@barba/core": "^2.10",
"@barba/prefetch": "^2.2",
"bootstrap": "^5.3",
"cypress": "^15.6",
"gsap": "^3.13.0",
"imagesloaded": "^5.0",
"jquery": "^3.7",
"postcss": "^8.5"
},
"devDependencies": {
"@parcel/transformer-sass": "^2.16",
"browserslist": "^4.28",
"eslint": "^8.56",
"eslint-config-airbnb-base": "^15.0",
"husky": "^9.1",
"litepicker": "^2.0",
"parcel": "^2.16",
"sass": "^1.94"
},
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/juniper-theme/patterns/cta.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:heading -->
<h2 class="wp-block-heading asddsa">Testing 123123</h2>
<h2 class="wp-block-heading">Testing</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
Expand Down
1 change: 0 additions & 1 deletion web/app/themes/juniper-theme/src/css/_app.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@use 'base';
@use 'vendor/swiper';
Loading
Loading