From cd39faca8222bd8fab67db552d90bc0feb0bf0b0 Mon Sep 17 00:00:00 2001 From: NicolasRichel Date: Mon, 8 Feb 2021 14:53:10 +0100 Subject: [PATCH] feat(projects): add image switcher to project model preview --- .../ProjectModelPreview.scss | 18 ++++++- .../ProjectModelPreview.vue | 50 ++++++++++++++++--- src/state/projects.js | 20 +++++--- 3 files changed, 74 insertions(+), 14 deletions(-) diff --git a/src/components/project-model-preview/ProjectModelPreview.scss b/src/components/project-model-preview/ProjectModelPreview.scss index cf10a761f..c06bdefc2 100644 --- a/src/components/project-model-preview/ProjectModelPreview.scss +++ b/src/components/project-model-preview/ProjectModelPreview.scss @@ -1,10 +1,26 @@ .project-model-preview { @include noselect; + position: relative; height: 100%; background-color: $platform-project-card-background; - &__wrapper { + &__switcher { + position: absolute; + z-index: 2; + display: flex; + justify-content: center; + align-items: center; + width: 100px; + margin: 0 calc((100% - 100px) / 2); + margin-top: 16px; + + .icon-previous { + transform: rotate(180deg); + } + } + + &__viewport { width: $platform-project-card-content-height; height: 100%; margin: auto; diff --git a/src/components/project-model-preview/ProjectModelPreview.vue b/src/components/project-model-preview/ProjectModelPreview.vue index c7123a78f..32f9a465f 100644 --- a/src/components/project-model-preview/ProjectModelPreview.vue +++ b/src/components/project-model-preview/ProjectModelPreview.vue @@ -1,8 +1,23 @@