-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·208 lines (184 loc) · 10.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ReactStream - React Component Development Toolkit</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="stylesheet" href="css/styles.css">
</head>
<body class="bg-gray-50 text-gray-800">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center">
<img src="img/logo-reactstream1.svg" alt="ReactStream Logo" class="h-12 w-auto mr-4">
<!-- <span class="text-2xl font-bold text-indigo-600">ReactStream</span>-->
</div>
<nav class="hidden md:flex space-x-10">
<a href="#features" class="text-gray-600 hover:text-indigo-600 transition">Features</a>
<a href="#documentation" class="text-gray-600 hover:text-indigo-600 transition">Documentation</a>
<a href="#examples" class="text-gray-600 hover:text-indigo-600 transition">Examples</a>
<a href="#download" class="text-gray-600 hover:text-indigo-600 transition">Download</a>
</nav>
<div>
<a href="https://github.com/reactstream/cli"
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
<i class="fab fa-github mr-2"></i> GitHub
</a>
</div>
</div>
</header>
<!-- Hero Section -->
<section class="hero-pattern py-20 md:py-32">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0">
<h1 class="text-4xl md:text-6xl font-bold text-white mb-6">
Streamline Your React Development
</h1>
<p class="text-xl text-gray-300 mb-8">
ReactStream is a comprehensive CLI toolkit that analyzes your components and helps you debug
effectively—all in one seamless workflow.
</p>
<div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
<a href="#download"
class="inline-flex justify-center items-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 md:text-lg">
Get Started
</a>
<a href="#documentation"
class="inline-flex justify-center items-center px-6 py-3 border border-gray-700 text-base font-medium rounded-md text-gray-200 hover:bg-gray-800 md:text-lg">
Documentation
</a>
</div>
</div>
<div class="md:w-1/2">
<div class="code-window">
<div class="code-header">
<div class="flex">
<div class="code-dot bg-red-500"></div>
<div class="code-dot bg-yellow-500"></div>
<div class="code-dot bg-green-500"></div>
</div>
<span class="text-gray-400 text-sm">terminal</span>
</div>
<div class="code-body">
<span class="syntax-comment"># Install globally</span><br>
$ npm install -g @reactstream/cli<br><br>
<span class="syntax-comment"># Analyze your component</span><br>
$ reactstream analyze MyComponent.js<br><br>
<span class="text-green-400">✓ Syntax valid</span><br>
<span class="text-green-400">✓ No linting issues</span><br><br>
<span class="text-blue-400">Imports Analysis:</span><br>
<span class="text-gray-300"> • react: React, useState, useEffect</span><br><br>
<span class="text-blue-400">Hooks Usage:</span><br>
<span class="text-gray-300"> • useState (line 5)</span><br>
<span class="text-gray-300"> • useEffect (line 12)</span><br><br>
<span class="syntax-comment"># Test your component</span><br>
$ reactstream serve MyComponent.js --port=3000
</div>
</div>
</div>
</div>
</div>
</section>
<section class="py-20 md:py-32 reactstream-code">
<div class="container mx-auto px-4">
<h2 class="text-2xl font-bold mb-4">React Component Example</h2>
<p class="text-black-300 mb-6">
This example demonstrates a simple React functional component with hooks, state management,
and conditional rendering - the kind of component ReactStream helps you analyze and debug.
</p>
<div class="code-window mt-4">
<div class="code-header">
<div class="flex">
<div class="code-dot bg-red-500"></div>
<div class="code-dot bg-yellow-500"></div>
<div class="code-dot bg-green-500"></div>
</div>
<span class="text-gray-400 text-sm">MyComponent.js</span>
</div>
<div class="code-body reactstream-code">
<span class="syntax-keyword">import</span> React, { useState } <span class="syntax-keyword">from</span>
<span class="syntax-string">'react'</span>;<br><br>
<span class="syntax-keyword">const</span> <span class="syntax-function">MyComponent</span> = () => {<br>
<span class="syntax-keyword">const</span> [count, setCount] = useState(<span
class="syntax-number">0</span>);<br>
<span class="syntax-keyword">const</span> [isVisible, setIsVisible] = useState(<span
class="syntax-boolean">true</span>);<br><br>
<span class="syntax-keyword">const</span> <span
class="syntax-function">handleIncrement</span> = () => {<br>
setCount(prevCount => prevCount + <span class="syntax-number">1</span>);<br>
};<br><br>
<span class="syntax-keyword">const</span> <span
class="syntax-function">toggleVisibility</span> = () => {<br>
setIsVisible(prev => !prev);<br>
};<br><br>
<span class="syntax-keyword">return</span> (<br>
<span class="syntax-tag"><div</span> <span
class="syntax-attr">className</span>=<span class="syntax-string">"my-component"</span><span
class="syntax-tag">></span><br>
<span class="syntax-tag"><h2></span>My Example Component<span
class="syntax-tag"></h2></span><br><br>
{isVisible && (<br>
<span class="syntax-tag"><div</span> <span
class="syntax-attr">className</span>=<span class="syntax-string">"counter-section"</span><span
class="syntax-tag">></span><br>
<span class="syntax-tag"><p></span>Count:
{count}<span class="syntax-tag"></p></span><br>
<span class="syntax-tag"><button</span>
<span class="syntax-attr">onClick</span>={handleIncrement}<span class="syntax-tag">></span><br>
Increment<br>
<span
class="syntax-tag"></button></span><br>
<span class="syntax-tag"></div></span><br>
)}<br><br>
<span class="syntax-tag"><button</span> <span
class="syntax-attr">onClick</span>={toggleVisibility}<span class="syntax-tag">></span><br>
{isVisible ? <span class="syntax-string">'Hide'</span> :
<span class="syntax-string">'Show'</span>} Counter<br>
<span class="syntax-tag"></button></span><br>
<span class="syntax-tag"></div></span><br>
);<br>
};<br><br>
<span class="syntax-keyword">export</span> <span class="syntax-keyword">default</span> MyComponent;
</div>
</div>
<div class="code-terminal mt-4">
<div class="text-center">
<h2 class="text-2xl font-bold mb-4">Start in console</h2>
<img src="img/serve-console.png" alt="ReactStream Logo" class="w-auto mr-4">
</div>
</div>
<div class="code-browser mt-4">
<p></p>
<div class="text-center">
<h2 class="text-2xl font-bold mb-4">and ... go to browser <a class="underline-dash"
href="http://localhost:3000/">http://localhost:3000/</a>
</h2>
<img src="img/serve-browser.png" alt="ReactStream Logo" class="w-auto">
</div>
</div>
<div class="mt-2">
<div class="text-center">
<!-- <img src="img/logo-reactstream1.svg" alt="ReactStream Logo" class="w-auto">-->
</div>
</div>
</div>
</section>
<p></p>
<!-- Include other sections as separate components -->
<div id="features-container"></div>
<div id="how-it-works-container"></div>
<div id="documentation-container"></div>
<div id="examples-container"></div>
<div id="download-container"></div>
<div id="testimonials-container"></div>
<div id="faq-container"></div>
<div id="footer-container"></div>
<!-- Include JavaScript -->
<script src="js/main.js"></script>
<script src="js/components.js"></script>
</body>
</html>