Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
7f8c4eb
First Draft of Homepage Template
djanelle-mit Jun 12, 2026
3729583
Adding homepage static content
djanelle-mit Jun 17, 2026
be90302
New style structure mocked out
djanelle-mit Jun 22, 2026
c9ad8fe
Moved v2 styles out of old layout partial into new v2
djanelle-mit Jun 22, 2026
01485a1
Split homepage, header, footer styles into appropriate css files
djanelle-mit Jun 22, 2026
4d30bc2
Made v2 styles conditional to v2 template to simplify style rules
djanelle-mit Jun 22, 2026
e31e3d1
Conditional style sheets for v2 and adding FontAwesome latest version…
djanelle-mit Jun 22, 2026
eb433ec
Rough mock of static content, missing featured section
djanelle-mit Jun 22, 2026
2ee910f
Updated styles for static content
djanelle-mit Jun 23, 2026
c71f28b
Fix style bugs introduced by new type scale variables in footer
djanelle-mit Jun 23, 2026
1cd2e56
Fixing bugs introduced with new base font size scale in header
djanelle-mit Jun 23, 2026
432f6a4
Button styling and responsive fixes
djanelle-mit Jun 23, 2026
3b5c4aa
Responsive hours
djanelle-mit Jun 24, 2026
b7a97bd
Fleshing out featured and events sections
djanelle-mit Jun 25, 2026
0c679c8
Rough responsive behavior for featured section
djanelle-mit Jun 25, 2026
6839915
Small style updates to featured and events
djanelle-mit Jun 25, 2026
18ff122
Tuning featured exhibit spacing
djanelle-mit Jun 25, 2026
7591c98
Small responsive bugfix for featured 6 count layout
djanelle-mit Jun 29, 2026
1c4cabf
Added the hero image citation link
djanelle-mit Jun 29, 2026
036b0d1
Updating responsive behavior of hours
djanelle-mit Jun 29, 2026
fb97ae4
Updated responsive styling for search box
djanelle-mit Jun 29, 2026
1889a66
Add all help options
djanelle-mit Jun 29, 2026
71b2748
Adding other variants of featured item type tags
djanelle-mit Jun 29, 2026
823fbb1
Bugfix to link hover state
djanelle-mit Jun 29, 2026
8cd7ec8
Icon semantic color variables and fixing search input icon
djanelle-mit Jun 29, 2026
98d3cb7
Adding search action to point to USE search
djanelle-mit Jun 29, 2026
689db3d
Image styling for featured collection
djanelle-mit Jun 29, 2026
8feecd4
Adding links and contrast fix for NEWS tag
djanelle-mit Jul 6, 2026
24155fc
Links and content updates to using the libraries
djanelle-mit Jul 6, 2026
5605117
Filling in content
djanelle-mit Jul 8, 2026
a5a3a4c
More link updates
djanelle-mit Jul 8, 2026
fe66dac
Updates to featured content
djanelle-mit Jul 8, 2026
937cba7
Content updates
djanelle-mit Jul 8, 2026
1b4ed02
Removing duplicate links
djanelle-mit Jul 8, 2026
e82ca72
Updating links again
djanelle-mit Jul 8, 2026
5be0ddd
Copy update to events subheading
djanelle-mit Jul 8, 2026
7a93e32
Adding librarian feature link back in
djanelle-mit Jul 8, 2026
41ef09a
Adding NLS toggle UI
djanelle-mit Jul 8, 2026
ada4093
Responsive fix for NLS toggle
djanelle-mit Jul 8, 2026
75d81d7
Fix to size of Ask us dropdown menu
djanelle-mit Jul 8, 2026
ae50ad1
Adding dynamic hours
djanelle-mit Jul 8, 2026
06d21e3
Work to add global and local alert templates (hidden) to the new home…
djanelle-mit Jul 9, 2026
9298541
Scrappy attempt at refactoring search plugin for new homepage
djanelle-mit Jul 13, 2026
ce9ea1f
Removing old code from search plugin refactor
djanelle-mit Jul 13, 2026
ebf28a7
Adding new chat widget to replace chat button
djanelle-mit Jul 16, 2026
bacd8c0
Updating hero image credit
djanelle-mit Jul 16, 2026
513e3c0
Accessibility review fixes
djanelle-mit Jul 20, 2026
72f897a
Small style fixes
djanelle-mit Jul 20, 2026
4577f85
First part of refactoring search
djanelle-mit Jul 21, 2026
b240aec
Second part of refactoring search widget
djanelle-mit Jul 21, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public function widget( $args, $instance ) {
if ( 'use' == $instance['targets'] ) {
$all_template = 'templates/tab-all-use.php';
}

if ( 'use-v2' == $instance['targets'] ) {
$all_template = 'templates/tab-all-use-v2.php';
}
// Strip initial arguments.
$args = null;

Expand Down Expand Up @@ -82,15 +84,19 @@ public function widget( $args, $instance ) {
);
wp_enqueue_style( 'multisearch-tabs' );

// Render markup.
echo '<noscript><p>It appears that your browser does not support javascript.</p>';
include( 'templates/form_nojs.html' );
echo '</noscript>';
echo '<div id="multisearch" class="' . esc_attr( $this->widgetClasses( $instance ) ) . ' nojs">';
echo '<h2 id="searchtabsheader" class="sr">Search the MIT libraries</h2>';
if ( $instance['targets'] != 'use-v2' ) {

// Render markup.
echo '<noscript><p>It appears that your browser does not support javascript.</p>';
include( 'templates/form_nojs.html' );
echo '</noscript>';
echo '<div id="multisearch" class="' . esc_attr( $this->widgetClasses( $instance ) ) . ' nojs">';
echo '<h2 id="searchtabsheader" class="sr">Search the MIT libraries</h2>';

};

// Render the search tabs only when "Unified Search" option is not selected
if ( $instance['targets'] != 'use' ) {
if ( $instance['targets'] != 'use' && $instance['targets'] != 'use-v2' ) {

echo '<ul id="search_tabs_nav" aria-labelledby="searchtabsheader">
<li><a id="tab-all" href="#search-all"><span>All</span></a></li>
Expand Down Expand Up @@ -132,6 +138,20 @@ public function widget( $args, $instance ) {

};

if ( $instance['targets'] == 'use-v2' ) {

// Determine whether to enable NLS based on widget settings and the user's cookie.
$nls_enabled = $this->readCookie( $instance['nls_default'] );

$nls_link_toggle = $this->setToggleValue( $nls_enabled );

$nls_included = $instance['nls_included'];

include( $all_template );


};

if ( $instance['banner_text'] ) {
$allowed = array(
'a' => array(
Expand All @@ -149,7 +169,10 @@ public function widget( $args, $instance ) {
echo wp_kses( $instance['banner_text'], $allowed );
echo '</div>';
}
echo '</div>';

if ( $instance['targets'] != 'use-v2' ) {
echo '</div>';
};
}

/**
Expand Down Expand Up @@ -233,6 +256,21 @@ class="widefat"
Unified Search
</label>
</li>
<li>
<label>
<input
type="radio"
name="<?php echo esc_attr( $this->get_field_name( 'targets' ) ); ?>"
value="use-v2"
<?php
if ( 'use-v2' == $targets ) {
echo "checked='checked'";
}
?>
>
Unified Search v2
</label>
</li>
</ul>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'bento_url' ) ); ?>">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* The "Unified Search" of the search tab for all content - which will search "Search MIT Libraries" (USE).
*
* @package Multisearch Widget
* @since 1.5.0
*/

?>
<!-- nls state: _<?php echo esc_attr( $nls_enabled ); ?>_ -->
<form id="search-form" action="https://search.libraries.mit.edu/results" method="get" role="search">
<label for="basic-search-main">What can we help you find?</label>
<div class="form-wrapper">
<div class="search-input-wrapper">
<i class="fa-regular fa-magnifying-glass"></i>
<input id="basic-search-main" type="search" class="field field-text basic-search-input" name="q" title="Keyword anywhere" value="" required="">
<button title="Clear search" aria-label="Clear search" type="button" id="clear-search" style="display: none;">Clear search</button>
</div>
<input id="tab-to-target" type="hidden" name="tab" value="all">
<button type="submit" class="btn button-primary">Search</button>
</div>
<div class="search-actions">
<a class="link-on-dark" href="https://libraries.mit.edu/search-advanced">Advanced search</a>

<?php if ( 'included' == $nls_included ) { ?>
<div class="nls-toggle">
<a class="toggle <?php echo esc_attr( $nls_enabled ); ?>" href="<?php echo esc_url( 'https://search.libraries.mit.edu/natural_language_search_optin?natural_language_search_optin=' . $nls_link_toggle . '&return_to=/' ); ?>">Natural language search</a>
<a class="learn-more" href="https://search.libraries.mit.edu/about-natural-language-search">Learn more</a>
</div>
<?php } ?>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,4 @@ html.no-js .js-hidden {
display: table;
clear: both;
}
}
}
121 changes: 121 additions & 0 deletions web/app/themes/mitlib-parent/css/v2/components/alerts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#global-alert, #local-alerts {
background-color: var(--color-alert-bg);
color: var(--color-text-primary);

padding-top: var(--sp-400);
padding-bottom: var(--sp-400);

.content-wrapper {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}

h2 {
font-size: var(--font-size-lg);
margin-bottom: 0;
}
}

#global-alert {
position: relative;

.content-wrapper {
gap: var(--sp-400);
}

.global-alert-message {
display: flex;
gap: var(--sp-200);
flex-grow: 1;

i {
margin-top: var(--sp-100);
flex-shrink: 0;
flex-grow: 0;
}

p {
font-size: var(--font-size-md);
font-weight: var(--font-weight-regular);
margin-bottom: 0 !important; /* Overriding global style from old theme */
}

a {
text-decoration-color: var(--color-yellow-800);

&:hover {
color: var(--color-text-primary);
text-decoration-color: var(--color-text-primary);
}
}
}

.global-alert-actions {
display: flex;
gap: var(--sp-600);
align-items: center;
padding-left: var(--sp-700);

@media only screen and (max-width: 1324px) {
padding-right: var(--sp-800);
}
}

.dismiss {
position: absolute;
top: 50%;
right: var(--sp-600);
transform: translateY(-50%);
padding-left: var(--sp-400);

i {
font-size: var(--font-size-xl);
color: var(--color-yellow-800);
}

&:hover, &:hover i {
color: var(--color-text-primary);
}
}
}

#local-alerts {

.content-wrapper {
gap: var(--sp-200);
flex-wrap: nowrap;
align-items: start;
}

i {
margin-top: var(--sp-100);
flex-shrink: 0;
flex-grow: 0;
}

.local-alert-message {
display: flex;
flex-direction: row;
gap: var(--sp-100);
flex-grow: 1;
align-items: center;
flex-wrap: wrap;

h2, p {
margin-bottom: 0 !important; /* Overriding global style from old theme */
}

h2 {
flex-shrink: 0;
flex-grow: 0;
margin-right: var(--sp-400);
}

p {
flex-grow: 1;
}
}

}
28 changes: 28 additions & 0 deletions web/app/themes/mitlib-parent/css/v2/components/buttons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
a.button {
border: 1px solid var(--color-button-base-border-primary);
background-color: var(--color-button-base-bg-primary);
color: var(--color-button-base-text-primary);
border-radius: var(--border-radius-none);
display: inline-block;
padding: var(--sp-150) var(--sp-300);
text-decoration: none;
font-size: var(--font-size-md);
font-weight: var(--font-weight-medium);

&:hover {
background-color: var(--color-button-hover-bg-primary);
border-color: var(--color-button-hover-border-primary);
color: var(--color-button-hover-text-primary);
}

&.secondary {
border: 1px solid var(--color-button-base-border-secondary);
background-color: var(--color-button-base-bg-secondary);
color: var(--color-button-base-text-secondary);

&:hover {
background-color: var(--color-button-hover-bg-secondary);
color: var(--color-button-hover-text-secondary);
}
}
}
Loading