Skip to content

Commit

Permalink
Merge pull request #56 from kingdom-one/kjroelke/issue55
Browse files Browse the repository at this point in the history
create staffing page
  • Loading branch information
kjroelke authored Aug 19, 2023
2 parents 1784703 + 9670fb7 commit 0a6fd71
Show file tree
Hide file tree
Showing 30 changed files with 415 additions and 37 deletions.
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.6.0

- Now with /staffing!

## v0.5.0

- Now with single and archive templates for posts!
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const jsFiles = [
'pricing',
'k1-about',
'get-started',
'staffing',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/k1-theme/dist/communications.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '450ddf53e9447ab03a1d');
<?php return array('dependencies' => array(), 'version' => 'f2693a79e8ba4483dd51');
2 changes: 1 addition & 1 deletion wp-content/themes/k1-theme/dist/communications.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-content/themes/k1-theme/dist/global.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '088dca6749dacb4271e8');
<?php return array('dependencies' => array(), 'version' => '0a386d3b8edadc7048ec');
2 changes: 1 addition & 1 deletion wp-content/themes/k1-theme/dist/global.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-content/themes/k1-theme/dist/hrPage.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'aeb1046e9b501a5adb52');
<?php return array('dependencies' => array(), 'version' => '1d668098a014a9d40c15');
2 changes: 1 addition & 1 deletion wp-content/themes/k1-theme/dist/hrPage.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions wp-content/themes/k1-theme/dist/staffing.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '4c0f285b9b36535a0b00');
5 changes: 5 additions & 0 deletions wp-content/themes/k1-theme/dist/staffing.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions wp-content/themes/k1-theme/dist/staffing.js

Large diffs are not rendered by default.

30 changes: 21 additions & 9 deletions wp-content/themes/k1-theme/inc/theme/theme-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,25 @@ function k1_get_image_asset_url( string $file, string $extension, string $folder
* @param array $deps Optional array of dependencies.
*/
function k1_enqueue_page_style( string $id, array $deps = array( 'main' ) ) {
$total_deps = array_merge( $deps, array( 'main' ) );
wp_enqueue_style(
$id,
get_stylesheet_directory_uri() . "/dist/{$id}.css",
$total_deps,
filemtime( get_stylesheet_directory() . "/dist/{$id}.css" )
);
$asset_file = get_stylesheet_directory() . "/dist/{$id}.asset.php";

if ( file_exists( $asset_file ) ) {
$asset = include $asset_file;
$total_deps = array_merge( $deps, array( 'main' ) );
wp_enqueue_style(
$id,
get_stylesheet_directory_uri() . "/dist/{$id}.css",
$total_deps,
$asset['version']
);
} else {
wp_enqueue_style(
$id,
get_stylesheet_directory_uri() . "/dist/{$id}.css",
$deps,
null,
);
}
}

/**
Expand All @@ -73,7 +85,7 @@ function k1_enqueue_page_script( string $id, array $deps = array( 'main' ) ) {
$asset_file = get_stylesheet_directory() . "/dist/{$id}.asset.php";

if ( file_exists( $asset_file ) ) {
$asset = require $asset_file;
$asset = include $asset_file;

wp_enqueue_script(
$id,
Expand All @@ -87,7 +99,7 @@ function k1_enqueue_page_script( string $id, array $deps = array( 'main' ) ) {
$id,
get_stylesheet_directory_uri() . "/dist/{$id}.js",
$deps,
filemtime( get_stylesheet_directory() . "/dist/{$id}.js" ),
null,
true
);
}
Expand Down
13 changes: 8 additions & 5 deletions wp-content/themes/k1-theme/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

$content = new Content_Sections();
get_header();
if ( ! is_archive() ) :
?>
?>
<?php if ( ! is_archive() ) : ?>

<main class="site-content <?php echo $post->post_name; ?>">
<?php $content->hero_section( get_the_ID() ); ?>
Expand Down Expand Up @@ -39,11 +39,14 @@
case ( 'employee-retention-credit' ):
get_template_part( 'templates/page', 'employee-retention-credit' );
break;
case ( 'staffing' ):
get_template_part( 'templates/page', 'staffing' );
break;
default:
the_content();
}
?>
</main>
<?php
endif;
get_footer(); ?>
<?php endif; ?>
<?php
get_footer();
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0a6fd71

Please sign in to comment.