mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 22:58:30 +01:00
Readding search field, and fixing search for non-mempool base module sites.
This commit is contained in:
parent
b3294369d4
commit
8d9a51a7c4
3 changed files with 60 additions and 9 deletions
|
@ -45,6 +45,7 @@
|
||||||
<a class="nav-link" [routerLink]="['/about']" (click)="collapse()"><fa-icon [icon]="['fas', 'info-circle']" [fixedWidth]="true" i18n-title="master-page.about" title="About"></fa-icon></a>
|
<a class="nav-link" [routerLink]="['/about']" (click)="collapse()"><fa-icon [icon]="['fas', 'info-circle']" [fixedWidth]="true" i18n-title="master-page.about" title="About"></fa-icon></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<app-search-form class="search-form-container" location="top" (searchTriggered)="collapse()"></app-search-form>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -8,14 +8,16 @@ fa-icon {
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
min-height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.nav-item {
|
li.nav-item {
|
||||||
|
margin: auto 10px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 992px) {
|
||||||
.navbar {
|
.navbar {
|
||||||
padding: 0rem 2rem;
|
padding: 0rem 2rem;
|
||||||
}
|
}
|
||||||
|
@ -26,17 +28,54 @@ li.nav-item {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
li.nav-item {
|
li.nav-item {
|
||||||
|
margin: auto 0px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
li.nav-item a {
|
.navbar-nav {
|
||||||
color: #ffffff;
|
background: #212121;
|
||||||
|
bottom: 0;
|
||||||
|
box-shadow: 0px 0px 15px 0px #000;
|
||||||
|
flex-direction: row;
|
||||||
|
left: 0;
|
||||||
|
justify-content: center;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
position: relative;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
font-size: 0.8em;
|
||||||
|
@media (min-width: 375px) {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-nav {
|
|
||||||
flex-direction: row;
|
.navbar-collapse {
|
||||||
justify-content: center;
|
flex-basis: auto;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.navbar-collapse {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
.navbar-brand {
|
||||||
|
width: 140px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
|
@ -81,9 +120,20 @@ nav {
|
||||||
|
|
||||||
.dropdown-item {
|
.dropdown-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items:center;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.search-form-container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.navbar-dark .navbar-nav .nav-link {
|
||||||
|
color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ export class SearchFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
navigate(url: string, searchText: string) {
|
navigate(url: string, searchText: string) {
|
||||||
this.router.navigate([(this.network ? '/' + this.network : '') + url, searchText]);
|
this.router.navigate([(this.network && this.stateService.env.BASE_MODULE === 'mempool' ? '/' + this.network : '') + url, searchText]);
|
||||||
this.searchTriggered.emit();
|
this.searchTriggered.emit();
|
||||||
this.searchForm.setValue({
|
this.searchForm.setValue({
|
||||||
searchText: '',
|
searchText: '',
|
||||||
|
|
Loading…
Add table
Reference in a new issue