Skip to content

Commit b43c67c

Browse files
committed
some ui tweeks
1 parent 141596e commit b43c67c

6 files changed

Lines changed: 36 additions & 21 deletions

File tree

src/components/EditorSplitViewLayout.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import PropTypes from "prop-types";
44
import cn from "@/utils/cn";
55
import useMediaQuery from "@/hooks/useMediaQuery";
66

7-
// TODO: mobile not friendly error need to show for non responsive value
8-
97
const EditorSplitViewLayout = ({ editorBtns, editor, preview }) => {
108
const [enabledEditor, setEnabledEditor] = useState(true);
119
const isMobile = useMediaQuery("max-width: 640px");
@@ -17,7 +15,7 @@ const EditorSplitViewLayout = ({ editorBtns, editor, preview }) => {
1715
<div className="sm:flex size-full">
1816
<div
1917
className={cn(
20-
"sm:w-1/2 max-sm:w-full sm:h-full max-sm:h-[88%] flex flex-col bg-[#808080cc]",
18+
"sm:w-1/2 max-sm:w-full sm:h-full max-sm:h-[80%] flex flex-col bg-[#808080cc]",
2119
enabledEditor || isMobile && "hidden h-0"
2220
)}
2321
>
@@ -28,7 +26,7 @@ const EditorSplitViewLayout = ({ editorBtns, editor, preview }) => {
2826
</div>
2927
<div
3028
className={cn(
31-
"sm:w-1/2 max-sm:w-full sm:h-full max-sm:h-[88%] text-white max-sm:border-b max-sm:border-white",
29+
"sm:w-1/2 max-sm:w-full sm:h-full max-sm:h-[80%] text-white max-sm:border-b max-sm:border-white",
3230
!enabledEditor || isMobile && "hidden"
3331
)}
3432
>
@@ -40,12 +38,12 @@ const EditorSplitViewLayout = ({ editorBtns, editor, preview }) => {
4038
<div
4139
onClick={() => setEnabledEditor((prev) => !prev)}
4240
className={`mx-2 w-14 h-8 flex items-center bg-gray-300 rounded-full p-1 cursor-pointer transition-colors duration-300 ${
43-
enabledEditor ? "bg-indigo-500" : "bg-gray-400"
41+
!enabledEditor ? "bg-indigo-500" : "bg-gray-400"
4442
}`}
4543
>
4644
<div
4745
className={`bg-white w-6 h-6 rounded-full shadow-md transform transition-transform duration-300 ${
48-
enabledEditor ? "translate-x-6" : "translate-x-0"
46+
!enabledEditor ? "translate-x-6" : "translate-x-0"
4947
}`}
5048
/>
5149
</div>

src/data/websites.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,28 @@ export const websites = {
114114
img: 'TPgJt9i.png'
115115
},
116116
],
117+
"Code Genrator": [
118+
{
119+
heading: "V0.dev",
120+
text: "AI tool by Vercel that turns text prompts into clean React + Tailwind components.",
121+
link: "https://v0.dev/",
122+
customImg: true,
123+
img: "https://v0.dev/assets/icon-dark-32x32.png"
124+
},
125+
{
126+
heading: "Figma Make",
127+
text: "Figma's AI feature that generates code from text or designs using modern frontend stacks.",
128+
link: "https://www.figma.com/make/",
129+
img: "sCrOWn1.png"
130+
},
131+
{
132+
heading: "Flexbox Labs",
133+
text: "A simple playground to generate and visualize CSS Flexbox layouts.",
134+
link: "https://flexboxlabs.netlify.app/",
135+
customImg: true,
136+
img: "https://flexboxlabs.netlify.app/favicon.ico"
137+
}
138+
],
117139
"Regular Expression": [
118140
{
119141
heading: "regexr.com",

src/pages/Websites.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,29 @@ function AccordionGenrator({ heading, index }) {
4848
<AccordionItemHeading key={index}>
4949
<AccordionItemButton className="accordion-btn4Web">
5050
<div className="accordion-btn4Web-div">
51-
<div className="accordion-btn4Web-div2">{heading}</div>
51+
<div className="accordion-btn4Web-div2 max-lg:!text-lg max-sm:!text-base">
52+
{heading}
53+
</div>
5254
</div>
5355
</AccordionItemButton>
5456
</AccordionItemHeading>
5557
{accrdionBody.map((body, bodyIndex) => (
5658
<AccordionItemPanel
5759
key={bodyIndex}
58-
className="accrdion-panel4Web"
59-
style={{ backgroundColor: "#8c8ecc", padding: "0 0 0 20px" }}
60+
className="accrdion-panel4Web bg-[#8c8ecc] pl-5 max-lg:pl-2 max-sm:pl-1"
6061
>
6162
<div className="accordion-panel4WebDiv">
62-
<div>
63+
<div className="flex justify-center content-center flex-wrap">
6364
<img
64-
src={baseUrl + body.img}
65-
className="accordion-panel4WebImg"
65+
src={body.customImg ? body.img : baseUrl + body.img}
66+
className="rounded-[8px] h-[60px] max-lg:h-[45px] max-sm:h-[35px]"
6667
/>
6768
</div>
6869
<div className="accordion-panel4WebHead">{body.heading}</div>
6970
<p className="accordion-panel4WebP">{body.text}</p>
7071
<div>
7172
<button
72-
className="accordion-panel4WebBtn"
73+
className="accordion-panel4WebBtn max-lg:!w-[7rem] max-sm:!w-[4.8rem]"
7374
onClick={useOpenLink(body.link)}
7475
>
7576
Visit

src/styles/output.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/styles/styles.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,6 @@ button.btn:disabled {
261261
background-color: #8c8ecc;
262262
}
263263

264-
.accordion-panel4WebImg,
265-
.Browser-extensionsImg {
266-
border-radius: 8px;
267-
height: 60px;
268-
}
269-
270264
.accordion-panel4WebHead,
271265
.Browser-extensionsHead {
272266
/* text-align: center; */

vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default defineConfig({
4343
server: {
4444
host: '0.0.0.0',
4545
port: 3004,
46-
// open: true,
46+
open: true,
4747
https: false,
4848
},
4949
resolve: {

0 commit comments

Comments
 (0)