feat: integrate FontAwesome icons across various components

- Updated apartment-list component to use FontAwesome icons for better visual representation.
- Refactored brand-mark component to utilize FontAwesome for the brand icon.
- Enhanced dashboard-page with FontAwesome icons for improved navigation.
- Replaced SVG icons with FontAwesome in settings-page for consistency and better performance.
- Updated sign-in-page to use FontAwesome for the sign-in action icon.
- Refactored tenant-card to incorporate FontAwesome icons for attachments.
- Enhanced workspace-navigation with FontAwesome icons for all navigation items.
- Applied consistent styling for fa-icon elements across components.
This commit is contained in:
nessar committed 2026-08-17 14:18:15 +02:00
1 parent ba695e2426
commit 713ab3b2d9
19 files changed
+534 -456

No files matched your search

@@ -1,156 +1,212 @@
:host {
display: block;
display: block;
}
.app-navigation {
position: fixed;
z-index: 20;
right: 0;
bottom: 0;
left: 0;
height: calc(72px + env(safe-area-inset-bottom));
padding: 6px 10px env(safe-area-inset-bottom);
border-top: 1px solid var(--border);
background: color-mix(in srgb, var(--surface) 94%, transparent);
box-shadow: 0 -10px 30px rgba(25, 40, 35, 0.06);
backdrop-filter: blur(18px);
position: fixed;
z-index: 20;
right: 0;
bottom: 0;
left: 0;
height: calc(72px + env(safe-area-inset-bottom));
padding: 6px 10px env(safe-area-inset-bottom);
border-top: 1px solid var(--border);
background: color-mix(in srgb, var(--surface) 94%, transparent);
box-shadow: 0 -10px 30px rgba(25, 40, 35, 0.06);
backdrop-filter: blur(18px);
}
.sidebar-brand,
.sidebar-user {
display: none;
display: none;
}
.navigation-items {
display: grid;
height: 100%;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 4px;
display: grid;
height: 100%;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 4px;
}
.navigation-item.mat-mdc-button {
--mdc-text-button-label-text-color: var(--text-muted);
min-width: 0;
height: 60px;
border-radius: 14px;
padding: 5px 4px;
font-weight: 650;
letter-spacing: 0;
--mdc-text-button-label-text-color: var(--text-muted);
width: 100%;
min-width: 0;
height: 60px;
border-radius: 14px;
overflow: hidden;
padding: 5px 4px;
font-weight: 650;
letter-spacing: 0;
}
.navigation-item .mat-mdc-button-touch-target {
height: 60px;
height: 60px;
}
.navigation-item svg {
width: 21px;
height: 21px;
margin: 0 auto 4px;
.navigation-item fa-icon {
display: flex;
width: 21px;
height: 21px;
margin: 0 auto 4px;
}
.navigation-item fa-icon svg {
width: 100%;
height: 100%;
}
.navigation-item span {
display: block;
overflow: hidden;
font-size: 0.66rem;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
overflow: hidden;
font-size: 0.66rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.navigation-item.active {
--mdc-text-button-label-text-color: var(--accent);
background: var(--surface-accent);
--mdc-text-button-label-text-color: var(--accent);
background: var(--surface-accent);
}
@media (max-width: 959px) {
.navigation-item .mdc-button__label {
display: flex;
width: 100%;
height: 100%;
min-width: 0;
flex-direction: column;
align-items: center;
justify-content: center;
}
.navigation-item span {
width: 100%;
min-width: 0;
overflow-wrap: break-word;
font-size: 0.62rem;
line-height: 1.05;
text-align: center;
white-space: normal;
}
}
@media (min-width: 960px) {
.app-navigation {
top: 0;
right: auto;
bottom: auto;
width: 256px;
height: 100vh;
padding: 26px 18px;
border-top: 0;
border-right: 1px solid var(--border);
background: var(--surface);
box-shadow: none;
backdrop-filter: none;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 12px;
padding: 0 8px 32px;
}
.sidebar-brand > div {
display: flex;
flex-direction: column;
font-size: 0.86rem;
line-height: 1.15;
}
.sidebar-brand strong {
font-size: 1rem;
}
.sidebar-brand span:last-child {
color: var(--text-muted);
}
.navigation-items {
display: flex;
height: auto;
flex-direction: column;
gap: 6px;
}
.navigation-item.mat-mdc-button {
width: 100%;
height: 48px;
justify-content: flex-start;
border-radius: 13px;
padding: 0 14px;
}
.navigation-item .mat-mdc-button-touch-target {
height: 48px;
}
.navigation-item .mdc-button__label {
display: flex;
align-items: center;
gap: 12px;
}
.navigation-item svg {
width: 20px;
height: 20px;
margin: 0;
}
.navigation-item span {
font-size: 0.86rem;
}
.sidebar-user {
position: absolute;
right: 18px;
bottom: 24px;
left: 18px;
display: grid;
grid-template-columns: 36px minmax(0, 1fr);
gap: 10px;
padding: 14px;
border: 1px solid var(--border);
border-radius: 16px;
background: var(--surface-soft);
}
.sidebar-user > div:nth-child(2) {
display: flex;
min-width: 0;
flex-direction: column;
justify-content: center;
}
.sidebar-user strong,
.sidebar-user span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar-user strong {
font-size: 0.82rem;
}
.sidebar-user span {
color: var(--text-muted);
font-size: 0.69rem;
}
.logout-action.mat-mdc-button {
--mdc-text-button-label-text-color: var(--text-muted);
grid-column: 1 / -1;
height: 34px;
border-top: 1px solid var(--border);
border-radius: 0;
font-size: 0.75rem;
}
}
.app-navigation {
top: 0;
right: auto;
bottom: auto;
width: 256px;
height: 100vh;
padding: 26px 18px;
border-top: 0;
border-right: 1px solid var(--border);
background: var(--surface);
box-shadow: none;
backdrop-filter: none;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 12px;
padding: 0 8px 32px;
}
.sidebar-brand>div {
display: flex;
flex-direction: column;
font-size: 0.86rem;
line-height: 1.15;
}
.sidebar-brand strong {
font-size: 1rem;
}
.sidebar-brand span:last-child {
color: var(--text-muted);
}
.navigation-items {
display: flex;
height: auto;
flex-direction: column;
gap: 6px;
}
.navigation-item.mat-mdc-button {
width: 100%;
height: 48px;
justify-content: flex-start;
border-radius: 13px;
padding: 0 14px;
}
.navigation-item .mat-mdc-button-touch-target {
height: 48px;
}
.navigation-item .mdc-button__label {
display: flex;
align-items: center;
gap: 12px;
}
.navigation-item fa-icon {
display: flex;
width: 20px;
height: 20px;
margin: 0;
}
.navigation-item span {
font-size: 0.86rem;
}
.sidebar-user {
position: absolute;
right: 18px;
bottom: 24px;
left: 18px;
display: grid;
grid-template-columns: 36px minmax(0, 1fr);
gap: 10px;
padding: 14px;
border: 1px solid var(--border);
border-radius: 16px;
background: var(--surface-soft);
}
.sidebar-user>div:nth-child(2) {
display: flex;
min-width: 0;
flex-direction: column;
justify-content: center;
}
.sidebar-user strong,
.sidebar-user span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar-user strong {
font-size: 0.82rem;
}
.sidebar-user span {
color: var(--text-muted);
font-size: 0.69rem;
}
.logout-action.mat-mdc-button {
--mdc-text-button-label-text-color: var(--text-muted);
grid-column: 1 / -1;
height: 34px;
border-top: 1px solid var(--border);
border-radius: 0;
font-size: 0.75rem;
}
}
@@ -12,18 +12,7 @@
routerLink="/dashboard"
routerLinkActive="active"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
aria-hidden="true"
>
<rect x="3" y="3" width="7" height="7" rx="2" />
<rect x="14" y="3" width="7" height="7" rx="2" />
<rect x="3" y="14" width="7" height="7" rx="2" />
<rect x="14" y="14" width="7" height="7" rx="2" />
</svg>
<fa-icon [icon]="faTableCellsLarge" aria-hidden="true" />
<span>Tableau de bord</span>
</button>
<button
@@ -33,16 +22,7 @@
routerLink="/apartments"
routerLinkActive="active"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
aria-hidden="true"
>
<path d="M4 21V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16" />
<path d="M2 21h20M8 7h2M14 7h2M8 11h2M14 11h2M8 15h2M14 15h2" />
</svg>
<fa-icon [icon]="faBuilding" aria-hidden="true" />
<span>Appartements</span>
</button>
<button
@@ -52,18 +32,7 @@
routerLink="/tenants"
routerLinkActive="active"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
aria-hidden="true"
>
<circle cx="9" cy="8" r="3" />
<path
d="M3.5 20v-2.5A4.5 4.5 0 0 1 8 13h2a4.5 4.5 0 0 1 4.5 4.5V20M16 5.5a3 3 0 0 1 0 5.8M17 14a4.5 4.5 0 0 1 3.5 4.4V20"
/>
</svg>
<fa-icon [icon]="faUsers" aria-hidden="true" />
<span>Locataires</span>
</button>
<button
@@ -73,16 +42,7 @@
routerLink="/leases"
routerLinkActive="active"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
aria-hidden="true"
>
<path d="M6 3h9l4 4v14H6z" />
<path d="M14 3v5h5M9 12h7M9 16h7" />
</svg>
<fa-icon [icon]="faFileLines" aria-hidden="true" />
<span>Baux</span>
</button>
<button
@@ -92,18 +52,7 @@
routerLink="/settings"
routerLinkActive="active"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
aria-hidden="true"
>
<circle cx="12" cy="12" r="3" />
<path
d="M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-2.83 2.83-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 .6 1.7 1.7 0 0 0-.4 1.1V21h-4v-.09A1.7 1.7 0 0 0 8.6 19.4a1.7 1.7 0 0 0-1.88.34l-.06.06-2.83-2.83.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-.6-1 1.7 1.7 0 0 0-1.1-.4H3v-4h.09A1.7 1.7 0 0 0 4.6 8.6a1.7 1.7 0 0 0-.34-1.88l-.06-.06 2.83-2.83.06.06A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-.6 1.7 1.7 0 0 0 .4-1.1V3h4v.09A1.7 1.7 0 0 0 15.4 4.6a1.7 1.7 0 0 0 1.88-.34l.06-.06 2.83 2.83-.06.06A1.7 1.7 0 0 0 19.4 9c.16.38.37.72.6 1 .3.3.7.45 1.1.45h.09v4h-.09c-.4 0-.8.15-1.1.45-.23.28-.44.62-.6 1Z"
/>
</svg>
<fa-icon [icon]="faGear" aria-hidden="true" />
<span>Réglages</span>
</button>
</nav>
@@ -1,4 +1,12 @@
import { Component, inject, input, output } from '@angular/core';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import {
faBuilding,
faFileLines,
faGear,
faTableCellsLarge,
faUsers,
} from '@fortawesome/free-solid-svg-icons';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { BrandMark } from '../brand-mark';
@@ -7,11 +15,16 @@ import { SessionService } from '../../services/session.service';
@Component({
selector: 'app-workspace-navigation',
imports: [BrandMark, MatButtonModule, RouterLink, RouterLinkActive],
imports: [BrandMark, FontAwesomeModule, MatButtonModule, RouterLink, RouterLinkActive],
templateUrl: './workspace-navigation.html',
styleUrl: './workspace-navigation.css',
})
export class WorkspaceNavigation {
readonly faTableCellsLarge = faTableCellsLarge;
readonly faBuilding = faBuilding;
readonly faUsers = faUsers;
readonly faFileLines = faFileLines;
readonly faGear = faGear;
readonly userInitial = input.required<string>();
readonly logoutRequested = output<void>();
readonly session = inject(SessionService);