-
Notifications
You must be signed in to change notification settings - Fork 1
Implements a new homepage page template using new CSS system #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
7f8c4eb
3729583
be90302
c9ad8fe
01485a1
4d30bc2
e31e3d1
eb433ec
2ee910f
c71f28b
1cd2e56
432f6a4
3b5c4aa
b7a97bd
0c679c8
6839915
18ff122
7591c98
1c4cabf
036b0d1
fb97ae4
1889a66
71b2748
823fbb1
8cd7ec8
98d3cb7
689db3d
8feecd4
24155fc
5605117
a5a3a4c
fe66dac
937cba7
1b4ed02
e82ca72
5be0ddd
7a93e32
41ef09a
ada4093
75d81d7
ae50ad1
06d21e3
9298541
ce9ea1f
ebf28a7
bacd8c0
513e3c0
72f897a
4577f85
b240aec
91b8983
55114af
b172061
d9954b3
4659c5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: |
||
| </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 |
|---|---|---|
|
|
@@ -306,4 +306,4 @@ html.no-js .js-hidden { | |
| display: table; | ||
| clear: both; | ||
| } | ||
| } | ||
| } | ||
| 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; | ||
| } | ||
| } | ||
|
|
||
| } |
| 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 { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: I'm trying to understand the indenting in this file - is there a reason why everything until this line has been indented four spaces, but this drops to two? Maybe more generally, is there a linter we can configure to enforce whatever formatting rules are relevant, to prevent questions about this sort of thing? I don't think PHPCS touches these files based on my local testing (at least, I'm not going to ask that we implement CSS linting as part of this PR, and this may be fine as-is without any changes - but if there is a stylesheet linter we could add to a maintenance plan that would be similar to what we get currently from |
||
| 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); | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking question:
I'm guessing that we're bringing this forward to the v2 template because it exists in v1? I don't object to that, but want to make sure I'm keeping everything in mind for when I go do some cleanup for this plugin soon-ish. My recollection is that this was a temporary affordance around the launch of SML, and is something we can remove during the coming cleanup.