Skip to content

Commit

Permalink
Added square images on outside of the office
Browse files Browse the repository at this point in the history
  • Loading branch information
gurutechstu committed Dec 23, 2023
1 parent fce35db commit 8b6e27d
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<div class="contents row">
<div class="flex">
<h3>Stu outside of the office</h3>
<div class="col">
<div class="header col">
<h3>Stu outside of the office</h3>
<p class="subtitle">
Relating to clients and coworkers is easier with hobbies outside of work. Here are a few of
mine!
</p>
</div>
<div class="tiles">
<home-page-square-photo-tile
*ngFor="let photo of photos"
[image]="photo.image"
[subtitle]="photo.subtitle"
></home-page-square-photo-tile>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,28 @@
padding: 5rem;

& > div {
h3 {
align-items: center;
width: 100%;
gap: 2rem;

.header {
text-align: center;
gap: 0.5rem;
}

.tiles {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;

@media (max-width: 760px) {
grid-template-columns: repeat(2, 1fr);
}

& > * {
width: 10rem;
height: 10rem;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
import { Component } from '@angular/core';
import { environment } from 'src/environments/environment';

@Component({
selector: 'home-page-outside-of-work-banner',
templateUrl: './outside-of-work-banner.component.html',
styleUrls: ['./outside-of-work-banner.component.scss'],
})
export class OutsideOfWorkBannerComponent {}
export class OutsideOfWorkBannerComponent {
photos: { image: string; subtitle: string }[] = [
{
image: `${environment.assetPrefix}code-sample.png`,
subtitle: 'Hello World. This is a long caption',
},
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
{ image: `${environment.assetPrefix}code-sample.png`, subtitle: 'Hello World' },
];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="contents" style="background-image: url('{{ image }}');">
<div [class.overlay]="subtitle">
<p class="flex">{{ subtitle }}</p>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@use '/src/styles.scss' as styles;

.contents {
width: 100%;
height: 100%;
transition: all 200ms;
overflow: hidden;

&:hover {
transform: scale(1.05);

&::before {
filter: blur(8px);
}

* {
opacity: 1;
}

.overlay {
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
text-align: center;

p {
color: map-get(styles.$text-gray, lightest);
}
}
}

& > div {
width: 100%;
height: 100%;
}

* {
opacity: 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, Input } from '@angular/core';
import { environment } from 'src/environments/environment';

@Component({
selector: 'home-page-square-photo-tile',
templateUrl: './square-photo-tile.component.html',
styleUrls: ['./square-photo-tile.component.scss'],
})
export class SquarePhotoTileComponent {
@Input({ required: true }) image: string = `${environment.assetPrefix}code-sample.png`;
@Input() subtitle?: string;
}
2 changes: 2 additions & 0 deletions src/app/home-page/home-page.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { SkillListComponent } from './components/skill-list/skill-list.component
import { MyWorkComponent } from './components/my-work/my-work.component';
import { OutsideOfWorkBannerComponent } from './components/outside-of-work-banner/outside-of-work-banner.component';
import { MyWorkCardComponent } from './components/my-work-card/my-work-card.component';
import { SquarePhotoTileComponent } from './components/square-photo-tile/square-photo-tile.component';

@NgModule({
declarations: [
Expand All @@ -18,6 +19,7 @@ import { MyWorkCardComponent } from './components/my-work-card/my-work-card.comp
MyWorkComponent,
OutsideOfWorkBannerComponent,
MyWorkCardComponent,
SquarePhotoTileComponent,
],
imports: [HomePageRouterModule, SharedModule],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="contents row">
<div class="col">
<h3>{{ header }}</h3>
<h4>{{ header }}</h4>
<a href="mailTo:{{ email }}">
<shared-stroked-button [oversized]="true" [stroke]="buttonStroke">
<span>{{ buttonText }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
}
}

.stroked-button-component {
transition: all 200ms;

&:hover {
transform: scale(1.025);
}
}

.oversized {
padding: 2rem 3rem;
}
Expand Down

0 comments on commit 8b6e27d

Please sign in to comment.