File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 "preview" : " vite preview"
1111 },
1212 "dependencies" : {
13+ "@fontsource/fira-code" : " ^5.2.7" ,
1314 "@tailwindcss/vite" : " ^4.2.2" ,
1415 "react" : " ^19.2.4" ,
1516 "react-dom" : " ^19.2.4" ,
Original file line number Diff line number Diff line change @@ -9,8 +9,14 @@ interface TextboxProps {
99
1010export default function Textbox ( props : TextboxProps ) {
1111 return (
12- < div style = { { backgroundColor : "red" } } >
13- { props . text }
12+ < div style = { { backgroundColor : props . lightcol } } >
13+ < div >
14+ < img src = { "/" + props . headerimage } alt = { props . headerimage } />
15+ </ div >
16+ < div style = { { backgroundColor : props . darkcol } } >
17+ < p style = { { fontFamily : "'Fira Code', Arial" } } > { props . text } </ p >
18+ </ div >
19+
1420 </ div >
1521 )
1622}
Original file line number Diff line number Diff line change 1+ @import "@fontsource/fira-code/400.css" ;
12@import "tailwindcss" ;
Original file line number Diff line number Diff line change @@ -10,26 +10,50 @@ function Home() {
1010 < div className = "flex-1 flex flex-col" >
1111
1212 { /* logo */ }
13- < div > Logo</ div >
13+ < div > < img src = "logo.png" alt = " Logo" /> </ div >
1414
1515 { /* python and alien code */ }
1616 < div className = "flex" >
1717 < div className = "flex-1" >
18- Python Code
18+ < Textbox
19+ lightcol = "#005DA9"
20+ darkcol = "#002E53"
21+ text = "Python Code"
22+ headerimage = "pythoncode.png"
23+ />
1924 </ div >
2025 < div className = "flex-1" >
21- Alien Code
26+ < Textbox
27+ lightcol = "#00A93D"
28+ darkcol = "#00531F"
29+ text = "Alien Code"
30+ headerimage = "aliencode.png"
31+ />
2232 </ div >
2333 </ div >
2434
2535 { /* task */ }
26- < div > task</ div >
36+ < div >
37+ < Textbox
38+ lightcol = "#5E5E5E"
39+ darkcol = "#2E2E2E"
40+ text = "Task"
41+ headerimage = "task.png"
42+ />
43+ </ div >
2744 </ div >
2845
2946 { /* right */ }
3047 < div className = "flex-1" >
3148 < div > Code</ div >
32- < div > Output</ div >
49+ < div >
50+ < Textbox
51+ lightcol = "#5E5E5E"
52+ darkcol = "#2E2E2E"
53+ text = "Output"
54+ headerimage = "output.png"
55+ />
56+ </ div >
3357 </ div >
3458
3559
You can’t perform that action at this time.
0 commit comments