Skip to content

Commit 21eb592

Browse files
committed
📱 style: created a better layout for mobile devices
1 parent edf5ad7 commit 21eb592

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

src/App.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ function App() {
1010
useEffect(() => inputRef.current.focus(), []);
1111

1212
return (
13-
<div className="flex flex-row w-screen h-screen" onClick={() => inputRef.current.focus()}>
13+
<div
14+
className="flex flex-col w-screen h-screen sm:flex-row"
15+
onClick={() => inputRef.current.focus()}
16+
>
1417
<Terminal
1518
inputRef={inputRef}
1619
avaliableCommands={avaliableCommands}

src/shared/components/Pomodoro.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function Pomodoro({ customMinutes = 1, customSeconds = 0 }) {
4242
const timerSeconds = parseTime(seconds);
4343

4444
return (
45-
<section className="w-2/5 h-full flex flex-col justify-center items-center bg-zinc-900 text-slate-200 border-purple-800 border-l-2">
45+
<section className="sm:w-2/5 w-screen h-full flex flex-col justify-center items-center bg-zinc-900 text-slate-200 border-purple-800 border-t-2 sm:border-l-2 sm:border-t-0">
4646
{breakTime ? (
4747
<div>
4848
<p className="font-Ubuntu text-xs text-slate-300">

src/shared/components/StatusBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { BsPauseCircle, BsClockFill, BsCheck2Square } from "react-icons/bs";
22

33
export default function StatusBar({ paused, breakTime }) {
44
return (
5-
<section className="bg-slate-700 w-2/5 fixed bottom-0 flex">
5+
<section className="bg-slate-700 sm:w-2/5 w-screen fixed bottom-0 flex">
66
<div
77
className={`flex items-center gap-1 align-center text-slate-200 text-sm font-RobotoMono pl-2 pr-4 bg-purple-600 font-medium ${
88
!breakTime ? "rounded-r-xl" : null

src/shared/components/Terminal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function Terminal({ inputRef, avaliableCommands, PS1 }) {
4848
};
4949

5050
return (
51-
<div className="whitespace-pre-line text-white bg-neutral-900 w-3/5 h-screen p-2 overflow-y-scroll no-scrollbar">
51+
<div className="whitespace-pre-line text-white bg-neutral-900 sm:w-3/5 w-screen h-screen p-2 overflow-y-scroll no-scrollbar">
5252
<section className="text-sm font-RobotoMono font-medium">
5353
{output.map((data, index) => (
5454
<div key={index}>

tailwind.config.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ module.exports = {
88
Ubuntu: ["Ubuntu", "sans-serif"],
99
},
1010
},
11+
screens: {
12+
sm: "640px",
13+
md: "768px",
14+
lg: "1024px",
15+
xl: "1280px",
16+
"2xl": "1536px",
17+
},
1118
},
1219
plugins: [],
1320
};

0 commit comments

Comments
 (0)