Skip to content

Commit 473fc90

Browse files
committed
fix(photo-viewer): update iframe style to use aspect ratio
- Modified the iframe style in SharePanel to utilize the aspect ratio based on photo dimensions, enhancing responsiveness. Signed-off-by: Innei <tukon479@gmail.com>
1 parent c43ff36 commit 473fc90

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

apps/web/src/components/ui/photo-viewer/SharePanel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ export const SharePanel = ({ photo, trigger, blobSrc }: SharePanelProps) => {
282282
<code className="text-text-secondary font-mono text-xs break-all whitespace-pre select-all">
283283
{`<iframe
284284
src="${siteConfig.url.replace(/\/$/, '')}/share/iframe?id=${photo.id}"
285-
height="500"
286-
style="width: 100%;"
285+
style="width: 100%; aspect-ratio: ${photo.width} / ${photo.height}"
287286
allowTransparency
288287
sandbox="allow-scripts allow-same-origin allow-popups"
289288
/>`}

0 commit comments

Comments
 (0)