Skip to content

Commit

Permalink
Upgrade the landscape embed to show the modal on the same page (#874)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Abraham <[email protected]>
  • Loading branch information
cjyabraham committed Jul 30, 2024
1 parent f9f8f1c commit af32340
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function lf_landscape_render_callback( $attributes ) {
return;
}

wp_enqueue_script( 'landscape-embed-item', 'https://landscape.cncf.io/embed/embed-item.js' );

ob_start();

$iframe_styles = 'width: ' . $iframe_width . ' ; min-width: 100%;'; // phpcs:ignore.
Expand Down Expand Up @@ -66,6 +68,7 @@ function lf_landscape_render_callback( $attributes ) {
class="iframe-container <?php echo esc_html( $classes ); ?>"
style="<?php echo $iframe_styles; // phpcs:ignore. ?>"
></iframe>
<iframe id="embed-item" src="https://landscape.cncf.io/embed/embed-item.html" style="width:100%;height:100%;display:block;border:none;position:fixed;top:0;bottom:0;left:0;right:0;z-index:999999999;display:none;"></iframe>

<?php
$block_content = ob_get_clean();
Expand Down

0 comments on commit af32340

Please sign in to comment.