Skip to content

feauture: about me section #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Angular GitHub CI

on:
push:
branches:
- main
on: [push]

jobs:
ci:
Expand Down Expand Up @@ -44,7 +41,8 @@ jobs:
run: |
npm run build
- name: Deploy
if: github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
npm run ng -- deploy --base-href=/anjeyy.github.io/ --name="automated deployment" [email protected]
npm run ng -- deploy --base-href=anjeyy.github.io --name="automated deployment" [email protected]
2 changes: 1 addition & 1 deletion deployment/deploy-to-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ng build

#todo(github ci/cd): 'ng add angular-cli-ghpages'

ng deploy --base-href=anjeyy.github.io
ng deploy --base-href=anjeyy.github.io --name="automated deployment" [email protected]
6 changes: 6 additions & 0 deletions src/app/about-me/Tile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface Tile {
color: string;
cols: number;
rows: number;
text: string;
}
3 changes: 3 additions & 0 deletions src/app/about-me/about-me.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mat-grid-tile {
background: lightblue;
}
37 changes: 37 additions & 0 deletions src/app/about-me/about-me.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<mat-grid-list cols="4" rowHeight="20em" gutterSize="2em">
<mat-grid-tile
*ngFor="let tile of tiles"
[colspan]="tile.cols"
[rowspan]="tile.rows"
[style.background]="tile.color"
>
<mat-card class="my-card">
<mat-card-title>Title</mat-card-title>
<mat-card-subtitle>Sub-Title</mat-card-subtitle>
<mat-card-content>
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,
Content,

</mat-card-content>
<mat-card-actions>Container for buttons at the bottom of the card</mat-card-actions>
<mat-card-footer>Footer</mat-card-footer>
</mat-card>
<!-- {{ tile.text }}-->
</mat-grid-tile>
</mat-grid-list>
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { LandingPageComponent } from './landing-page.component';
import { AboutMeComponent } from './about-me.component';

describe('LandingPageComponent', () => {
let component: LandingPageComponent;
let fixture: ComponentFixture<LandingPageComponent>;
describe('AboutMeComponent', () => {
let component: AboutMeComponent;
let fixture: ComponentFixture<AboutMeComponent>;

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

beforeEach(() => {
fixture = TestBed.createComponent(LandingPageComponent);
fixture = TestBed.createComponent(AboutMeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
20 changes: 20 additions & 0 deletions src/app/about-me/about-me.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { Tile } from './Tile';

@Component({
selector: 'app-about-me',
templateUrl: './about-me.component.html',
styleUrls: ['./about-me.component.css'],
})
export class AboutMeComponent implements OnInit {
tiles: Tile[] = [
{ text: 'One', cols: 3, rows: 1, color: 'lightblue' },
{ text: 'Two', cols: 1, rows: 2, color: 'lightgreen' },
{ text: 'Three', cols: 1, rows: 1, color: 'lightpink' },
{ text: 'Four', cols: 2, rows: 1, color: '#DDBDF1' },
];

constructor() {}

ngOnInit(): void {}
}
4 changes: 2 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import { MatTabsModule } from '@angular/material/tabs';
import { MatDividerModule } from '@angular/material/divider';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { LandingPageComponent } from './landing-page/landing-page.component';
import { TabOverviewComponent } from './tab-overview/tab-overview.component';
import { AboutMeComponent } from './about-me/about-me.component';

@NgModule({
declarations: [
AppComponent,
ToolbarComponent,
LandingPageComponent,
TabOverviewComponent,
AboutMeComponent,
],
imports: [
BrowserModule,
Expand Down
Empty file.
1 change: 0 additions & 1 deletion src/app/landing-page/landing-page.component.html

This file was deleted.

15 changes: 0 additions & 15 deletions src/app/landing-page/landing-page.component.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/tab-overview/tab-overview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<mat-tab disabled label="">disabled</mat-tab>

<mat-tab label="About me">
<app-landing-page></app-landing-page>
<app-about-me></app-about-me>
</mat-tab>
<mat-tab disabled label="">disabled</mat-tab>

Expand Down