22title : Getting Started Guide
33---
44
5- # Getting Started Guide
6-
7- This guide will walk you through creating your first project in LiveCodes.
8-
9- Try the completed project below, or [ open it in a new tab] ( https://livecodes.io/?x=id/q6k8itvp2dv ) .
10-
11- <iframe src = " https://livecodes.io/?x=id/q6k8itvp2dv" width = " 100%" height = " 400px" ></iframe >
12-
13- ## Prerequisites
14-
15- - A web browser (Chrome, Firefox, Safari, or Edge)
16- - Basic knowledge of HTML, CSS, and JavaScript
17-
18- ## Step 1: Open LiveCodes
19-
20- 1 . Navigate to [ livecodes.io] ( https://livecodes.io )
21- 2 . You'll see the editor interface with three panels:
22- - ** HTML**
23- - ** CSS**
24- - ** JavaScript**
25- - ** Result**
26-
27- ## Step 2: Create a Simple Page
28-
29- Let's create a simple interactive greeting card.
5+ import CodeBlock from ' @theme/CodeBlock' ;
6+ import LiveCodes from ' ../../src/components/LiveCodes.tsx' ;
7+ import RunInLiveCodes from ' ../../src/components/RunInLiveCodes.tsx' ;
308
31- ### HTML Panel
32- ``` html
33- <div class =" container" >
9+ export const gettingStartedParams = {
10+ html: ` <div class="container">
3411 <h1 id="greeting">Hello, World!</h1>
3512 <input type="text" id="nameInput" placeholder="Enter your name">
3613 <button id="greetBtn">Greet Me!</button>
3714</div>
38- ```
39-
40- ### CSS Panel
41- ``` css
42- .container {
15+ ` ,
16+ css: ` .container {
4317 max-width: 600px;
4418 margin: 50px auto;
4519 text-align: center;
@@ -72,23 +46,58 @@ button {
7246button:hover {
7347 background-color: #0056b3;
7448}
75- ```
76-
77- ### JavaScript Panel
78- ``` javascript
79- const greeting = document .getElementById (' greeting' );
49+ ` ,
50+ js: ` const greeting = document.getElementById('greeting');
8051const nameInput = document.getElementById('nameInput');
8152const greetBtn = document.getElementById('greetBtn');
8253
8354greetBtn.addEventListener('click', () => {
8455 const name = nameInput.value.trim();
8556 if (name) {
86- greeting .textContent = ` Hello, ${ name} !` ;
57+ greeting.textContent = \ ` Hello, \ $ {name}!\ ` ;
8758 } else {
8859 greeting.textContent = 'Hello, World!';
8960 }
9061});
91- ```
62+ ` ,
63+ };
64+
65+ # Getting Started Guide
66+
67+ This guide will walk you through creating your first project in LiveCodes.
68+
69+ Try the completed project below, or <RunInLiveCodes linkText = " open it in a new tab" params = { gettingStartedParams } ></RunInLiveCodes >.
70+
71+ <LiveCodes params = { gettingStartedParams } ></LiveCodes >
72+
73+ ## Prerequisites
74+
75+ - A web browser (Chrome, Firefox, Safari, or Edge)
76+ - Basic knowledge of HTML, CSS, and JavaScript
77+
78+ ## Step 1: Open LiveCodes
79+
80+ 1 . Navigate to [ livecodes.io] ( https://livecodes.io )
81+ 2 . You'll see the editor interface with three panels:
82+ - ** HTML**
83+ - ** CSS**
84+ - ** JavaScript**
85+
86+ ## Step 2: Create a Simple Page
87+
88+ Let's create a simple interactive greeting card.
89+
90+ ### HTML Panel
91+
92+ <CodeBlock language = " html" >{ gettingStartedParams .html } </CodeBlock >
93+
94+ ### CSS Panel
95+
96+ <CodeBlock language = " css" >{ gettingStartedParams .css } </CodeBlock >
97+
98+ ### JavaScript Panel
99+
100+ <CodeBlock language = " js" >{ gettingStartedParams .js } </CodeBlock >
92101
93102## Step 3: See Your Results
94103
@@ -99,18 +108,18 @@ The result panel automatically updates as you type. Try:
99108
100109## Step 4: Save Your Project
101110
102- 1 . Click on the "Project" menu button in the toolbar.
103- 2 . Click Save to save the project (on this device).
104- 3 . You can open it later from "Project menu > Open".
105- 4 . Use "Project menu > Share" to get a permanent URL to your project that you can share.
111+ 1 . Click on the "** Project** " menu button in the toolbar
112+ 2 . Click " ** Save** " to save the project (on this device)
113+ 3 . You can open it later from "** Project menu > Open** "
114+ 4 . Use "** Project menu > Share** " to get a permanent URL to your project that you can share
106115
107116## Congratulations!
108117
109118You've just built your first interactive app with LiveCodes!
110119
111120Compare your version with the completed project above. Did you add any personal touches?
112121
113- ** [ View the completed project] ( https://livecodes.io/?x=id/q6k8itvp2dv ) **
122+ < RunInLiveCodes linkText = " View the completed project" params = { gettingStartedParams } ></ RunInLiveCodes >
114123
115124## Next Steps
116125
0 commit comments