237 lines
5.7 KiB
Text
237 lines
5.7 KiB
Text
/**
|
|
* This file provides the design styles for the quick search.
|
|
*/
|
|
|
|
.search.main-sidebar {
|
|
@main-ico-dummy: @font-size-big + @margin-small*2; //FIXME copied from area_main-sidebar-nav
|
|
@icon-size: @page-header_height;
|
|
@icon-search_font-size: @font-size-big;
|
|
|
|
@media @screen_md-lg {
|
|
margin-left: -(@menu-margin-lg);
|
|
}
|
|
|
|
p.toggleSearch a,
|
|
button[type="submit"] {
|
|
.hide-text-show-before();
|
|
|
|
position: relative;
|
|
width: @icon-size;
|
|
min-height: @icon-size;
|
|
overflow: visible;
|
|
background-image: none;
|
|
background-color: transparent; // fix
|
|
border: solid 1px transparent;
|
|
padding: 0;
|
|
transition: @transition color, @transition background-color, @transition border-color;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active {
|
|
.fnActiveButton();
|
|
|
|
&::after{
|
|
background-color: var(--color-glow-primary);
|
|
}
|
|
}
|
|
|
|
&::before {
|
|
width: @icon-size;
|
|
height: 0.8em;
|
|
font-size: @icon-search_font-size;
|
|
text-align: center;
|
|
margin: 0;
|
|
color: var(--color-foreground);
|
|
content: '';
|
|
display: block;
|
|
mask-size: contain;
|
|
mask-position: center;
|
|
mask-repeat: no-repeat;
|
|
background-color: currentColor;
|
|
|
|
|
|
mask-image: url('img/search.svg');
|
|
}
|
|
}
|
|
|
|
p.toggleSearch {
|
|
display: none;
|
|
padding: 0;
|
|
|
|
a {
|
|
min-width: (@toggle-showsidebar_width + 0.1); /* must be a bit a wider than @toggle-showsidebar_width to hide right border */
|
|
width: @main-ico-dummy;
|
|
border-radius: 0.5rem 0 0 0.5rem;
|
|
border-right: none;
|
|
background-color: var(--color-shade-1);
|
|
color: var(--color-foreground);
|
|
text-decoration: none;
|
|
box-sizing: border-box;
|
|
|
|
&::before {
|
|
width: 100%;
|
|
color: inherit;
|
|
text-align: center;
|
|
}
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active {
|
|
border-right: none;
|
|
background-color: transparent;
|
|
border-color: var(--color-glow-primary);
|
|
color: var(--color-glow-primary);
|
|
}
|
|
}
|
|
}
|
|
|
|
button[type="submit"] {
|
|
position: absolute;
|
|
top: 1px;
|
|
bottom: 1px;
|
|
right: 0;
|
|
height: auto;
|
|
min-height: (@icon-size - .2);
|
|
color: @quicksearch-button-color;
|
|
}
|
|
|
|
/* + + + form + + + */
|
|
form {
|
|
position: relative;
|
|
display: block;
|
|
margin: 0 0 @margin-default;
|
|
|
|
.no {
|
|
display: block;
|
|
|
|
#qsearch__in {
|
|
width: 100%;
|
|
padding-left: 10px;
|
|
padding-right: @icon-size;
|
|
}
|
|
}
|
|
|
|
input {
|
|
min-height: @icon-size;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
button[type="submit"] {
|
|
border: solid 1px transparent;
|
|
margin-left: -(@icon-size);
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 15%;
|
|
bottom: 15%;
|
|
width: 1px;
|
|
left: -1px;
|
|
background-color: var(--color-shade-4);
|
|
transition: @transition background-color;
|
|
}
|
|
}
|
|
|
|
div.ajax_qsearch {
|
|
box-shadow: none;
|
|
background-color: #FFF;
|
|
padding: 0;
|
|
|
|
strong {
|
|
color: @quicksearch-button-color;
|
|
padding: 0.25rem 0.5rem
|
|
}
|
|
|
|
ul li {
|
|
color: @quicksearch-button-color;
|
|
|
|
a {
|
|
display: block;
|
|
padding: 0.25rem 0.5rem;
|
|
overflow: hidden;
|
|
color: inherit;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
ul li {
|
|
&:nth-child(odd) {
|
|
background-color: @suggestion-zebra;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* + + + + + suggestionlist + + + + + */
|
|
#qsearch__out {
|
|
left: auto;
|
|
top: auto;
|
|
width: 100%;
|
|
min-width: 20rem;
|
|
}
|
|
}
|
|
|
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
/* min-width: 1024px */
|
|
@media @screen_min-md {
|
|
|
|
// wide page content
|
|
.wide-content {
|
|
.search.main-sidebar {
|
|
p.toggleSearch {
|
|
position: relative;
|
|
display: block;
|
|
float: left;
|
|
width: auto;
|
|
}
|
|
|
|
form {
|
|
input {
|
|
border: 0 none;
|
|
}
|
|
|
|
.no {
|
|
#qsearch__in {
|
|
width: 0;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
button[type="submit"] {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
/* max-width: 1023px */
|
|
@media @screen_max-md {
|
|
|
|
// show when toggled
|
|
body.show-mobile-sidebar {
|
|
#dokuwiki__aside {
|
|
padding: 0 1rem;
|
|
border-radius: 0.5rem;
|
|
}
|
|
|
|
p.toggleSearch {
|
|
display: none !important;
|
|
}
|
|
|
|
.search.main-sidebar {
|
|
display: block !important;
|
|
position: relative;
|
|
margin-left: -1px;
|
|
margin-right: -1px;
|
|
|
|
form {
|
|
margin-bottom: 1rem;
|
|
}
|
|
}
|
|
}
|
|
}
|