Skip to content

Commit

Permalink
Merge pull request Yangjaecheon-Otter-Guardians#135 from Yangjaecheon…
Browse files Browse the repository at this point in the history
…-Otter-Guardians/fix/rounded-image

fix: download image not rounded
  • Loading branch information
da-in authored Feb 18, 2024
2 parents 19585d3 + 71f67de commit f2aa6c6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
working-directory: ./frontend
steps:
Expand Down
41 changes: 21 additions & 20 deletions frontend/src/sections/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,32 @@ export default function Preview({ previewRef }: Props) {
}}
>
<div className="w-full h-[200px] tablet:h-[320px] flex justify-center items-center" ref={preview}>
<div
ref={previewRef}
style={{
width: `${previewWidth}px`,
height: '100%',
backgroundColor: `${tab === '1' ? currentColor.color : '#F0F0F0'}`,
backgroundImage:
tab !== '1' ? `url(${imageSrc})` : colorTab === '2' ? `${currentGradation.color}` : 'none',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
borderRadius: '5px',
}}
>
<TextPreview />
<div className="rounded-[5px] h-full overflow-hidden">
<div
ref={previewRef}
style={{
position: 'relative',
bottom: '100%',
zIndex: 97,
width: `${previewWidth}px`,
height: '100%',
background: `${isBright || tab === '1' ? 'transparent' : 'rgba(0, 0, 0, 0.3)'}`,
backgroundColor: `${tab === '1' ? currentColor.color : '#F0F0F0'}`,
backgroundImage:
tab !== '1' ? `url(${imageSrc})` : colorTab === '2' ? `${currentGradation.color}` : 'none',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
}}
></div>
>
<TextPreview />
<div
style={{
position: 'relative',
bottom: '100%',
zIndex: 97,
width: `${previewWidth}px`,
height: '100%',
background: `${isBright || tab === '1' ? 'transparent' : 'rgba(0, 0, 0, 0.3)'}`,
}}
></div>
</div>
</div>
</div>
<div
Expand Down

0 comments on commit f2aa6c6

Please sign in to comment.