From 1418128b0ddd5cf8794136e2c8c1d3dfcef8e81a Mon Sep 17 00:00:00 2001 From: guofei Date: Thu, 17 Oct 2024 13:58:36 +0800 Subject: [PATCH] fix: update some styles --- src/Components/deviceFrame/index.css | 4 ++ src/Components/deviceFrame/index.js | 38 ++++++++++++---- src/Components/pane/index.css | 62 +++++++++++++-------------- src/Components/pane/index.js | 29 +++++++------ src/images/ipad-horizontal.png | Bin 0 -> 2861 bytes 5 files changed, 79 insertions(+), 54 deletions(-) create mode 100644 src/images/ipad-horizontal.png diff --git a/src/Components/deviceFrame/index.css b/src/Components/deviceFrame/index.css index 7374629..5c34e0d 100644 --- a/src/Components/deviceFrame/index.css +++ b/src/Components/deviceFrame/index.css @@ -38,4 +38,8 @@ } .qrCode img { +} + +#deviceFrame { + border-radius: 10px; } \ No newline at end of file diff --git a/src/Components/deviceFrame/index.js b/src/Components/deviceFrame/index.js index 09d00b2..ca8c314 100644 --- a/src/Components/deviceFrame/index.js +++ b/src/Components/deviceFrame/index.js @@ -3,7 +3,7 @@ import androidHPng from "../../images/android-h.png"; import androidVPng from "../../images/android-v.png"; import iphoneHPng from "../../images/iphone-h.png"; import iphoneVPng from "../../images/iphone-v.png"; -import ipadHPng from "../../images/iPad-h.png"; +import ipadHPng from "../../images/ipad-horizontal.png"; import ipadVPng from "../../images/iPad-v.png"; import copyPng from "../../images/copy.png"; import refreshButtonPng from "../../images/refresh-button.png"; @@ -31,25 +31,44 @@ var configMap = { "iphone-h": { bkg: iphoneVPng, rotate: true, - width: "692px", - height: "322px", + width: "690px", + height: "325px", + styles: { + borderRadius: '13px' + } }, "iphone-v": { bkg: iphoneVPng, width: "322px", height: "693px", + styles: { + borderRadius: '13px' + } }, "ipad-h": { bkg: ipadHPng, - width: "433px", + rotate: true, + width: "458px", height: "326px", offsetv: "5px", + imgStyle: { + transform: 'rotate(-90deg) scale(1.4)', + }, + styles: { + transform: "translate(-50%, -50%) scale(1.42)", + } }, "ipad-v": { - bkg: ipadVPng, - width: "324px", - height: "433px", + bkg: ipadHPng, + width: "326px", + height: "458px", offsetv: "5px", + imgStyle: { + transform: 'scale(1.4)', + }, + styles: { + transform: "translate(-50%, -50%) scale(1.42)", + } }, }; @@ -101,7 +120,7 @@ function DeviceFrame(props) {
- background + background {props.htmlUrl && (