Skip to content

Commit

Permalink
navbar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
coliff committed Oct 31, 2023
1 parent 28515b5 commit 911816b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app-components/preview/app-components.js

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions app-components/src/app/search/search.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<div class="position-relative d-none d-md-block">
<div class="form-control-with-icon" role="search">
<input class="form-control form-control-lg form-control-search" placeholder="Search all Modus Icons" type="search" autocomplete="off"
<div class="form-control-with-icon mt-2" role="search">
<input class="form-control form-control-search" placeholder="Search all Modus Icons" type="search" autocomplete="off"
[(ngModel)]="searchString" (input)="search()" />
<div class="form-control-icon">
<img [src]="assetpath + 'modus-solid/svg/search.svg'" class="opacity-75" alt height="22" width="22" />
</div>
</div>
<div style="top: 48px; max-height: 240px; overflow-y: auto; z-index: 1000"
class="list-group list-group-borderless bg-white position-absolute shadow justify-content-start w-100">
<div class="list-group list-group-search-results list-group-borderless bg-white position-absolute shadow justify-content-start w-100">
<ng-container *ngIf="searchResults.length === 0 && searchString.length > 1">
<div class="list-group-item justify-content-center">
<h5 class="mb-0 text-gray-4">
Expand All @@ -18,14 +17,14 @@ <h5 class="mb-0 text-gray-4">
<ng-container *ngIf="searchResults.length > 0">
<a class="list-group-item text-decoration-none d-flex align-items-center"
*ngFor="let item of searchResults" [href]="basehref + '/' + item.setName + '/' + item.name + '/'">
<svg class="modus-icons me-2" fill="currentColor" width="1.2em" height="1.2em">
<svg class="modus-icons me-2" fill="currentColor" width="24" height="24">
<use [attr.xlink:href]="
assetpath + item.setName + '/sprites/modus-icons.svg#' + item.name
"></use>
</svg>
<h5 class="me-2 mb-0">{{ item.displayName }}</h5>
<h5 class="me-2 mb-0 small">{{ item.displayName }}</h5>
<label class="mb-0 me-4 fw-normal small opacity-50">{{ item.tags }}</label>
<label class="mb-0 ms-auto text-secondary opacity-75">{{
<label class="mb-0 ms-auto text-secondary opacity-75 small">{{
item.setDisplayName
}}</label>
</a>
Expand Down
6 changes: 6 additions & 0 deletions app-components/src/app/search/search.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.list-group-search-results {
max-height: 240px;
overflow-y: auto;
top: 32px;
z-index: 1000;
}
2 changes: 1 addition & 1 deletion docs/assets/js/app-components.js

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions docs/assets/scss/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ main {

nav.navbar button.btn-icon-only {
padding: 11px 8px !important;
padding-top: 9px !important;
padding-bottom: 11px !important;
}

nav.navbar button i {
Expand Down Expand Up @@ -207,11 +209,6 @@ input[type="search"]::-webkit-search-cancel-button {
outline: none;
}

nav.navbar button.btn-icon-only {
padding-top: 9px !important;
padding-bottom: 11px !important;
}

a.btn img {
margin-top: -2px;
}
Expand Down

0 comments on commit 911816b

Please sign in to comment.