Skip to content

Commit

Permalink
Code formatting fixes... ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
brok3turtl3 committed Oct 17, 2024
1 parent fe214ba commit 7e6a227
Show file tree
Hide file tree
Showing 25 changed files with 99 additions and 143 deletions.
18 changes: 4 additions & 14 deletions angular-resources-page/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -85,13 +80,8 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
}
}
Expand Down
2 changes: 0 additions & 2 deletions angular-resources-page/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
</nav>

<router-outlet></router-outlet>


12 changes: 5 additions & 7 deletions angular-resources-page/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
imports: [RouterTestingModule],
declarations: [AppComponent],
}).compileComponents();
});

Expand All @@ -30,6 +26,8 @@ describe('AppComponent', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-contact-page app is running!');
expect(compiled.querySelector('.content span')?.textContent).toContain(
'angular-contact-page app is running!',
);
});
});
2 changes: 1 addition & 1 deletion angular-resources-page/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.css'],
})
export class AppComponent {
title = 'angular-contact-page';
Expand Down
11 changes: 4 additions & 7 deletions angular-resources-page/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ import { ToolsComponent } from './pages/tools/tools.component';
PeopleComponent,
WebsitesComponent,
BooksComponent,
ToolsComponent
],
imports: [
BrowserModule,
AppRoutingModule
ToolsComponent,
],
imports: [BrowserModule, AppRoutingModule],
providers: [],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})
export class AppModule { }
export class AppModule {}
15 changes: 7 additions & 8 deletions angular-resources-page/src/app/pages/books/books.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<div class="container mx-auto mt-8">
<h1 class="text-2xl font-bold mb-4">Books</h1>
<ul class="list-disc pl-6 space-y-2">
<li *ngFor="let book of books">
<a [href]="book.link" target="_blank">{{ book.title }}</a> by {{ book.author }}
</li>
</ul>
</div>

<h1 class="text-2xl font-bold mb-4">Books</h1>
<ul class="list-disc pl-6 space-y-2">
<li *ngFor="let book of books">
<a [href]="book.link" target="_blank">{{ book.title }}</a> by {{ book.author }}
</li>
</ul>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('BooksComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ BooksComponent ]
})
.compileComponents();
declarations: [BooksComponent],
}).compileComponents();

fixture = TestBed.createComponent(BooksComponent);
component = fixture.componentInstance;
Expand Down
46 changes: 26 additions & 20 deletions angular-resources-page/src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<div class="container mx-auto text-center mt-12">
<h1 class="text-3xl font-bold mb-4">Alumni Resources</h1>
<p class="text-gray-600 mb-8">
Explore resources to help you stay connected and grow professionally, including alumni contacts, useful websites, recommended books, and essential tools.
</p>

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<button routerLink="/people" class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700">
People
</button>
<button routerLink="/websites" class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700">
Websites
</button>
<button routerLink="/books" class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700">
Books
</button>
<button routerLink="/tools" class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700">
Tools
</button>
</div>
<h1 class="text-3xl font-bold mb-4">Alumni Resources</h1>
<p class="text-gray-600 mb-8">
Explore resources to help you stay connected and grow professionally, including alumni contacts,
useful websites, recommended books, and essential tools.
</p>

<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<button
routerLink="/people"
class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700"
>
People
</button>
<button
routerLink="/websites"
class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700"
>
Websites
</button>
<button routerLink="/books" class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700">
Books
</button>
<button routerLink="/tools" class="bg-blue-600 text-white p-4 rounded shadow hover:bg-blue-700">
Tools
</button>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('HomeComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HomeComponent ]
})
.compileComponents();
declarations: [HomeComponent],
}).compileComponents();

fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
Expand Down
9 changes: 3 additions & 6 deletions angular-resources-page/src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
styleUrls: ['./home.component.css'],
})
export class HomeComponent implements OnInit {
constructor() {}

constructor() { }

ngOnInit(): void {
}

ngOnInit(): void {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('PeopleComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PeopleComponent ]
})
.compileComponents();
declarations: [PeopleComponent],
}).compileComponents();

fixture = TestBed.createComponent(PeopleComponent);
component = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-people',
templateUrl: './people.component.html',
styleUrls: ['./people.component.css']
styleUrls: ['./people.component.css'],
})
export class PeopleComponent implements OnInit {
constructor() {}

constructor() { }

ngOnInit(): void {
}

ngOnInit(): void {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('ToolsComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ToolsComponent ]
})
.compileComponents();
declarations: [ToolsComponent],
}).compileComponents();

fixture = TestBed.createComponent(ToolsComponent);
component = fixture.componentInstance;
Expand Down
9 changes: 3 additions & 6 deletions angular-resources-page/src/app/pages/tools/tools.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-tools',
templateUrl: './tools.component.html',
styleUrls: ['./tools.component.css']
styleUrls: ['./tools.component.css'],
})
export class ToolsComponent implements OnInit {
constructor() {}

constructor() { }

ngOnInit(): void {
}

ngOnInit(): void {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('WebsitesComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ WebsitesComponent ]
})
.compileComponents();
declarations: [WebsitesComponent],
}).compileComponents();

fixture = TestBed.createComponent(WebsitesComponent);
component = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-websites',
templateUrl: './websites.component.html',
styleUrls: ['./websites.component.css']
styleUrls: ['./websites.component.css'],
})
export class WebsitesComponent implements OnInit {
constructor() {}

constructor() { }

ngOnInit(): void {
}

ngOnInit(): void {}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const environment = {
production: true
production: true,
};
2 changes: 1 addition & 1 deletion angular-resources-page/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
production: false,
};

/*
Expand Down
20 changes: 10 additions & 10 deletions angular-resources-page/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>AngularContactPage</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>AngularContactPage</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>
5 changes: 3 additions & 2 deletions angular-resources-page/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
3 changes: 1 addition & 2 deletions angular-resources-page/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.

import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
13 changes: 7 additions & 6 deletions angular-resources-page/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
context(
path: string,
deep?: boolean,
filter?: RegExp,
): {
<T>(id: string): T;
keys(): string[];
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());

// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
9 changes: 2 additions & 7 deletions angular-resources-page/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"]
}
Loading

0 comments on commit 7e6a227

Please sign in to comment.