Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions web/app/plugins/mitlib-blocks/blocks/hero-section/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
* @var string $content Block default content.
* @var WP_Block $block Block instance.
*/
?><section id="hero" role="img" aria-label="Two notebooks opened to show yellow graph paper; the top one has a black and white photo of a boat crew, and the bottom one shows handwritten text." style="background-image: url(https://libraries.mit.edu/app/uploads/2026/07/hero-image-edgerton.png);">
<div class="overlay">
<div class="content-wrapper">
<div class="hero-content">
<h1><?php echo wp_kses_post( $attributes['heading'] ); ?></h1>

<?php
// Search widget area for homepage. Uses Unified Search v2 for this page's search form.
if ( is_active_sidebar( 'sidebar-search' ) ) :
dynamic_sidebar( 'sidebar-search' );
endif;
?>
?> <section id="hero">
<div class="hero-bg" role="img" aria-label="Graphic illustration of a spiral in purple, black, and white." style="background-image: url(https://libraries.mit.edu/app/uploads/2026/09/hero-image-noise-reduction.jpg);"></div>
<div class="overlay">
<div class="content-wrapper">
<div class="hero-content">
<h1>Welcome to the MIT Libraries</h1>

<?php
// Search widget area for homepage. Uses Unified Search v2 for this page's search form.
if ( is_active_sidebar( 'sidebar-search' ) ) :
dynamic_sidebar( 'sidebar-search' );
endif;
?>

</div>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/244">Muriel Cooper personal archives</a></span>
</div>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/603">Harold E. Edgerton papers</a></span>
</div>
</div>
</section>
</section>
31 changes: 16 additions & 15 deletions web/app/plugins/mitlib-blocks/build/hero-section/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
* @var string $content Block default content.
* @var WP_Block $block Block instance.
*/
?><section id="hero" role="img" aria-label="Two notebooks opened to show yellow graph paper; the top one has a black and white photo of a boat crew, and the bottom one shows handwritten text." style="background-image: url(https://libraries.mit.edu/app/uploads/2026/07/hero-image-edgerton.png);">
<div class="overlay">
<div class="content-wrapper">
<div class="hero-content">
<h1><?php echo wp_kses_post( $attributes['heading'] ); ?></h1>

<?php
// Search widget area for homepage. Uses Unified Search v2 for this page's search form.
if ( is_active_sidebar( 'sidebar-search' ) ) :
dynamic_sidebar( 'sidebar-search' );
endif;
?>
?> <section id="hero">
<div class="hero-bg" role="img" aria-label="Graphic illustration of a spiral in purple, black, and white." style="background-image: url(https://libraries.mit.edu/app/uploads/2026/09/hero-image-noise-reduction.jpg);"></div>
<div class="overlay">
<div class="content-wrapper">
<div class="hero-content">
<h1>Welcome to the MIT Libraries</h1>

<?php
// Search widget area for homepage. Uses Unified Search v2 for this page's search form.
if ( is_active_sidebar( 'sidebar-search' ) ) :
dynamic_sidebar( 'sidebar-search' );
endif;
?>

</div>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/244">Muriel Cooper personal archives</a></span>
</div>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/603">Harold E. Edgerton papers</a></span>
</div>
</div>
</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,20 @@ body.v2-page {
#content > #hero {
padding: 0;
position: relative;
background-size: cover;
background-position: center center;
color: var(--color-text-on-color);

/* Decorative background image, kept out of the focusable/overlay content so role="img" has no children */
.hero-bg {
position: absolute;
inset: 0;
z-index: 0;
background-size: cover;
background-position: center center;
}

.overlay {
position: relative;
z-index: 1;
padding-top: calc(var(--content-section-vertical-padding) + var(--sp-600));
padding-bottom: var(--content-section-vertical-padding);
background: linear-gradient(90deg, #1A1A1A 24.52%, rgba(26, 26, 26, 0.50) 70.67%, rgba(26, 26, 26, 0.00) 100%);
Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/mitlib-parent/css/v2/v2.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
@import url('partials/footer.css');

/* Page-level styles */
@import url('pages/home.css');
@import url('pages/home-v001.css');
Loading
Loading