Search texts and states, help tooltip, wider field (F4)
materio_sapi: result messages with real plurals; without any exact match the results are called close (the neighbour search always finds some). Former help sentence of the base page kept, French corrected. Messages in SearchMessage, unit tested; French added by update 11002. materiotheme: placeholder "Describe the material you are looking for", wider search field, "?" button with a help tooltip and clickable examples, "Loading…", "End of results"; texts in vuejs/i18n/search.js. Page title "Base" restored without a search (keys is an array, test its length). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
This commit is contained in:
@@ -515,6 +515,9 @@ header[role="banner"]{
|
||||
#block-pagetitle{}
|
||||
#block-materiosapisearchblock{
|
||||
align-self: flex-end;
|
||||
// Long enough for a phrase and for the placeholder (F4).
|
||||
width: 30em;
|
||||
max-width: 50%;
|
||||
}
|
||||
@include col-mediaquery-max(3){
|
||||
flex-direction: column;
|
||||
@@ -526,6 +529,7 @@ header[role="banner"]{
|
||||
#block-materiosapisearchblock{
|
||||
box-sizing: border-box;
|
||||
width:100%;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -614,7 +618,9 @@ header[role="banner"]{
|
||||
|
||||
#materio-sapi-search-form{
|
||||
display: grid;
|
||||
grid-template-columns: auto 25px;
|
||||
// Field, search button, help button (F4).
|
||||
grid-template-columns: auto 25px 22px;
|
||||
position: relative;
|
||||
grid-template-rows: auto auto;
|
||||
row-gap: 0.2em;
|
||||
justify-items: stretch;
|
||||
@@ -655,6 +661,58 @@ header[role="banner"]{
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
// Help "?" and its tooltip (F4).
|
||||
.search-help-button{
|
||||
grid-row: 1 / 1;
|
||||
grid-column: 3 / 3;
|
||||
justify-self: end;
|
||||
align-self: center;
|
||||
width: 18px; height: 18px;
|
||||
padding: 0;
|
||||
border: 1px solid #999;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
&[aria-expanded="true"], &:hover{
|
||||
background-color: #333;
|
||||
border-color: #333;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.search-help{
|
||||
position: absolute;
|
||||
z-index: 101;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
width: 22em;
|
||||
max-width: 90vw;
|
||||
box-sizing: border-box;
|
||||
margin-top: 0.4em;
|
||||
padding: 0.6em 0.8em;
|
||||
border-radius: 5px;
|
||||
background-color: rgba(0, 0, 0, 0.85);
|
||||
color: #fff;
|
||||
font-size: 0.85em;
|
||||
line-height: 1.4;
|
||||
p{ margin: 0 0 0.4em; }
|
||||
ul{ margin: 0; padding: 0; }
|
||||
li{ list-style: none; }
|
||||
li button{
|
||||
padding: 0.15em 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: #fff;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@include col-mediaquery-max(3){
|
||||
body:not(.path-base) &{
|
||||
@@ -1427,7 +1485,6 @@ article.node--type-frontpage{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
|
||||
&>ul{
|
||||
// outline: 1px green solid;
|
||||
margin:0; padding:0;
|
||||
|
||||
Reference in New Issue
Block a user