Skip to content

Commit

Permalink
Merge branch 'init-question' of https://github.com/KhoonSun47/cs3219-…
Browse files Browse the repository at this point in the history
…ay2425s1-project-g03 into init-question

* 'init-question' of https://github.com/KhoonSun47/cs3219-ay2425s1-project-g03:
  Update prettier to format html files (CS3219-AY2425S1#34)
  Fix linting
  Add .env to .gitignore
  Add async animations provider
  Change primeflex import from css to scss
  Add PrimeFlex
  Add ng lint fix
  Add PrimeNG
  • Loading branch information
KhoonSun47 committed Sep 25, 2024
2 parents 8edfb05 + 37a03f5 commit 31200b1
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 350 deletions.
3 changes: 2 additions & 1 deletion frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
],
"analytics": false
}
}
10 changes: 9 additions & 1 deletion frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ module.exports = tseslint.config(
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
eslintPluginPrettierRecommended
],
rules: {},
rules: {
'prettier/prettier': [
'error',
{
'parser': 'angular',
}
]
},
},
);
24 changes: 24 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"
"lint": "ng lint",
"lint:fix": "ng lint --fix"
},
"private": true,
"dependencies": {
Expand All @@ -19,6 +20,8 @@
"@angular/platform-browser": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0",
"@angular/router": "^18.2.0",
"primeflex": "^3.3.1",
"primeng": "^17.18.10",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.10"
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
main {
width: 100%;
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
box-sizing: inherit;
position: relative;
flex-direction: column;
}

.content {
display: flex;
flex-direction: column;
width: auto;
margin-bottom: 1rem;
padding: 2rem;
background-color: var(--surface-section);
border-radius: 0.75rem;
}
335 changes: 0 additions & 335 deletions frontend/src/app/app.component.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { ButtonModule } from 'primeng/button';
import { PasswordModule } from 'primeng/password';

@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
imports: [RouterOutlet, ButtonModule, PasswordModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css',
})
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';

import { routes } from './app.routes';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';

export const appConfig: ApplicationConfig = {
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)],
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideAnimationsAsync()],
};
20 changes: 10 additions & 10 deletions frontend/src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>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>
<head>
<meta charset="utf-8" />
<title>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>
3 changes: 3 additions & 0 deletions frontend/src/styles.css
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/* You can add global styles to this file, and also import other style files */
@import "primeng/resources/themes/aura-dark-blue/theme.css";
@import "primeng/resources/primeng.css";
@import "primeflex/primeflex.scss";

0 comments on commit 31200b1

Please sign in to comment.