Skip to content

Commit

Permalink
Merge branch 'bugfix/characters' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipstenu committed Mar 27, 2024
2 parents 0207174 + bbd78cd commit 4bbc3cc
Show file tree
Hide file tree
Showing 38 changed files with 1,108 additions and 775 deletions.
2 changes: 1 addition & 1 deletion archive-post_type_actors.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
/* Start the Loop */
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/excerpt', 'post_type_actors' );
get_template_part( 'template-parts/excerpt', 'post_type_actors', array( 'actor' => get_the_ID() ) );
endwhile;
} else {
get_template_part( 'template-parts/content', 'none' );
Expand Down
2 changes: 1 addition & 1 deletion archive-post_type_characters.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
/* Start the Loop */
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/excerpt', 'post_type_characters' );
get_template_part( 'template-parts/excerpt', 'post_type_characters', array( 'character' => get_the_ID() ) );
}
} else {
get_template_part( 'template-parts/content', 'none' );
Expand Down
8 changes: 6 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ function lwtv_custom_excerpt_length( $length ) {
/*
* Custom Image Sizes
*
* character-img - used on show and character pages
* show-img - used as header image for shows
* character-img - Used on show and character pages
* show-img - Used as header image for shows
* postloop-img - Used in the post loop
* relatedshow-img - Used in the related shows section
* headshot-tiny - Used on relationships lists
*/
add_image_size( 'character-img', 350, 412, true );
add_image_size( 'show-img', 960, 400, true );
add_image_size( 'postloop-img', 525, 300, true );
add_image_size( 'relatedshow-img', 340, 150, true );
add_image_size( 'headshot-tiny', 50, 50, true );

/**
* Comments
Expand Down
30 changes: 1 addition & 29 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,7 @@
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php
if ( is_front_page() ) {
?>
<!-- Preload the LCP images with a high fetchpriority so it starts loading with the stylesheet. -->
<?php
$image = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' );

if ( has_header_image() ) {
$header_image = get_header_image();

if ( str_ends_with( $header_image, 'webp' ) ) {
$image_type = 'webp';
} elseif ( str_ends_with( $header_image, 'png' ) ) {
$image_type = 'png';
} else {
$image_type = 'jpeg';
}
?>
<link rel="preload" fetchpriority="high" as="image" href="<?php echo esc_url( $header_image ); ?>" type="image/<?php echo esc_attr( $image_type ); ?>">
<?php
}

if ( false !== $image ) {
?>
<link rel="preload" fetchpriority="high" as="image" href="<?php echo esc_url( $image[0] ); ?>" type="image/png">
<?php
}
}
?>
<?php get_template_part( 'template-parts/header', 'lcp', array( 'post_id' => get_the_ID() ) ); ?>

<?php wp_head(); ?>
</head>
Expand Down
2 changes: 1 addition & 1 deletion sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
case 'post_type_actors':
case 'post_type_characters':
case 'post_type_shows':
get_template_part( 'template-parts/sidebar', get_post_type() );
get_template_part( 'template-parts/sidebar', get_post_type(), array( 'the_post_id' => get_the_ID() ) );
break;
default:
dynamic_sidebar( 'sidebar-2' );
Expand Down
11 changes: 11 additions & 0 deletions style.css

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

2 changes: 1 addition & 1 deletion style.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions style.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,18 @@ table.lwtvc {
padding: 0;
}
}

#characterActors.accordion, #characterShows.accordion {
--bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem $lwtv-grey2;
button {
font-family: "Open Sans", sans-serif;
font-size: $basefont;
padding: .2rem 0;
}
.accordion-button:not(.collapsed) {
background-color: $lwtv-grey2;
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
the_post();
switch ( get_post_type( get_the_ID() ) ) {
case 'post_type_characters':
get_template_part( 'template-parts/excerpt', 'post_type_characters' );
get_template_part( 'template-parts/excerpt', 'post_type_characters', array( 'character' => get_the_ID() ) );
break;
case 'post_type_shows':
get_template_part( 'template-parts/excerpt', 'post_type_shows' );
Expand Down
Loading

0 comments on commit 4bbc3cc

Please sign in to comment.