Start application

This commit is contained in:
Lallois
2025-11-13 15:40:43 +01:00
commit 91876effb4
38 changed files with 9938 additions and 0 deletions

19
src/app/app.config.ts Normal file
View File

@@ -0,0 +1,19 @@
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
import { fr_FR, provideNzI18n } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import fr from '@angular/common/locales/fr';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideHttpClient } from '@angular/common/http';
registerLocaleData(fr);
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient()
]
};

46
src/app/app.css Normal file
View File

@@ -0,0 +1,46 @@
:host {
display: flex;
}
.app-layout {
height: 100vh;
}
.top-nav {
line-height: 64px;
}
.logo {
float: left;
height: 64px;
padding-right: 24px;
line-height: 64px;
background: #001529;
}
.logo img {
display: inline-block;
height: 32px;
width: 32px;
vertical-align: middle;
}
.logo h1 {
display: inline-block;
margin: 0 0 0 15px;
color: #fff;
font-weight: 600;
font-size: 20px;
font-family: Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;
vertical-align: middle;
}
nz-content {
padding: 24px 50px;
}
.inner-content {
padding: 24px;
background: #fff;
height: 100%;
}

21
src/app/app.html Normal file
View File

@@ -0,0 +1,21 @@
<nz-layout class="app-layout">
<nz-header>
<div class="logo">
<a>
<img src="../logo.svg" alt="logo">
<h1>Pyrofêtes P4</h1>
</a>
</div>
<ul nz-menu class="top-nav" nzTheme="dark" nzMode="horizontal">
<li nz-menu-item routerLinkActive="ant-menu-item-selected" routerLink="/customers">Clients</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected" routerLink="/providers">Prestataires</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected" routerLink="/staff">Artificiers</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected" routerLink="/opportunities">Opportunités</li>
</ul>
</nz-header>
<nz-content>
<div class="inner-content">
<router-outlet></router-outlet>
</div>
</nz-content>
</nz-layout>

29
src/app/app.routes.ts Normal file
View File

@@ -0,0 +1,29 @@
import { Routes } from '@angular/router';
export const routes: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: '/customers'
},
{
path:'customers',
loadComponent: () => import('./pages/customers/customers').then(x => x.Customers)
},
{
path:'staff',
loadComponent: () => import('./pages/staff/staff').then(x => x.Staff)
},
{
path:'opportunities',
loadComponent: () => import('./pages/opportunities/opportunities').then(x => x.Opportunities)
},
{
path:'providers',
loadComponent: () => import('./pages/providers/providers').then(x => x.Providers)
}
];

12
src/app/app.ts Normal file
View File

@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
import {RouterLink, RouterLinkActive, RouterOutlet} from '@angular/router';
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzMenuModule } from 'ng-zorro-antd/menu';
@Component({
selector: 'app-root',
imports: [RouterOutlet, NzLayoutModule, NzMenuModule, RouterLinkActive, RouterLink],
templateUrl: './app.html',
styleUrl: './app.css'
})
export class App {}

View File

View File

@@ -0,0 +1 @@
<p>customers works!</p>

View File

@@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-customers',
imports: [],
templateUrl: './customers.html',
styleUrl: './customers.css',
})
export class Customers {
}

View File

@@ -0,0 +1 @@
<p>opportunities works!</p>

View File

@@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-opportunities',
imports: [],
templateUrl: './opportunities.html',
styleUrl: './opportunities.css',
})
export class Opportunities {
}

View File

View File

@@ -0,0 +1 @@
<p>providers works!</p>

View File

@@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-providers',
imports: [],
templateUrl: './providers.html',
styleUrl: './providers.css',
})
export class Providers {
}

View File

View File

@@ -0,0 +1 @@
<p>staff works!</p>

View File

@@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-staff',
imports: [],
templateUrl: './staff.html',
styleUrl: './staff.css',
})
export class Staff {
}

View File

View File

@@ -0,0 +1 @@
<router-outlet/>

View File

@@ -0,0 +1,6 @@
import { Routes } from '@angular/router';
import { Welcome } from './welcome';
export const WELCOME_ROUTES: Routes = [
{ path: '', component: Welcome },
];

View File

@@ -0,0 +1,14 @@
import { Component } from '@angular/core';
import {RouterOutlet} from "@angular/router";
@Component({
selector: 'app-welcome',
imports: [
RouterOutlet
],
templateUrl: './welcome.html',
styleUrl: './welcome.css'
})
export class Welcome {
}

13
src/index.html Normal file
View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pyrofètes Frontend</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>

6
src/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { App } from './app/app';
bootstrapApplication(App, appConfig)
.catch((err) => console.error(err));

4
src/styles.css Normal file
View File

@@ -0,0 +1,4 @@
/* You can add global styles to this file, and also import other style files */
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities) important;

9
src/theme.less Normal file
View File

@@ -0,0 +1,9 @@
// Custom Theming for NG-ZORRO
// For more information: https://ng.ant.design/docs/customize-theme/en
@import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";
// Override less variables to here
// View all variables: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/style/themes/default.less
// @primary-color: #1890ff;