Skip to content

Commit ee93410

Browse files
authored
Add resizing for navbar (#65)
* Adjust resizing for nav-bar * Reduce size of logo and logo font * Reduce padding of login and signup buttons * Hide overflow on nav-bar * Change vh to dvh for resizing based on mobile dynamic viewport * Fix linting
1 parent 89cb0bb commit ee93410

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

frontend/src/app/account/account.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.layout-container {
22
display: flex;
33
flex-direction: column;
4-
min-height: calc(100vh - 80px);
4+
min-height: calc(100dvh - 160px);
55
width: 100%;
66
justify-content: center;
77
align-items: center;

frontend/src/app/matching/matching.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
justify-content: center;
44
align-items: center;
55
width: 100%;
6-
min-height: calc(100vh - 160px);
6+
min-height: calc(100dvh - 160px);
77
padding: 1rem;
88
}
99

frontend/src/app/navigation-bar/navigation-bar.component.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
z-index: 100;
99
backdrop-filter: blur(10px);
1010
justify-content: center;
11+
align-items: center;
1112
height: 80px;
13+
width: 100%;
14+
overflow: hidden;
1215
}
1316

1417
:host ::ng-deep p-menubarsub {
@@ -24,6 +27,8 @@
2427
background: transparent;
2528
border: transparent;
2629
color: white;
30+
padding: 5px;
31+
border-radius: 0.5rem;
2732
}
2833

2934
a.fill-div {
@@ -38,14 +43,14 @@ a.fill-div {
3843
font-family: "Poppins", sans-serif;
3944
font-weight: 100;
4045
font-style: normal;
41-
}
46+
}
4247

43-
.poppins-bold {
48+
.poppins-bold {
4449
font-family: "Poppins", sans-serif;
4550
font-weight: 700;
4651
font-style: normal;
47-
}
52+
}
4853

4954
p.logo-font-size {
50-
font-size: 28px;
55+
font-size: 1.5rem;
5156
}

frontend/src/app/navigation-bar/navigation-bar.component.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
<p-menubar>
22
<ng-template pTemplate="start">
33
<div class="pl-2 flex align-items-center" style="cursor: pointer" [routerLink]="['/matching']">
4-
<img src="/logo.png" alt="logo" style="width: auto; height: 55px" />
4+
<img src="/logo.png" alt="logo" style="width: auto; height: 35px" />
55
<p class="pl-2 mr-3 poppins-bold logo-font-size">PeerPrep</p>
66
</div>
77
</ng-template>
88
<ng-template pTemplate="end">
99
@if (user) {
1010
<p-menu #menu [model]="items" [popup]="true" appendTo="body"></p-menu>
11-
<p-button
12-
[label]="user.username"
13-
(onClick)="menu.toggle($event)"
14-
icon="pi pi-user"
15-
class="nav-dropdown"></p-button>
11+
<p-button [label]="user.username" (onClick)="menu.toggle($event)" icon="pi pi-user" class="nav-dropdown" />
1612
} @else {
17-
<div class="flex flex-row gap-2">
13+
<div class="flex flex-row gap-2 p-2">
1814
<p-button
1915
label="Login"
2016
icon="pi pi-sign-in"
2117
class="nav-dropdown min-w-max"
22-
routerLink="account/login"></p-button>
18+
routerLink="account/login" />
2319
<p-button
2420
label="Sign Up"
2521
icon="pi pi-pen-to-square"
2622
class="nav-dropdown min-w-max"
27-
routerLink="/account/register"></p-button>
23+
routerLink="/account/register" />
2824
</div>
2925
}
3026
</ng-template>

0 commit comments

Comments
 (0)