Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enlarge image size #37

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/api/frames/images/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IMAGE_ZOOM_SCALE } from '@/constants';
const imagesWorker = createImagesWorker({
imageOptions: {
sizes: {
'1.91:1': { width: 764 * IMAGE_ZOOM_SCALE, height: 400 * IMAGE_ZOOM_SCALE },
'1.91:1': { width: 1085 * IMAGE_ZOOM_SCALE, height: 568 * IMAGE_ZOOM_SCALE },
'1:1': { width: 600 * IMAGE_ZOOM_SCALE, height: 600 * IMAGE_ZOOM_SCALE },
},
},
Expand Down
36 changes: 19 additions & 17 deletions src/components/PollCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
display: 'flex',
alignItems: 'center',
color: theme.secondTextColor,
height: 20 * IMAGE_ZOOM_SCALE,
height: 40 * IMAGE_ZOOM_SCALE,
width: '100%',
fontSize: 18 * IMAGE_ZOOM_SCALE,
fontSize: 24 * IMAGE_ZOOM_SCALE,
}}
>
<span
style={{
marginRight: 9 * IMAGE_ZOOM_SCALE,
width: 12 * IMAGE_ZOOM_SCALE,
height: 12 * IMAGE_ZOOM_SCALE,
marginRight: 12 * IMAGE_ZOOM_SCALE,
width: 16 * IMAGE_ZOOM_SCALE,
height: 16 * IMAGE_ZOOM_SCALE,
borderRadius: '50%',
backgroundColor: theme.secondTextColor,
}}
Expand All @@ -67,10 +67,11 @@
style={{
position: 'relative',
display: 'flex',
height: 20 * IMAGE_ZOOM_SCALE,
height: 40 * IMAGE_ZOOM_SCALE,
backgroundColor: theme.optionBgColor,
borderRadius: 4 * IMAGE_ZOOM_SCALE,
fontSize: 12 * IMAGE_ZOOM_SCALE,
borderRadius: 8 * IMAGE_ZOOM_SCALE,
fontSize: 20 * IMAGE_ZOOM_SCALE,
fontWeight: isMax ? 'bold' : 'normal',
color: theme.secondTextColor,
overflow: 'hidden',
}}
Expand Down Expand Up @@ -98,8 +99,8 @@
zIndex: 1,
width: '100%',
height: '100%',
paddingLeft: 4 * IMAGE_ZOOM_SCALE,
paddingRight: 8 * IMAGE_ZOOM_SCALE,
paddingLeft: 8 * IMAGE_ZOOM_SCALE,
paddingRight: 16 * IMAGE_ZOOM_SCALE,
}}
>
<div
Expand All @@ -113,11 +114,11 @@
}}
>
{choice.is_select ? (
<img

Check warning on line 117 in src/components/PollCard.tsx

View workflow job for this annotation

GitHub Actions / eslint

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
alt="selected"
style={{
width: 16 * IMAGE_ZOOM_SCALE,
height: 16 * IMAGE_ZOOM_SCALE,
width: 24 * IMAGE_ZOOM_SCALE,
height: 24 * IMAGE_ZOOM_SCALE,
}}
src={`${env.external.NEXT_PUBLIC_HOST}/selected.png`}
/>
Expand Down Expand Up @@ -163,10 +164,10 @@
<div
style={{
display: 'flex',
marginTop: 120 * IMAGE_ZOOM_SCALE,
marginTop: 170 * IMAGE_ZOOM_SCALE,
justifyContent: 'center',
width: '100%',
fontSize: 12 * IMAGE_ZOOM_SCALE,
fontSize: 24 * IMAGE_ZOOM_SCALE,
color: is_end ? themeConfig.secondTextColor : themeConfig.optionSelectedTextColor,
opacity: is_end ? 0.5 : 1,
}}
Expand All @@ -181,14 +182,15 @@
padding: `0 ${72 * IMAGE_ZOOM_SCALE}px`,
width: '100%',
color: themeConfig.secondTextColor,
fontSize: 16 * IMAGE_ZOOM_SCALE,
fontSize: 28 * IMAGE_ZOOM_SCALE,
fontWeight: 'bold',
textAlign: 'center',
}}
>
<div
style={{
display: '-webkit-box',
WebkitLineClamp: profileId ? 2 : 5,
WebkitLineClamp: profileId ? 3 : 7,
WebkitBoxOrient: 'vertical',
overflow: 'hidden',
textOverflow: 'ellipsis',
Expand Down Expand Up @@ -250,7 +252,7 @@
display: 'flex',
justifyContent: 'center',
paddingBottom: 16 * IMAGE_ZOOM_SCALE,
fontSize: 10 * IMAGE_ZOOM_SCALE,
fontSize: 16 * IMAGE_ZOOM_SCALE,
color: themeConfig.secondTextColor,
}}
>
Expand Down
Loading