Moved projects stuff to it's own component
This commit is contained in:
		@@ -2,6 +2,7 @@ import {HttpClientModule} from '@angular/common/http';
 | 
			
		||||
import {BrowserModule} from '@angular/platform-browser';
 | 
			
		||||
import {NgModule} from '@angular/core';
 | 
			
		||||
import {ContactFormComponent} from './components/contact-form/contact-form.component';
 | 
			
		||||
import {ProjectsComponent} from './components/projects/projects.component';
 | 
			
		||||
import {HomeComponent} from './views/home/home.component';
 | 
			
		||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
 | 
			
		||||
import {MaterialModule} from './material.module';
 | 
			
		||||
@@ -18,6 +19,7 @@ import {ConsoleComponent} from './components/console/console.component';
 | 
			
		||||
        ConsoleComponent,
 | 
			
		||||
		ContactFormComponent,
 | 
			
		||||
        HomeComponent,
 | 
			
		||||
		ProjectsComponent,
 | 
			
		||||
        SlideShowComponent,
 | 
			
		||||
        TypewriterComponent
 | 
			
		||||
    ],
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								src/app/components/projects/projects.component.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/app/components/projects/projects.component.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
<mat-list dense>
 | 
			
		||||
	<ng-container *ngFor="let p of projectsService.all; let first = first">
 | 
			
		||||
		<mat-divider *ngIf="!first"></mat-divider>
 | 
			
		||||
		<mat-list-item>
 | 
			
		||||
			<img *ngIf="p.avatar_url" mat-list-avatar [src]="p.avatar_url">
 | 
			
		||||
			<img *ngIf="!p.avatar_url" mat-list-avatar src="/assets/img/git.png">
 | 
			
		||||
			<a mat-line [href]="p.web_url" target="_blank">{{p.name}}</a>
 | 
			
		||||
			<div mat-line>{{p.description}}</div>
 | 
			
		||||
		</mat-list-item>
 | 
			
		||||
	</ng-container>
 | 
			
		||||
</mat-list>
 | 
			
		||||
							
								
								
									
										10
									
								
								src/app/components/projects/projects.component.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/app/components/projects/projects.component.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
import {Component} from '@angular/core';
 | 
			
		||||
import {ProjectsService} from '../../services/projects.service';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
	selector: 'projects',
 | 
			
		||||
	templateUrl: './projects.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class ProjectsComponent {
 | 
			
		||||
	constructor(public projectsService: ProjectsService) { }
 | 
			
		||||
}
 | 
			
		||||
@@ -64,17 +64,7 @@
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="p-4">
 | 
			
		||||
			<h3>Projects & Repositories</h3>
 | 
			
		||||
			<mat-list dense>
 | 
			
		||||
				<ng-container *ngFor="let p of projectsService.all; let first = first">
 | 
			
		||||
					<mat-divider *ngIf="!first"></mat-divider>
 | 
			
		||||
					<mat-list-item>
 | 
			
		||||
						<img *ngIf="p.avatar_url" mat-list-avatar [src]="p.avatar_url">
 | 
			
		||||
						<img *ngIf="!p.avatar_url" mat-list-avatar src="/assets/img/git.png">
 | 
			
		||||
						<a mat-line [href]="p.web_url" target="_blank">{{p.name}}</a>
 | 
			
		||||
						<div mat-line>{{p.description}}</div>
 | 
			
		||||
					</mat-list-item>
 | 
			
		||||
				</ng-container>
 | 
			
		||||
			</mat-list>
 | 
			
		||||
			<projects></projects>
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="p-4 overflow-hidden">
 | 
			
		||||
			<h3>Contact</h3>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
import {AfterViewInit, Component, ViewChild} from '@angular/core';
 | 
			
		||||
import {ConsoleComponent} from '../../components/console/console.component';
 | 
			
		||||
import {ProjectsService} from '../../services/projects.service';
 | 
			
		||||
import {QuoteService} from '../../services/quote.service';
 | 
			
		||||
import {sleep} from '../../misc/utils';
 | 
			
		||||
 | 
			
		||||
@@ -11,7 +10,7 @@ import {sleep} from '../../misc/utils';
 | 
			
		||||
export class HomeComponent implements AfterViewInit {
 | 
			
		||||
	@ViewChild(ConsoleComponent) console!: ConsoleComponent;
 | 
			
		||||
 | 
			
		||||
	constructor(public projectsService: ProjectsService, private quotes: QuoteService) { }
 | 
			
		||||
	constructor(private quotes: QuoteService) { }
 | 
			
		||||
 | 
			
		||||
	ngAfterViewInit() { this.animateConsole(); }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user