From 757b02fc84a0d5e4eba642e72fc8672a11af24ff Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sat, 28 Oct 2023 18:17:00 -0700 Subject: [PATCH] frame: refactor photo CSS Signed-off-by: Varun Patil --- src/components/frame/Photo.vue | 92 ++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/src/components/frame/Photo.vue b/src/components/frame/Photo.vue index 0af11e72..5869dd47 100644 --- a/src/components/frame/Photo.vue +++ b/src/components/frame/Photo.vue @@ -9,6 +9,7 @@ error: data.flag & c.FLAG_LOAD_FAIL, }" > +
-
- - {{ videoDuration }} - + +
+ {{ videoDuration }}
- -
+
- - + + +
& { - transform: translate(-$icon-size, $icon-size); + color: white; + + &.top-right { + top: var(--icon-dist); + right: var(--icon-dist); + .p-outer.selected > & { + transform: translate(-$icon-size, $icon-size); + } } - display: flex; - align-items: center; - justify-content: center; - - .time { - font-size: 0.75em; - font-weight: bold; - margin-right: 3px; + &.bottom-left { + bottom: var(--icon-dist); + left: var(--icon-dist); + .p-outer.selected > & { + transform: translate($icon-size, -$icon-size); + } } -} -.livephoto { - pointer-events: auto; -} -.bottom-left-flag { - bottom: var(--icon-dist); - left: var(--icon-dist); - .p-outer.selected > & { - transform: translate($icon-size, -$icon-size); + + &.video { + display: flex; + align-items: center; + justify-content: center; + + > .time { + font-size: 0.75em; + font-weight: bold; + margin-right: 3px; + } + } + + &.livephoto { + // Hover to play livephoto + pointer-events: auto; } } -/* Actual image */ +// Actual image div.img-outer { position: relative; box-sizing: border-box;