From 4ab9ffe5c024fc1345da5a0fd2bd021289e9ad16 Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 25 Sep 2019 07:51:08 +0800 Subject: [PATCH] fix: mobile image generating --- src/components/Card.js | 20 +++++++++----------- src/components/IconBack.js | 1 + src/pages/share.js | 5 ----- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/components/Card.js b/src/components/Card.js index 16e58d9..6a687c2 100644 --- a/src/components/Card.js +++ b/src/components/Card.js @@ -14,6 +14,14 @@ const Wrapper = styled.div` /* border: 1px solid #fff; */ box-shadow: -13px 18px 10px rgba(0, 0, 0, 0.2); margin-top: -4rem; + &.starting { + margin: 0 auto; + margin-top: -4rem; + box-shadow: none; + .title { + padding-left: 0.3rem; + } + } &.img { width: 80vw; padding: 0; @@ -26,7 +34,6 @@ const Wrapper = styled.div` } } .circle { - position: relative; width: 18.4rem; height: 18.4rem; border-radius: 50%; @@ -56,15 +63,6 @@ const Wrapper = styled.div` font-family: 'TChinese', 'SimSun', 'FangSong', 'STSong', 'STZhongsong', 'LiSu', 'KaiTi', 'Microsoft YaHei'; } - .btn { - font-size: 1.4rem; - - position: absolute; - bottom: -6rem; - left: 50%; - transform: translateX(-50%); - padding: 0.4rem 0.8rem; - } `; const ua = navigator.userAgent; const isiOSwebview = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ua); @@ -99,7 +97,7 @@ const Card = ({ color: { hex, name, RGB, figure = 'default.png' }, setName = '' diff --git a/src/components/IconBack.js b/src/components/IconBack.js index a76472d..4142fa9 100644 --- a/src/components/IconBack.js +++ b/src/components/IconBack.js @@ -9,6 +9,7 @@ const IconBack = () => { -1 || isiOSwebview; const Share = ({ match }) => { const { id } = match.params; @@ -30,7 +26,6 @@ const Share = ({ match }) => { - {isWebview && APP内打开,图片生成功能可能受限,建议在浏览器内打开} ); };