diff --git a/src/assets/images/harmonic-preview.png b/src/assets/images/harmonic-preview.png new file mode 100644 index 0000000..5338f4c Binary files /dev/null and b/src/assets/images/harmonic-preview.png differ diff --git a/src/di/mock.ts b/src/di/mock.ts index 49eaa65..aa8d473 100644 --- a/src/di/mock.ts +++ b/src/di/mock.ts @@ -4,13 +4,13 @@ export interface Artifact { type: 'harmonic' | 'gravity' | 'dancing' title: string; description?: string; - // preview: string; + preview: string; } export const ArtifactToken = new InjectionToken('gallery-list'); export const MOCK_ARTIFACTS: Artifact[] = [ - {type: 'harmonic', title: 'Harmonic Motion'}, - {type: 'gravity', title: 'Gravity'}, - {type: 'dancing', title: 'Dancing Pixels'} + {type: 'harmonic', title: 'Harmonic Motion', preview: 'assets/images/harmonic-preview.png'}, + {type: 'gravity', title: 'Gravity', preview: ''}, + {type: 'dancing', title: 'Dancing Pixels', preview: ''} ] diff --git a/src/gallery/gallery-home/gallery-home.component.html b/src/gallery/gallery-home/gallery-home.component.html index 0c9a6b6..cd354f3 100644 --- a/src/gallery/gallery-home/gallery-home.component.html +++ b/src/gallery/gallery-home/gallery-home.component.html @@ -1,7 +1,17 @@
@for (artifact of artifacts; track artifact.title) { - - {{ artifact.title }} + + + {{ artifact.title }} + + @if (artifact.preview) { + + } @else { + Developing + } + + + }
diff --git a/src/gallery/gallery-home/gallery-home.component.scss b/src/gallery/gallery-home/gallery-home.component.scss index 1385890..30fb20f 100644 --- a/src/gallery/gallery-home/gallery-home.component.scss +++ b/src/gallery/gallery-home/gallery-home.component.scss @@ -1,20 +1,27 @@ .container { display: flex; flex-flow: column wrap; - margin: 0 25%; + width: 800px; + margin: 0 auto; .item { flex: 0 1 300px; align-self: flex-start; - width: 200px; - cursor: pointer; + width: 240px; + margin: 1.5rem; + transition: all ease 0.3s; &:nth-of-type(2n) { align-self: flex-end; } &:nth-of-type(n+2) { - //margin-top: -50px; + margin-top: -50px; + } + + &:hover { + transform: scale(1.1) rotate(2deg); + box-shadow: 0 0 6px 6px #aaf6; } } }