Add Golden Kubestronaut capability

Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
This commit is contained in:
Chris Abraham 2024-12-03 10:38:54 -08:00
parent e0b9ea7011
commit 7bb3a57d21
No known key found for this signature in database
GPG Key ID: 60A2BD1DA7D4B0F0
6 changed files with 27 additions and 4 deletions

View File

@ -180,7 +180,7 @@ $opts = array(
'singular_name' => __( 'Person' ),
'all_items' => __( 'All People' ),
),
'public' => false,
'public' => true,
'has_archive' => false,
'show_in_nav_menus' => false,
'show_in_rest' => true,

View File

@ -36,8 +36,13 @@ $current_url = home_url( 'people/ambassadors' );
$show_modal = isset( $args['show_profile'] ) && $args['show_profile'] ? true : false;
$show_logos = isset( $args['show_logos'] ) && $args['show_logos'] ? true : false;
$extra_classes = '';
if ( has_term( 'golden-kubestronaut', 'lf-person-category' ) ) {
$extra_classes = 'golden-kubestronaut';
}
?>
<div class="person has-animation-scale-2">
<div class="person has-animation-scale-2<?php echo ' ' . esc_html( $extra_classes ); ?>">
<?php
// Make image link if show_modal.
if ( $show_modal ) :
@ -200,7 +205,7 @@ $show_logos = isset( $args['show_logos'] ) && $args['show_logos'] ? true : false
?>
<div class="modal-hide" id="modal-<?php echo esc_html( $person_id ); ?>"
aria-hidden="true">
<div class="modal-content-wrapper">
<div class="modal-content-wrapper<?php echo ' ' . esc_html( $extra_classes ); ?>">
<figure class="person__image">
<img loading="lazy"

View File

@ -0,0 +1 @@
<svg width="32" height="38" viewBox="0 0 32 38" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.1 5.884C.634 11.35.634 20.215 6.1 25.683l9.9 9.9 9.9-9.9c5.467-5.468 5.467-14.332 0-19.8-5.468-5.466-14.332-5.466-19.8 0Z" fill="#FFFDFD" stroke="#000" stroke-width="2.771" stroke-linecap="round"/><circle cx="16" cy="10" r="3" fill="url(#a)"/><path d="M13 18a3 3 0 1 1 6 0v6h-6v-6Z" fill="url(#b)"/><defs><linearGradient id="a" x1="13" y1="11.812" x2="18.999" y2="5.813" gradientUnits="userSpaceOnUse"><stop stop-color="#ddbd55"/><stop offset="1" stop-color="#9c8435"/></linearGradient><linearGradient id="b" x1="13" y1="22.218" x2="17.16" y2="12.233" gradientUnits="userSpaceOnUse"><stop stop-color="#ddbd55"/><stop offset="1" stop-color="#9c8435"/></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 787 B

View File

@ -74,6 +74,12 @@ function add_cncf_people_map_shortcode( $atts ) {
$lat = get_post_meta( $post->ID, 'lf_person_location_lat' );
$lng = get_post_meta( $post->ID, 'lf_person_location_lng' );
if ( has_term( 'golden-kubestronaut', 'lf-person-category' ) ) {
$golden = true;
} else {
$golden = false;
}
if ( $lat && $lng ) {
$people[] = array(
'lat' => $lat,
@ -81,6 +87,7 @@ function add_cncf_people_map_shortcode( $atts ) {
'name' => get_the_title(),
'slug' => $post->post_name,
'id' => get_the_ID(),
'golden' => $golden,
);
}
}

View File

@ -71,10 +71,16 @@
const latLng = new google.maps.LatLng( lat, lng );
if ( peopleObj[i]['golden'] ) {
iconFile = '/wp-content/themes/cncf-twenty-two/images/map-markers/person-golden.svg';
} else {
iconFile = '/wp-content/themes/cncf-twenty-two/images/map-markers/person.svg';
}
const marker = new google.maps.Marker(
{
position: latLng,
icon: '/wp-content/themes/cncf-twenty-two/images/map-markers/person.svg',
icon: iconFile,
}
);

View File

@ -282,3 +282,7 @@
}
}
}
.golden-kubestronaut .person__name {
color: #9c8435;
}