Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI for responsive navbar. #458

Merged
merged 2 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h6 *ngIf="env.LIQUID_ENABLED || env.BISQ_ENABLED" class="dropdown-header" i18n=
</div>

<div class="navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto pt-2 pb-2 pb-md-0 pt-md-0 {{ network.val }}">
<ul class="navbar-nav {{ network.val }}">
<ng-template [ngIf]="network.val === 'bisq'" [ngIfElse]="notBisq">
<li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
<a class="nav-link" [routerLink]="['/bisq']" (click)="collapse()"><fa-icon [icon]="['fas', 'list']" [fixedWidth]="true" i18n-title="master-page.transactions" title="Transactions"></fa-icon></a>
Expand Down Expand Up @@ -62,7 +62,7 @@ <h6 *ngIf="env.LIQUID_ENABLED || env.BISQ_ENABLED" class="dropdown-header" i18n=
<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>
</ul>
<app-search-form location="top" (searchTriggered)="collapse()"></app-search-form>
<app-search-form class="search-form-container" location="top" (searchTriggered)="collapse()"></app-search-form>
</div>
</nav>
</header>
Expand Down
55 changes: 49 additions & 6 deletions frontend/src/app/components/master-page/master-page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ fa-icon {

.navbar {
z-index: 100;
min-height: 64px;
}

li.nav-item {
margin: auto 10px;
padding-left: 10px;
padding-right: 10px;
}

@media (min-width: 768px) {
@media (min-width: 992px) {
.navbar {
padding: 0rem 2rem;
}
Expand All @@ -26,17 +28,50 @@ li.nav-item {
margin-right: 16px;
}
li.nav-item {
margin: auto 0px;
padding: 10px;
}
}

li.nav-item a {
color: #ffffff;
}

.navbar-nav {
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) {
.navbar-nav {
background: transparent;
box-shadow: none;
position: relative;
width: auto;
}
}

.navbar-collapse {
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 {
Expand Down Expand Up @@ -81,5 +116,13 @@ nav {

.dropdown-item {
display: flex;
align-items:center;
align-items: center;
}

@media (min-width: 992px) {
.search-form-container {
width: 100%;
max-width: 500px;
padding-left: 15px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,53 @@
text-overflow: ellipsis;
}

form {
margin-top: 5px;
}

@media (min-width: 576px) {
form {
margin-top: 0px;
margin-left: 8px;
}
}

@media (min-width: 992px) {
form {
width: 100%;
}
}

.btn-block {
width: 58.55px;
}

.search-box-container {
width: 100%;
}

.search-box-container input {
border: 0px;
}

.search-box-container .btn {
width: 100px;
}

@media (min-width: 768px) {
.search-box-container {
min-width: 400px;
}
}

@media (min-width: 992px) {
.search-box-container {
width: 350px;
min-width: 260px;
}
}

@media (min-width: 1200px) {
.search-box-container {
min-width: 300px;
}
}
2 changes: 1 addition & 1 deletion frontend/src/app/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="container-xl mt-2">
<div class="container-xl mt-2 dashboard-container">

<div class="row row-cols-1 row-cols-md-2" *ngIf="{ value: (mempoolInfoData$ | async) } as mempoolInfoData">
<ng-template [ngIf]="collapseLevel === 'three'" [ngIfElse]="expanded">
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/app/dashboard/dashboard.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.dashboard-container {
padding-bottom: 60px;
}
@media (min-width: 992px) {
.dashboard-container {
padding-bottom: 0px;
}
}

.card {
background-color: #1d1f31;
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ html, body {

body {
background-color: #11131f;
min-width: 320px;
}

.container {
Expand Down