Skip to content

Commit 94ba62a

Browse files
committed
Improve responsiviness
1 parent ca6f70b commit 94ba62a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/App.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,20 @@ export default function App() {
143143
return (
144144
<main
145145
className={cn(
146-
'flex h-screen flex-col items-center justify-center gap-40',
147-
'bg-[#FFD700] pb-32',
146+
'flex h-screen flex-col items-center justify-center sm:gap-40',
147+
'bg-[#FFD700] pb-[env(safe-area-inset-bottom)] sm:pb-[calc(env(safe-area-inset-bottom)+8rem)]',
148148
)}
149149
>
150150
<h1
151151
className={cn(
152-
'font-[Baloo] text-6xl font-bold text-[#333333] shadow-black',
153-
'drop-shadow',
152+
'font-[Baloo] text-xl font-bold text-[#333333] shadow-black sm:text-3xl md:text-4xl lg:text-6xl',
153+
'pb-8 drop-shadow sm:pb-0',
154154
)}
155155
>
156156
{t('title')}
157157
</h1>
158158
<section className='flex flex-col items-center gap-12'>
159-
<Timer className='mb-10' />
159+
<Timer className='sm:mb-10' />
160160
<VolumeControl />
161161
<AudioOrVideoSourceInput
162162
onChange={handleAudioOrVideoSourceInputChange}
@@ -189,7 +189,7 @@ export default function App() {
189189
</MediaPlayer>
190190
</div>
191191
<a
192-
className='absolute right-5 top-4'
192+
className='absolute right-5 top-4 hidden sm:block'
193193
target='_blank'
194194
rel='noopener noreferrer'
195195
href='https://github.com/ZaikoXander/HoraDeSilencioInterrompido'

src/components/AudioOrVideoSourceInput/FileInputButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function FileInputButton({ onChange }: FileInputButtonProps) {
3939
}
4040

4141
return (
42-
<div>
42+
<div className='w-52 sm:w-full'>
4343
<input
4444
type='file'
4545
ref={inputRef}

src/components/AudioOrVideoSourceInput/YoutubeVideoUrlInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function YoutubeVideoUrlInput({
3737
className={cn(
3838
'rounded border border-gray-300 px-4 py-2 font-[Inter] text-2xl',
3939
'font-semibold outline-none focus:border focus:border-blue-500',
40-
'focus:ring-2 focus:ring-blue-500',
40+
'w-64 focus:ring-2 focus:ring-blue-500 sm:w-full',
4141
)}
4242
placeholder={t('placeholder')}
4343
onChange={handleInputChange}

src/components/AudioOrVideoSourceInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function AudioOrVideoSourceInput({
1414

1515
return (
1616
<div className='flex flex-col gap-y-4'>
17-
<div className='flex items-center justify-between gap-4 pr-4'>
17+
<div className='flex items-center justify-between gap-4 sm:pr-4'>
1818
<FileInputButton onChange={onChange} />
1919
<span className='font-[Inter] text-2xl font-semibold'>
2020
{t('audioOrVideoSourceInputSpan')}

src/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function Button({
1919
<button
2020
type='button'
2121
className={cn(
22-
'rounded bg-blue-500 px-4 py-2 font-[Inter] text-2xl font-bold',
22+
'rounded bg-blue-500 px-4 py-2 font-[Inter] text-xl font-bold sm:text-2xl',
2323
'text-white shadow-sm shadow-black transition-all hover:bg-blue-600',
2424
'hover:text-gray-100 disabled:opacity-50 disabled:hover:bg-blue-500',
2525
'disabled:hover:text-white',

0 commit comments

Comments
 (0)