From 0436008f3506f928cfca0ed528c86e7e31fb23a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Thu, 14 Oct 2021 23:21:22 +0200 Subject: [PATCH] Make PostCard appear when hovering a photo on the grid --- src/style/pages/_photos.scss | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/style/pages/_photos.scss b/src/style/pages/_photos.scss index 8fe808a..ef3f96a 100644 --- a/src/style/pages/_photos.scss +++ b/src/style/pages/_photos.scss @@ -338,12 +338,26 @@ } } + // Postcard .post-card { position: absolute; bottom: 0; right: 0; - display: none; + border-top-left-radius: 8px; + opacity: 0; + pointer-events: none; + // transform: translate3d(10%,25%,0) rotate(-2deg); + transform: translate3d(12%, 23%, 0) rotate(-5deg); + transition: opacity 0.4s var(--ease-quart), transform 1.2s var(--ease-quart); + } + + // Show postcard on hover + &:hover { + .post-card { + opacity: 1; + transform: translate3d(3%,3%,0) rotate(2deg); + } } } }