Skip to content

Commit

Permalink
Merge pull request #212 from LezWatch/feature/improve-char-lists
Browse files Browse the repository at this point in the history
Improve Char and Show pages
  • Loading branch information
Ipstenu authored Apr 7, 2024
2 parents 3240461 + 4ace336 commit 4dfc9b4
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 18 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function lwtv_admin_notice_missing_plugin() {
// Versioning for efficient developers.
if ( ! defined( 'LWTV_THEME_VERSION' ) ) {
$versions = array(
'lwtv-underscores' => '6.0.4', // Bump this any time you make serious CSS changes.
'lwtv-underscores' => '6.0.5', // Bump this any time you make serious CSS changes.
'font-awesome' => '6.5.2', // Bump when you update Font Awesome.
'bootstrap' => '5.3.3', // Bump when you update bootstrap.
'lwtv-blocks' => '1.0.0', // Bump when you update the blocks.
Expand Down
6 changes: 5 additions & 1 deletion related-post-plugin/related-posts-lwtv-cards.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
);
?>
<div class="card mb-3">
<img src="<?php echo esc_url( get_the_post_thumbnail_url( $the_id, 'relatedshow-img' ) ); ?>" class="card-img-top" alt="<?php echo esc_html( $thumb_title ); ?>">
<div class="show-like-this-image-wrapper">
<a href="<?php the_permalink( $the_id ); ?>">
<img src="<?php echo esc_url( get_the_post_thumbnail_url( $the_id, 'relatedshow-img' ) ); ?>" class="card-img-top" alt="<?php echo esc_html( $thumb_title ); ?>">
</a>
</div>

<div class="card-body">
<h5 class="card-title">
Expand Down
20 changes: 15 additions & 5 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.

19 changes: 15 additions & 4 deletions style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://lezwatchtv.com/
Author: Tracy Levesque, Mika Epstein
Author URI: https://lezwatchtv.com/
Description: LezWatch.TV Theme Episode III - Return of the Custom Theme
Version: 6.0.4
Version: 6.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yikes_starter
Expand Down Expand Up @@ -754,9 +754,10 @@ section {
background-position: center top;
}

img.card-img-top {
height: 150px;
width: 340px;
.show-like-this-image-wrapper {
max-height: 125px;
overflow: hidden;
display: inline;
}
}
}
Expand Down Expand Up @@ -1150,6 +1151,12 @@ table.lwtvc {
}
}

.related-article-image-wrapper {
max-height: 100px;
overflow: hidden;
display: inline;
}


/* Single Character & Single Actor Template */
.character-page , .actor-page {
Expand Down Expand Up @@ -1254,6 +1261,10 @@ table.lwtvc {
padding-right: 0.25rem;
}

.shows, .cliches {
margin-bottom: 0.15rem;
}

ul {
padding: 0;

Expand Down
6 changes: 4 additions & 2 deletions template-parts/content-post_type_shows.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@
<ul class="guest-character-list">
<?php
foreach ( $chars_by_role['guest'] as $character ) {
$grave = ( has_term( 'dead', 'lez_cliches', $character['id'] ) ) ? '<span role="img" aria-label="RIP Tombstone" title="RIP Tombstone" class="charlist-grave-sm">' . lwtv_symbolicons( 'rest-in-peace.svg', 'fa-times-circle' ) . '</span>' : '';
// Remove any parenthesis from the character display name.
$guest_char_title = ( str_contains( get_the_title( $character['id'] ), ')' ) ) ? strstr( get_the_title( $character['id'] ), '(', true ) : get_the_title( $character['id'] );
$grave = ( has_term( 'dead', 'lez_cliches', $character['id'] ) ) ? '<span role="img" aria-label="RIP Tombstone" title="RIP Tombstone" class="charlist-grave-sm">' . lwtv_symbolicons( 'rest-in-peace.svg', 'fa-times-circle' ) . '</span>' : '';
?>
<li><a href="<?php the_permalink( $character['id'] ); ?>" title="<?php echo esc_html( get_the_title( $character['id'] ) ); ?>" ><?php echo esc_html( get_the_title( $character['id'] ) ) . ' ' . $grave; // phpcs:ignore WordPress.Security.EscapeOutput ?></a></li>
<li><a href="<?php the_permalink( $character['id'] ); ?>" title="<?php echo esc_html( $guest_char_title ); ?>" ><?php echo esc_html( $guest_char_title ) . ' ' . $grave; // phpcs:ignore WordPress.Security.EscapeOutput ?></a></li>
<?php
}
echo '</ul>';
Expand Down
25 changes: 23 additions & 2 deletions template-parts/partials/actors-socials.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,78 @@
$maybe_social = array(
'website' => array(
'meta' => 'lezactors_homepage',
'base' => '',
'post' => '',
'fa' => 'fas fa-home',
'hide' => false,
),
'imdb' => array(
'label' => 'IMDb',
'meta' => 'lezactors_imdb',
'base' => 'https://imdb.com/name/',
'post' => '',
'fa' => 'fab fa-imdb',
'hide' => false,
),
'wikipedia' => array(
'meta' => 'lezactors_wikipedia',
'base' => '',
'post' => '',
'fa' => 'fab fa-wikipedia-w',
'hide' => false,
),
'twitter' => array(
'meta' => 'lezactors_twitter',
'base' => 'https://twitter.com/',
'post' => '',
'fa' => 'fab fa-x-twitter',
'hide' => true,
),
'instagram' => array(
'meta' => 'lezactors_instagram',
'base' => 'https://instagram.com/',
'post' => '',
'fa' => 'fab fa-instagram',
'hide' => true,
),
'facebook' => array(
'meta' => 'lezactors_facebook',
'base' => '',
'post' => '',
'fa' => 'fab fa-facebook',
'hide' => true,
),
'tiktok' => array(
'meta' => 'lezactors_tiktok',
'fa' => 'fab fa-tiktok',
'base' => 'https://tiktok.com/',
'hide' => true,
),
'bluesky' => array(
'meta' => 'lezactors_bluesky',
'fa' => 'fab fa-bluesky',
'base' => '',
'post' => '',
'fa' => 'fab fa-square',
'hide' => true,
),
'twitch' => array(
'meta' => 'lezactors_twitch',
'base' => '',
'post' => '',
'fa' => 'fab fa-twitch',
'hide' => true,
),
'tumblr' => array(
'meta' => 'lezactors_tumblr',
'base' => 'https://',
'post' => '.tumblr.com/',
'fa' => 'fab fa-tumblr',
'hide' => true,
),
'mastodon' => array(
'meta' => 'lezactors_mastodon',
'base' => '',
'post' => '',
'fa' => 'fab fa-mastodon',
'hide' => true,
),
Expand All @@ -83,7 +104,7 @@
$name = ( isset( $data['label'] ) ) ? $data['label'] : ucwords( $social );
$actor_urls[ $social ] = array(
'name' => $name,
'url' => esc_url( get_post_meta( $actor, $data['meta'], true ) ),
'url' => $data['base'] . get_post_meta( $actor, $data['meta'], true ) . $data['post'],
'fa' => $data['fa'],
);
}
Expand Down

0 comments on commit 4dfc9b4

Please sign in to comment.