Skip to content

Commit

Permalink
Add comments section to single license template part
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpagz committed Sep 20, 2024
1 parent 0b18db4 commit 29a597b
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
7 changes: 7 additions & 0 deletions themes/osi/assets/css/editor-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 themes/osi/assets/css/editor-style.css.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions themes/osi/assets/scss/_5_objects.layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@
max-width: none !important;
}
}

.license-comments {
background: #f0E68C;
padding: 2rem;

.wp-block-heading {
margin-top: 0;
}
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions themes/osi/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 themes/osi/style.css.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions themes/osi/template-parts/content-license.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
<div class="entry-content post--content license-content">
<div>
<?php the_content(); ?>

<hr />
<div class="license-comments">
<?php
if ( osi_field_check( 'comments' ) ) :
echo wp_kses_post( '<h2 class="wp-block-heading" id="license-comments">' . __( 'Comments', 'osi' ) . '</h2>' );
osi_the_valid_field( 'comments' );
endif;
?>
</div>
</div>

<aside class="sidebar content--sidebar license-sidebar <?php echo esc_attr( osi_sidebar_class() ); ?>" role="complementary">
Expand Down

0 comments on commit 29a597b

Please sign in to comment.