parent
3c8e41d4f6
commit
6b06e05c04
|
@ -6,11 +6,11 @@ $searchDashboard = new SearchDashboard();
|
|||
$searchDashboard->setUser($this->Auth()->getUser());
|
||||
|
||||
if ($searchDashboard->search('dummy')->getPane('search')->hasDashlets()): ?>
|
||||
<form action="<?= $this->href('search') ?>" method="get" role="search">
|
||||
<input
|
||||
type="text" name="q" id="search" class="search" placeholder="<?= $this->translate('Search') ?> …"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
/>
|
||||
<form action="<?= $this->href('search') ?>" method="get" role="search" class="search-control">
|
||||
<input type="text" name="q" id="search" class="search search-input"
|
||||
placeholder="<?= $this->translate('Search') ?> …"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" required="required">
|
||||
<button class="search-reset icon-cancel" type="reset"></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?= $menuRenderer->setCssClass('primary-nav')->setElementTag('nav')->setHeading(t('Navigation')); ?>
|
||||
|
|
|
@ -167,7 +167,6 @@
|
|||
}
|
||||
|
||||
// Accessibility skip links
|
||||
|
||||
.skip-links {
|
||||
position: relative;
|
||||
ul {
|
||||
|
@ -198,3 +197,47 @@
|
|||
bottom: 0 !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.search-control {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-reset {
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.search-reset:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
// Override forms.less
|
||||
input[type=text].search-input {
|
||||
padding-right: 1.4em;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.search-input:valid ~ .search-reset {
|
||||
animation-duration: .4s;
|
||||
animation-name: search-reset-in;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes search-reset-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(-20%, 0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue