Skip to content

Commit

Permalink
Add styling to logo
Browse files Browse the repository at this point in the history
Signed-off-by: James Hunt <[email protected]>
  • Loading branch information
thetwopct committed Jun 13, 2024
1 parent 7d1846e commit 82c5457
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 30 deletions.
50 changes: 28 additions & 22 deletions web/wp-content/themes/cncf-twenty-two/components/people-item.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
// setup values.
global $wp;
global $post;
$person_id = get_the_ID();
$person_slug = $post->post_name;
$company = get_post_meta( get_the_ID(), 'lf_person_company', true );
$company_logo_url = get_post_meta( get_the_ID(), 'lf_person_company_logo_url', true );
$person_id = get_the_ID();
$person_slug = $post->post_name;
$company = get_post_meta( get_the_ID(), 'lf_person_company', true );
$company_logo_url = get_post_meta( get_the_ID(), 'lf_person_company_logo_url', true );
$company_landscape_url = get_post_meta( get_the_ID(), 'lf_person_company_landscape_url', true );
$pronouns = ucwords( get_post_meta( get_the_ID(), 'lf_person_pronouns', true ), $separators = " \t\r\n\f\v\\;/" );
$gb_role = get_post_meta( get_the_ID(), 'lf_person_gb_role', true );
$toc_role = get_post_meta( get_the_ID(), 'lf_person_toc_role', true );
$tab_role = get_post_meta( get_the_ID(), 'lf_person_tab_role', true );
$linkedin = get_post_meta( get_the_ID(), 'lf_person_linkedin', true );
$twitter = get_post_meta( get_the_ID(), 'lf_person_twitter', true );
$mastodon = get_post_meta( get_the_ID(), 'lf_person_mastodon', true );
$github = get_post_meta( get_the_ID(), 'lf_person_github', true );
$wechat = get_post_meta( get_the_ID(), 'lf_person_wechat', true );
$website = get_post_meta( get_the_ID(), 'lf_person_website', true );
$youtube = get_post_meta( get_the_ID(), 'lf_person_youtube', true );
$image_url = get_post_meta( get_the_ID(), 'lf_person_image', true );
$location = get_post_meta( get_the_ID(), 'lf_person_location', true );
$languages = get_the_terms( get_the_ID(), 'lf-language' );
$projects = get_the_terms( get_the_ID(), 'lf-project' );
$content = get_the_content();
$current_url = home_url( 'people/ambassadors' );
$pronouns = ucwords( get_post_meta( get_the_ID(), 'lf_person_pronouns', true ), $separators = " \t\r\n\f\v\\;/" );
$gb_role = get_post_meta( get_the_ID(), 'lf_person_gb_role', true );
$toc_role = get_post_meta( get_the_ID(), 'lf_person_toc_role', true );
$tab_role = get_post_meta( get_the_ID(), 'lf_person_tab_role', true );
$linkedin = get_post_meta( get_the_ID(), 'lf_person_linkedin', true );
$twitter = get_post_meta( get_the_ID(), 'lf_person_twitter', true );
$mastodon = get_post_meta( get_the_ID(), 'lf_person_mastodon', true );
$github = get_post_meta( get_the_ID(), 'lf_person_github', true );
$wechat = get_post_meta( get_the_ID(), 'lf_person_wechat', true );
$website = get_post_meta( get_the_ID(), 'lf_person_website', true );
$youtube = get_post_meta( get_the_ID(), 'lf_person_youtube', true );
$image_url = get_post_meta( get_the_ID(), 'lf_person_image', true );
$location = get_post_meta( get_the_ID(), 'lf_person_location', true );
$languages = get_the_terms( get_the_ID(), 'lf-language' );
$projects = get_the_terms( get_the_ID(), 'lf-project' );
$content = get_the_content();
$current_url = home_url( 'people/ambassadors' );

$show_modal = ( $args['show_profile'] && strlen( $content ) > 20 ) ? true : false;

Expand Down Expand Up @@ -105,10 +105,13 @@ class="js-modal button-reset modal-<?php echo esc_html( $person_slug ); ?>">
endif;

if ( $company ) {
?>
<div class="person__company-container">
<?php
if ( $company_logo_url ) {
if ( $company_landscape_url ) {
?>
<a href="<?php echo esc_url( $company_landscape_url ); ?>">
<a class="person__company-logo-link" title="View <?php echo esc_html( $company ); ?> in the CNCF Landscape" href="<?php echo esc_url( $company_landscape_url ); ?>">
<img class="person__company-logo" src="<?php echo esc_attr( $company_logo_url ); ?>"
alt="Logo of <?php echo esc_html( $company ); ?>">
</a>
Expand All @@ -124,6 +127,9 @@ class="js-modal button-reset modal-<?php echo esc_html( $person_slug ); ?>">
<h4 class="person__company"><?php echo esc_html( $company ); ?></h4>
<?php
}
?>
</div>
<?php
}
?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
}
}
}

&__padding {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -72,23 +71,42 @@
}
}
}
&__company, &__role {
&__company-container {
margin-top: 10px;
@media (min-width: 1200px) {
margin-top: 16px;
}

.person__company-logo,
.person__company-logo-link,
.person__company {
display: block;
}

.person__company-logo,
.person__company-logo-link img {
max-height: 80px;
width: auto;
max-width: 80%;
}
}
&__company {
font-size: 16px;
line-height: 140%;
color: $gray-700;
}

&__role {
font-style: italic;
margin-top: 10px;
@media (min-width: 1200px) {
margin-top: 16px;
}
font-size: 16px;
line-height: 140%;
color: $gray-700;
}

&__social {
margin-top: auto;

a {
display: inline-block;
&:hover {
Expand All @@ -97,21 +115,18 @@
}
}
}

svg {
height: 30px;
width: auto;
color: $black;
}

&-margin {
margin-top: 40px;
> *:not(:last-child) {
margin-right: 10px;
}
}
}

&__content {
margin-top: 30px;
}
Expand Down

0 comments on commit 82c5457

Please sign in to comment.