diff --git a/src/app/app.component.html b/src/app/app.component.html index 8d4b974..7d63d2e 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -2,7 +2,7 @@
-
+
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 6c77547..1b168b3 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -28,7 +28,7 @@ app-header { background-color: var(--white); } -.content { +.main-content { width: calc(100% - 128px); min-width: calc(100vw - 232px - 64px); height: 100vh; @@ -38,9 +38,7 @@ app-header { } @media screen and (max-width: 910px) { - .content { - display: flex; - justify-content: center; + .main-content { width: calc(100vw - 64px); height: calc(100vh - 240px); padding: 32px; @@ -54,9 +52,7 @@ app-header { } @media screen and (max-width: 450px) { - .content { - display: flex; - justify-content: center; + .main-content { width: calc(100vw - 32px); padding: 32px 16px; } diff --git a/src/app/components/contacts/contact-detail/contact-detail.component.html b/src/app/components/contacts/contact-detail/contact-detail.component.html index f6cc847..7d33130 100644 --- a/src/app/components/contacts/contact-detail/contact-detail.component.html +++ b/src/app/components/contacts/contact-detail/contact-detail.component.html @@ -1,8 +1,14 @@
-
-
Contacts
-
-
Better with a team
+
+
+
Contacts
+
+
Better with a team
+
+
@if (currentUserId) {
-
+
+
- +
diff --git a/src/app/components/contacts/contacts.component.scss b/src/app/components/contacts/contacts.component.scss index d5835ee..e3b8330 100644 --- a/src/app/components/contacts/contacts.component.scss +++ b/src/app/components/contacts/contacts.component.scss @@ -2,6 +2,10 @@ section { position: relative; } +.d-none { + display: none; +} + .btn-inside { display: flex; justify-content: center; @@ -135,7 +139,22 @@ section { top: 96px; left: 0px; width: 100vw; - min-height: calc(100vh - 207px); background-color: var(--bgContent); } } + +@media screen and (max-width: 450px) { + .left-frame { + padding: 0; + } + + .btn { + display: none; + } + + .first-letter { + &:first-child { + margin-top: 0; + } + } +} diff --git a/src/app/components/contacts/contacts.component.ts b/src/app/components/contacts/contacts.component.ts index 38c4339..7aa57a9 100644 --- a/src/app/components/contacts/contacts.component.ts +++ b/src/app/components/contacts/contacts.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, EventEmitter, HostListener, Output } from '@angular/core'; import { UserService } from '../../services/user.service'; import { User } from '../../interfaces/user.interface'; import { CommonModule } from '@angular/common'; @@ -16,12 +16,14 @@ export class ContactsComponent { allUsers: User[] = []; usersFirstLetter: string[] = []; usersByFirstLetter: { [key: string]: string[] } = {}; + showAllUsers!: boolean; currentUserId: string = ''; constructor(public userService: UserService, private route: ActivatedRoute) {} ngOnInit(): void { this.routeUserId(); + this.onResize(); } routeUserId() { @@ -32,6 +34,16 @@ export class ContactsComponent { } } + @HostListener('window:resize', ['$event']) + onResize() { + if (window.innerWidth <= 1150 && this.currentUserId != '') { + this.showAllUsers = false; + } else { + this.showAllUsers = true; + } + console.log(this.showAllUsers); + } + loadAllUserWithoutGuest(): User[] { return this.userService .getAllUsers() diff --git a/src/app/components/summary/summary.component.scss b/src/app/components/summary/summary.component.scss index 9a6837a..33105ec 100644 --- a/src/app/components/summary/summary.component.scss +++ b/src/app/components/summary/summary.component.scss @@ -179,6 +179,14 @@ section { } } +@media screen and (max-width: 910px) { + section { + display: flex; + flex-direction: column; + align-items: center; + } +} + @media screen and (max-width: 700px) { .header { flex-direction: column;