diff --git a/README.md b/README.md index e2359534f..3c3403905 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Install theme dependencies and trigger an initial build. >Note: You will need to have Composer 2 and NPM 9 installed first. ```bash -npm i +npm i && composer i ``` ### Development diff --git a/src/critical.js b/assets/critical.js similarity index 100% rename from src/critical.js rename to assets/critical.js diff --git a/src/fonts/inter/Inter-Black.woff2 b/assets/fonts/inter/Inter-Black.woff2 similarity index 100% rename from src/fonts/inter/Inter-Black.woff2 rename to assets/fonts/inter/Inter-Black.woff2 diff --git a/src/fonts/inter/Inter-Bold.woff2 b/assets/fonts/inter/Inter-Bold.woff2 similarity index 100% rename from src/fonts/inter/Inter-Bold.woff2 rename to assets/fonts/inter/Inter-Bold.woff2 diff --git a/src/fonts/inter/Inter-Light.woff2 b/assets/fonts/inter/Inter-Light.woff2 similarity index 100% rename from src/fonts/inter/Inter-Light.woff2 rename to assets/fonts/inter/Inter-Light.woff2 diff --git a/src/fonts/inter/Inter-Regular.woff2 b/assets/fonts/inter/Inter-Regular.woff2 similarity index 100% rename from src/fonts/inter/Inter-Regular.woff2 rename to assets/fonts/inter/Inter-Regular.woff2 diff --git a/src/fonts/inter/LICENSE.txt b/assets/fonts/inter/LICENSE.txt similarity index 100% rename from src/fonts/inter/LICENSE.txt rename to assets/fonts/inter/LICENSE.txt diff --git a/src/fonts/oxygen/OFL.txt b/assets/fonts/oxygen/OFL.txt similarity index 100% rename from src/fonts/oxygen/OFL.txt rename to assets/fonts/oxygen/OFL.txt diff --git a/src/fonts/oxygen/oxygen-v15-latin-300.woff2 b/assets/fonts/oxygen/oxygen-v15-latin-300.woff2 similarity index 100% rename from src/fonts/oxygen/oxygen-v15-latin-300.woff2 rename to assets/fonts/oxygen/oxygen-v15-latin-300.woff2 diff --git a/src/fonts/oxygen/oxygen-v15-latin-700.woff2 b/assets/fonts/oxygen/oxygen-v15-latin-700.woff2 similarity index 100% rename from src/fonts/oxygen/oxygen-v15-latin-700.woff2 rename to assets/fonts/oxygen/oxygen-v15-latin-700.woff2 diff --git a/src/fonts/oxygen/oxygen-v15-latin-regular.woff2 b/assets/fonts/oxygen/oxygen-v15-latin-regular.woff2 similarity index 100% rename from src/fonts/oxygen/oxygen-v15-latin-regular.woff2 rename to assets/fonts/oxygen/oxygen-v15-latin-regular.woff2 diff --git a/src/images/icons/caret-down.svg b/assets/images/icons/caret-down.svg similarity index 100% rename from src/images/icons/caret-down.svg rename to assets/images/icons/caret-down.svg diff --git a/src/images/icons/close.svg b/assets/images/icons/close.svg similarity index 100% rename from src/images/icons/close.svg rename to assets/images/icons/close.svg diff --git a/src/images/icons/facebook-square.svg b/assets/images/icons/facebook-square.svg similarity index 100% rename from src/images/icons/facebook-square.svg rename to assets/images/icons/facebook-square.svg diff --git a/src/images/icons/hamburger.svg b/assets/images/icons/hamburger.svg similarity index 100% rename from src/images/icons/hamburger.svg rename to assets/images/icons/hamburger.svg diff --git a/src/images/icons/instagram-square.svg b/assets/images/icons/instagram-square.svg similarity index 100% rename from src/images/icons/instagram-square.svg rename to assets/images/icons/instagram-square.svg diff --git a/src/images/icons/linkedin-square.svg b/assets/images/icons/linkedin-square.svg similarity index 100% rename from src/images/icons/linkedin-square.svg rename to assets/images/icons/linkedin-square.svg diff --git a/src/images/icons/pause.svg b/assets/images/icons/pause.svg similarity index 100% rename from src/images/icons/pause.svg rename to assets/images/icons/pause.svg diff --git a/src/images/icons/play.svg b/assets/images/icons/play.svg similarity index 100% rename from src/images/icons/play.svg rename to assets/images/icons/play.svg diff --git a/src/images/icons/twitter-square.svg b/assets/images/icons/twitter-square.svg similarity index 100% rename from src/images/icons/twitter-square.svg rename to assets/images/icons/twitter-square.svg diff --git a/src/images/placeholder.png b/assets/images/placeholder.png similarity index 100% rename from src/images/placeholder.png rename to assets/images/placeholder.png diff --git a/src/index.js b/assets/index.js similarity index 100% rename from src/index.js rename to assets/index.js diff --git a/src/js/blocks/custom/.gitkeep b/assets/js/blocks/custom/.gitkeep similarity index 100% rename from src/js/blocks/custom/.gitkeep rename to assets/js/blocks/custom/.gitkeep diff --git a/src/js/blocks/index.js b/assets/js/blocks/index.js similarity index 100% rename from src/js/blocks/index.js rename to assets/js/blocks/index.js diff --git a/src/js/global/index.js b/assets/js/global/index.js similarity index 100% rename from src/js/global/index.js rename to assets/js/global/index.js diff --git a/src/js/global/js-enabled.js b/assets/js/global/js-enabled.js similarity index 100% rename from src/js/global/js-enabled.js rename to assets/js/global/js-enabled.js diff --git a/src/js/global/window-ready.js b/assets/js/global/window-ready.js similarity index 100% rename from src/js/global/window-ready.js rename to assets/js/global/window-ready.js diff --git a/src/js/index.js b/assets/js/index.js similarity index 100% rename from src/js/index.js rename to assets/js/index.js diff --git a/src/js/template-tags/index.js b/assets/js/template-tags/index.js similarity index 100% rename from src/js/template-tags/index.js rename to assets/js/template-tags/index.js diff --git a/src/js/template-tags/mobile-menu.js b/assets/js/template-tags/mobile-menu.js similarity index 100% rename from src/js/template-tags/mobile-menu.js rename to assets/js/template-tags/mobile-menu.js diff --git a/src/js/template-tags/modal.js b/assets/js/template-tags/modal.js similarity index 100% rename from src/js/template-tags/modal.js rename to assets/js/template-tags/modal.js diff --git a/src/js/template-tags/navigation-primary.js b/assets/js/template-tags/navigation-primary.js similarity index 100% rename from src/js/template-tags/navigation-primary.js rename to assets/js/template-tags/navigation-primary.js diff --git a/src/js/template-tags/off-canvas.js b/assets/js/template-tags/off-canvas.js similarity index 100% rename from src/js/template-tags/off-canvas.js rename to assets/js/template-tags/off-canvas.js diff --git a/src/js/template-tags/table.js b/assets/js/template-tags/table.js similarity index 100% rename from src/js/template-tags/table.js rename to assets/js/template-tags/table.js diff --git a/src/js/template-tags/video.js b/assets/js/template-tags/video.js similarity index 100% rename from src/js/template-tags/video.js rename to assets/js/template-tags/video.js diff --git a/src/js/templates/index.js b/assets/js/templates/index.js similarity index 100% rename from src/js/templates/index.js rename to assets/js/templates/index.js diff --git a/src/scss/blocks/core/index.scss b/assets/scss/blocks/core/index.scss similarity index 100% rename from src/scss/blocks/core/index.scss rename to assets/scss/blocks/core/index.scss diff --git a/src/scss/blocks/custom/.gitkeep b/assets/scss/blocks/custom/.gitkeep similarity index 100% rename from src/scss/blocks/custom/.gitkeep rename to assets/scss/blocks/custom/.gitkeep diff --git a/src/scss/blocks/custom/index.scss b/assets/scss/blocks/custom/index.scss similarity index 100% rename from src/scss/blocks/custom/index.scss rename to assets/scss/blocks/custom/index.scss diff --git a/src/scss/blocks/index.scss b/assets/scss/blocks/index.scss similarity index 100% rename from src/scss/blocks/index.scss rename to assets/scss/blocks/index.scss diff --git a/src/scss/critical.scss b/assets/scss/critical.scss similarity index 100% rename from src/scss/critical.scss rename to assets/scss/critical.scss diff --git a/src/scss/critical/_footer.scss b/assets/scss/critical/_footer.scss similarity index 100% rename from src/scss/critical/_footer.scss rename to assets/scss/critical/_footer.scss diff --git a/src/scss/critical/_header.scss b/assets/scss/critical/_header.scss similarity index 100% rename from src/scss/critical/_header.scss rename to assets/scss/critical/_header.scss diff --git a/src/scss/critical/_menus.scss b/assets/scss/critical/_menus.scss similarity index 100% rename from src/scss/critical/_menus.scss rename to assets/scss/critical/_menus.scss diff --git a/src/scss/critical/index.scss b/assets/scss/critical/index.scss similarity index 100% rename from src/scss/critical/index.scss rename to assets/scss/critical/index.scss diff --git a/src/scss/global/_editor.scss b/assets/scss/global/_editor.scss similarity index 100% rename from src/scss/global/_editor.scss rename to assets/scss/global/_editor.scss diff --git a/src/scss/global/_global.scss b/assets/scss/global/_global.scss similarity index 100% rename from src/scss/global/_global.scss rename to assets/scss/global/_global.scss diff --git a/src/scss/global/index.scss b/assets/scss/global/index.scss similarity index 100% rename from src/scss/global/index.scss rename to assets/scss/global/index.scss diff --git a/src/scss/index.scss b/assets/scss/index.scss similarity index 100% rename from src/scss/index.scss rename to assets/scss/index.scss diff --git a/src/scss/tailwind.scss b/assets/scss/tailwind.scss similarity index 100% rename from src/scss/tailwind.scss rename to assets/scss/tailwind.scss diff --git a/src/scss/template-tags/index.scss b/assets/scss/template-tags/index.scss similarity index 100% rename from src/scss/template-tags/index.scss rename to assets/scss/template-tags/index.scss diff --git a/src/scss/templates/index.scss b/assets/scss/templates/index.scss similarity index 100% rename from src/scss/templates/index.scss rename to assets/scss/templates/index.scss diff --git a/src/tailwind-preflight.css b/assets/tailwind-preflight.css similarity index 100% rename from src/tailwind-preflight.css rename to assets/tailwind-preflight.css diff --git a/composer.lock b/composer.lock index 5a856ba74..e458cb40b 100644 --- a/composer.lock +++ b/composer.lock @@ -155,16 +155,16 @@ "packages-dev": [ { "name": "composer/ca-bundle", - "version": "1.3.6", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "90d087e988ff194065333d16bc5cf649872d9cdb" + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/90d087e988ff194065333d16bc5cf649872d9cdb", - "reference": "90d087e988ff194065333d16bc5cf649872d9cdb", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", "shasum": "" }, "require": { @@ -211,7 +211,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.6" + "source": "https://github.com/composer/ca-bundle/tree/1.3.7" }, "funding": [ { @@ -227,7 +227,7 @@ "type": "tidelift" } ], - "time": "2023-06-06T12:02:59+00:00" + "time": "2023-08-30T09:31:38+00:00" }, { "name": "composer/composer", @@ -470,16 +470,16 @@ }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -529,9 +529,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -547,7 +547,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/spdx-licenses", @@ -4005,16 +4005,16 @@ }, { "name": "wp-cli/media-command", - "version": "v2.0.18", + "version": "v2.0.19", "source": { "type": "git", "url": "https://github.com/wp-cli/media-command.git", - "reference": "92fc32580a16a70ccc028786896d22f6ca51a261" + "reference": "3d167f43b019a13738f4e082c3c33f8f9ea82bbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/media-command/zipball/92fc32580a16a70ccc028786896d22f6ca51a261", - "reference": "92fc32580a16a70ccc028786896d22f6ca51a261", + "url": "https://api.github.com/repos/wp-cli/media-command/zipball/3d167f43b019a13738f4e082c3c33f8f9ea82bbb", + "reference": "3d167f43b019a13738f4e082c3c33f8f9ea82bbb", "shasum": "" }, "require": { @@ -4061,9 +4061,9 @@ "homepage": "https://github.com/wp-cli/media-command", "support": { "issues": "https://github.com/wp-cli/media-command/issues", - "source": "https://github.com/wp-cli/media-command/tree/v2.0.18" + "source": "https://github.com/wp-cli/media-command/tree/v2.0.19" }, - "time": "2023-07-13T14:04:45+00:00" + "time": "2023-08-30T11:14:00+00:00" }, { "name": "wp-cli/mustangostang-spyc", diff --git a/footer.php b/footer.php index 182fbdf3d..815e0378d 100644 --- a/footer.php +++ b/footer.php @@ -9,13 +9,20 @@ * @package wd_s */ +use function WebDevStudios\wd_s\print_copyright_text; ?> diff --git a/inc/customizer/assets/scripts/livepreview.js b/inc/customizer/assets/scripts/livepreview.js index c230b92a5..c6ec82637 100644 --- a/inc/customizer/assets/scripts/livepreview.js +++ b/inc/customizer/assets/scripts/livepreview.js @@ -42,13 +42,6 @@ } ); } ); - // Background image. - api( 'background_image', function ( value ) { - value.bind( function ( to ) { - $( 'body' ).toggleClass( 'custom-background-image', '' !== to ); - } ); - } ); - // Copyright text. api( 'wd_s_copyright_text', function ( value ) { value.bind( function ( to ) { diff --git a/inc/customizer/customizer.php b/inc/customizer/customizer.php index 93f2822c8..54a67896a 100644 --- a/inc/customizer/customizer.php +++ b/inc/customizer/customizer.php @@ -88,7 +88,6 @@ function live_preview_support( $wp_customize ) { 'blogname', 'blogdescription', 'header_textcolor', - 'background_image', 'wd_s_copyright_text', ]; diff --git a/inc/customizer/sections.php b/inc/customizer/sections.php index 660252d7e..8e101b101 100644 --- a/inc/customizer/sections.php +++ b/inc/customizer/sections.php @@ -25,27 +25,6 @@ function customize_sections( $wp_customize ) { ] ); - // Register a social links section. - $wp_customize->add_section( - 'wd_s_social_links_section', - [ - 'title' => esc_html__( 'Social Media', 'wd_s' ), - 'description' => esc_html__( 'Links here power the print_social_network_links() template tag.', 'wd_s' ), - 'priority' => 90, - 'panel' => 'site-options', - ] - ); - - // Register a header section. - $wp_customize->add_section( - 'wd_s_header_section', - [ - 'title' => esc_html__( 'Header Customizations', 'wd_s' ), - 'priority' => 90, - 'panel' => 'site-options', - ] - ); - // Register a footer section. $wp_customize->add_section( 'wd_s_footer_section', diff --git a/inc/customizer/settings.php b/inc/customizer/settings.php index 74c0c9d66..67007d4ad 100644 --- a/inc/customizer/settings.php +++ b/inc/customizer/settings.php @@ -58,47 +58,6 @@ function customize_additional_scripts( $wp_customize ) { add_action( 'customize_register', __NAMESPACE__ . '\customize_additional_scripts' ); -/** - * Register a social icons setting. - * - * @author WebDevStudios - * - * @param WP_Customize_Manager $wp_customize Instance of WP_Customize_Manager. - */ -function customize_social_icons( $wp_customize ) { - // Create an array of our social links for ease of setup. - $social_networks = [ - 'facebook', - 'instagram', - 'twitter', - 'linkedin', - ]; - - // Loop through our networks to setup our fields. - foreach ( $social_networks as $network ) { - - // Register a setting. - $wp_customize->add_setting( - 'wd_s_' . $network . '_link', - [ - 'default' => '', - 'sanitize_callback' => 'esc_url', - ] - ); - - // Create the setting field. - $wp_customize->add_control( - 'wd_s_' . $network . '_link', - [ - 'label' => /* translators: the social network name. */ sprintf( esc_attr__( '%s URL', 'wd_s' ), ucwords( $network ) ), - 'section' => 'wd_s_social_links_section', - 'type' => 'text', - ] - ); - } -} - -add_action( 'customize_register', __NAMESPACE__ . '\customize_social_icons' ); /** * Register copyright text setting. diff --git a/inc/setup/scripts.php b/inc/setup/scripts.php index c26c08be8..e21a9279c 100644 --- a/inc/setup/scripts.php +++ b/inc/setup/scripts.php @@ -26,7 +26,7 @@ function scripts() { // Register styles & scripts. wp_enqueue_style( 'wd_s-styles', get_stylesheet_directory_uri() . '/build/index.css', [], $asset_file['version'] ); - wp_enqueue_style( 'custom-preflight', get_stylesheet_directory_uri() . '/src/tailwind-preflight.css', [], $asset_file['version'] ); + wp_enqueue_style( 'custom-preflight', get_stylesheet_directory_uri() . '/assets/tailwind-preflight.css', [], $asset_file['version'] ); wp_enqueue_script( 'wd_s-scripts', get_stylesheet_directory_uri() . '/build/index.js', $asset_file['dependencies'], $asset_file['version'], true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { diff --git a/inc/template-tags/print-copyright-text.php b/inc/template-tags/print-copyright-text.php new file mode 100644 index 000000000..eb3d38523 --- /dev/null +++ b/inc/template-tags/print-copyright-text.php @@ -0,0 +1,22 @@ + -
- - init_filesystem()->copy( $asset_scss, ROOT_PATH . 'src/scss/blocks/custom/' . $this->name . '.editor.scss' ) ) { + if ( ! $this->init_filesystem()->copy( $asset_scss, ROOT_PATH . 'assets/scss/blocks/custom/' . $this->name . '.editor.scss' ) ) { WP_CLI::error( 'ERROR :: Could not create styles file.', true ); } // add js file for build process. if ( ! $this->init_filesystem()->put_contents( - ROOT_PATH . 'src/js/blocks/custom/' . $this->name . '.editor.js', + ROOT_PATH . 'assets/js/blocks/custom/' . $this->name . '.editor.js', "import '../../../scss/blocks/custom/" . $this->name . ".editor.scss';\n" ) ) { @@ -274,14 +274,14 @@ private function create_block_assets() { } // copy styles. - if ( ! $this->init_filesystem()->copy( $asset_scss, ROOT_PATH . 'src/scss/blocks/custom/' . $this->name . '.scss' ) ) { + if ( ! $this->init_filesystem()->copy( $asset_scss, ROOT_PATH . 'assets/scss/blocks/custom/' . $this->name . '.scss' ) ) { WP_CLI::error( 'ERROR :: Could not create styles file.', true ); } // add js file for build process. if ( ! $this->init_filesystem()->put_contents( - ROOT_PATH . 'src/js/blocks/custom/' . $this->name . '.js', + ROOT_PATH . 'assets/js/blocks/custom/' . $this->name . '.js', "import '../../../scss/blocks/custom/" . $this->name . ".scss';\n" ) ) { diff --git a/patterns/cta.php b/patterns/cta.php new file mode 100644 index 000000000..97b8606e3 --- /dev/null +++ b/patterns/cta.php @@ -0,0 +1,26 @@ + + + +