diff --git a/angular.json b/angular.json index 512b14b..12f0279 100644 --- a/angular.json +++ b/angular.json @@ -68,7 +68,8 @@ "buildTarget": "my-portfolio:build:production" }, "development": { - "buildTarget": "my-portfolio:build:development" + "buildTarget": "my-portfolio:build:development", + "proxyConfig": "src/proxy.conf.json" } }, "defaultConfiguration": "development" diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index af25ff9..8524eaa 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -4,19 +4,9 @@
-

- I'm Creative Director and UI/UX Designer from Sydney, Australia, working in web development and print media. - I enjoy - turning complex problems into simple, beautiful and intuitive designs. -

- -

- My job is to build your website so that it is functional and user-friendly but at the same time attractive. - Moreover, I - add personal touch to your product and make sure that is eye-catching and easy to use. My aim is to bring - across your - message and identity in the most creative way. I created web design for many famous brand companies. -

+
+        {{model.about}}
+      
@@ -26,75 +16,22 @@
-

What i'm doing

+

Interests

diff --git a/src/app/about/about.component.scss b/src/app/about/about.component.scss index e69de29..7855284 100644 --- a/src/app/about/about.component.scss +++ b/src/app/about/about.component.scss @@ -0,0 +1,4 @@ +.text-style { + white-space: pre-line; + font-family: var(--ff-poppins); +} \ No newline at end of file diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index 1e2de41..d157a46 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -1,10 +1,19 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import { CvService } from '../services/cv.service'; +import { IAbout } from './about.model'; +import { BaseComponent } from '../base/base.component'; @Component({ selector: 'app-about', templateUrl: './about.component.html', styleUrl: './about.component.scss' }) -export class AboutComponent { +export class AboutComponent extends BaseComponent implements OnInit { + constructor(svc: CvService){ + super(svc); + } + ngOnInit(): void { + this.init(); + } } diff --git a/src/app/about/about.model.ts b/src/app/about/about.model.ts new file mode 100644 index 0000000..7aceb18 --- /dev/null +++ b/src/app/about/about.model.ts @@ -0,0 +1,6 @@ +import { IHobby } from "../models/hobby.model"; + +export interface IAbout{ + about: string; + hobbies: IHobby[]; +} \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 95a4cbd..f0b0604 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,17 +2,16 @@ import { NgModule } from '@angular/core'; import { AboutComponent } from './about/about.component'; import { RouterModule, Routes } from '@angular/router'; import { ResumeComponent } from './resume/resume.component'; -import { PortfolioComponent } from './portfolio/portfolio.component'; +import { ProjectsComponent } from './projects/projects.component'; import { BlogComponent } from './blog/blog.component'; import { ContactComponent } from './contact/contact.component'; const routes: Routes = [ - { path: 'about', component: AboutComponent, title: "About" }, - { path: 'resume', component: ResumeComponent, title: "Resume" }, - { path: 'portfolio', component: PortfolioComponent, title: "Portfolio" }, - { path: 'blog', component: BlogComponent, title: "Blog" }, - { path: 'contact', component: ContactComponent, title: "Contact" }, - { path: '', redirectTo: '/about', pathMatch: 'full'} + { path: '', component: AboutComponent, title: "Bangara Raju" }, + { path: 'resume', component: ResumeComponent, title: "Bangara Raju - Resume" }, + { path: 'projects', component: ProjectsComponent, title: "Bangara Raju - Projects" }, + { path: 'blog-posts', component: BlogComponent, title: "Bangara Raju - Posts" }, + { path: 'contact', component: ContactComponent, title: "Bangara Raju - Contact" } ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ead99a1..9a096d6 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -6,10 +6,11 @@ import { ContactSidebarComponent } from './contact-sidebar/contact-sidebar.compo import { NavbarComponent } from './navbar/navbar.component'; import { AboutComponent } from './about/about.component'; import { ResumeComponent } from './resume/resume.component'; -import { PortfolioComponent } from './portfolio/portfolio.component'; +import { ProjectsComponent } from './projects/projects.component'; import { BlogComponent } from './blog/blog.component'; import { ContactComponent } from './contact/contact.component'; import { AppRoutingModule } from './app-routing.module'; +import { HttpClientModule } from '@angular/common/http'; @NgModule({ declarations: [ @@ -18,12 +19,13 @@ import { AppRoutingModule } from './app-routing.module'; NavbarComponent, AboutComponent, ResumeComponent, - PortfolioComponent, + ProjectsComponent, BlogComponent, ContactComponent ], imports: [ BrowserModule, + HttpClientModule, AppRoutingModule ], schemas: [CUSTOM_ELEMENTS_SCHEMA], diff --git a/src/app/base/base.component.ts b/src/app/base/base.component.ts new file mode 100644 index 0000000..63961d0 --- /dev/null +++ b/src/app/base/base.component.ts @@ -0,0 +1,21 @@ +import { ICv } from "../models/cv.model"; +import { CvService } from "../services/cv.service"; + +export abstract class BaseComponent { + public model: T = {}; + candidateId: number = 1; + constructor(public svc: CvService) { + } + + init(): void { + this.svc.getCv(this.candidateId).subscribe((response) => { + this.svc.resume = response; + this.assignData(response); + this.svc.baseSubject.next(response); + }); + } + + assignData(response: Partial | unknown){ + Object.assign(this.model, response); + } +} \ No newline at end of file diff --git a/src/app/blog/blog.component.html b/src/app/blog/blog.component.html index 4cd94fc..10b4b22 100644 --- a/src/app/blog/blog.component.html +++ b/src/app/blog/blog.component.html @@ -1,7 +1,7 @@
-

Blog

+

Posts

diff --git a/src/app/blog/blog.component.ts b/src/app/blog/blog.component.ts index 1d582df..9d49107 100644 --- a/src/app/blog/blog.component.ts +++ b/src/app/blog/blog.component.ts @@ -1,10 +1,19 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import { CvService } from '../services/cv.service'; +import { ISideBar } from '../contact-sidebar/side-bar.model'; +import { BaseComponent } from '../base/base.component'; @Component({ selector: 'app-blog', templateUrl: './blog.component.html', styleUrl: './blog.component.scss' }) -export class BlogComponent { +export class BlogComponent extends BaseComponent implements OnInit{ + constructor(svc: CvService){ + super(svc); + } + ngOnInit(): void { + this.init(); + } } diff --git a/src/app/contact-sidebar/contact-sidebar.component.html b/src/app/contact-sidebar/contact-sidebar.component.html index 7b23d62..3f2e74f 100644 --- a/src/app/contact-sidebar/contact-sidebar.component.html +++ b/src/app/contact-sidebar/contact-sidebar.component.html @@ -1,21 +1,21 @@