A text-mode web browser with AI help, inspired by Lynx, plus TextFirst.css for text-first websites.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-textbrowser.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-textbrowser.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-textbrowser.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add Gateway Architecture documentation 2693936 1 year ago History
index.html · 16.1 KB · 438 lines
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>TextFirst.css Demo - Against the Tri-Hard Pattern</title>
7 <link rel="stylesheet" href="../textfirst.css">
8</head>
9<body>
10
11<banner type="success">
12 <strong>Welcome!</strong> This page demonstrates TextFirst.css - a semantic CSS framework that works in BOTH text browsers AND graphical browsers.
13</banner>
14
15<article>
16 <header>
17 <center>
18 <h1>TextFirst.css</h1>
19 <p><font color="cyan">A Semantic CSS Framework Against the Tri-Hard Pattern</font></p>
20 </center>
21 </header>
22
23 <section>
24 <h2>What is the Tri-Hard Pattern?</h2>
25 <p>
26 Modern web development requires splitting simple tasks across
27 <color name="error">3+ files</color>: HTML, CSS, JavaScript, build configs,
28 package.json, webpack, babel, etc.
29 </p>
30
31 <box>
32 <h3>Example: A Simple Error Message</h3>
33
34 <details>
35 <summary>The Old Way (1 file, 5 seconds, works everywhere)</summary>
36 <pre><code>&lt;font color="red"&gt;&lt;b&gt;ERROR:&lt;/b&gt; File not found&lt;/font&gt;</code></pre>
37 <p>
38 <color name="success">✓ Works immediately</color><br>
39 <color name="success">✓ No dependencies</color><br>
40 <color name="success">✓ Works in text browsers</color><br>
41 <color name="success">✓ View source is readable</color>
42 </p>
43 </details>
44
45 <details>
46 <summary>Tailwind (4+ files, 30 minutes setup, build process required)</summary>
47 <pre><code>&lt;div class="bg-red-50 border border-red-400 text-red-700 px-4 py-3 rounded"&gt;
48 &lt;strong class="font-bold"&gt;ERROR:&lt;/strong&gt; File not found
49&lt;/div&gt;</code></pre>
50 <p>
51 <color name="error">✗ Requires build process</color><br>
52 <color name="error">✗ Class soup (no semantic meaning)</color><br>
53 <color name="error">✗ Invisible in text browsers</color><br>
54 <color name="error">✗ 3 MB framework before purging</color>
55 </p>
56 </details>
57
58 <details>
59 <summary>TextFirst.css (1 file, 5 seconds, works everywhere)</summary>
60 <pre><code>&lt;color name="error"&gt;&lt;b&gt;ERROR:&lt;/b&gt; File not found&lt;/color&gt;</code></pre>
61 <p>
62 <color name="success">✓ Semantic HTML</color><br>
63 <color name="success">✓ Works in text browsers</color><br>
64 <color name="success">✓ Enhanced with CSS</color><br>
65 <color name="success">✓ 15 KB framework</color>
66 </p>
67 </details>
68 </box>
69 </section>
70
71 <section>
72 <h2>Component Showcase</h2>
73
74 <h3>1. Status Indicators</h3>
75 <p>Perfect for dashboards and system monitoring:</p>
76 <dl>
77 <dt>Web Server</dt>
78 <dd><status value="online">Online</status> - 99.9% uptime</dd>
79
80 <dt>Database</dt>
81 <dd><status value="online">Online</status> - All connections healthy</dd>
82
83 <dt>Cache Server</dt>
84 <dd><status value="degraded">Degraded</status> - Slow response times</dd>
85
86 <dt>Backup System</dt>
87 <dd><status value="offline">Offline</status> - Maintenance mode</dd>
88
89 <dt>CDN</dt>
90 <dd><status value="unknown">Unknown</status> - Checking status...</dd>
91 </dl>
92
93 <h3>2. Banners</h3>
94 <p>Important announcements with semantic types:</p>
95
96 <banner type="info">
97 <strong>Info:</strong> System maintenance scheduled for tonight at 10 PM EST. Expected downtime: 30 minutes.
98 </banner>
99
100 <banner type="warning">
101 <strong>Warning:</strong> Your session will expire in 5 minutes. Please save your work.
102 </banner>
103
104 <banner type="error">
105 <strong>Error:</strong> Connection to database lost. Attempting to reconnect...
106 </banner>
107
108 <banner type="success">
109 <strong>Success!</strong> Your changes have been saved successfully.
110 </banner>
111
112 <h3>3. Numbered Menus</h3>
113 <p>Perfect for keyboard navigation (like DBBasic TextBrowser!):</p>
114 <menu type="numbered">
115 <li><a href="#home">Home Dashboard</a></li>
116 <li><a href="#profile">User Profile</a></li>
117 <li><a href="#settings">Account Settings</a></li>
118 <li><a href="#docs">Documentation</a></li>
119 <li><a href="#support">Help & Support</a></li>
120 </menu>
121
122 <h3>4. Collapsible Sections</h3>
123 <p>Using native HTML <code>&lt;details&gt;</code> - no JavaScript!</p>
124
125 <details>
126 <summary>What is progressive enhancement?</summary>
127 <p>
128 Progressive enhancement is a design philosophy that provides a baseline
129 experience for all users, then enhances it for users with better browsers
130 or capabilities.
131 </p>
132 <p>
133 <color name="success">TextFirst.css embraces this!</color> Pages work in
134 text browsers first, then CSS makes them prettier.
135 </p>
136 </details>
137
138 <details>
139 <summary>View code example</summary>
140 <pre><code>function fetchPage(url) {
141 const response = await fetch(url);
142 const html = await response.text();
143 return parseHTML(html);
144}
145
146// Works in text browsers!
147// No framework needed!</code></pre>
148 </details>
149
150 <details>
151 <summary>Why avoid the Tri-Hard pattern?</summary>
152 <ul>
153 <li>Reduces complexity</li>
154 <li>Faster development</li>
155 <li>Easier debugging</li>
156 <li>Better accessibility</li>
157 <li>Works without build tools</li>
158 </ul>
159 </details>
160
161 <h3>5. Boxes</h3>
162 <p>Frame important content:</p>
163
164 <box>
165 <h4>Default Box</h4>
166 <p>This is a standard box with rounded corners and blue border.</p>
167 <p>Perfect for highlighting important information!</p>
168 </box>
169
170 <box style="double">
171 <h4>Important Notice</h4>
172 <p>This uses a double border (4px) for extra emphasis.</p>
173 <p><color name="warning">Use sparingly for critical information.</color></p>
174 </box>
175
176 <box style="rounded">
177 <h4>Soft Box</h4>
178 <p>This box has extra rounded corners for a softer look.</p>
179 </box>
180
181 <box style="bold">
182 <h4>Bold Box</h4>
183 <p>This box has a bold border with shadow for maximum visibility.</p>
184 </box>
185
186 <h3>6. Semantic Colors</h3>
187 <p>Colors with meaning, not just decoration:</p>
188 <p>
189 <color name="error">Critical error message</color> •
190 <color name="success">Success confirmation</color> •
191 <color name="warning">Warning about potential issues</color> •
192 <color name="info">Informational message</color> •
193 <color name="muted">Less important secondary text</color> •
194 <color name="highlight">Highlighted important text</color>
195 </p>
196
197 <h3>7. Traditional Tags Enhanced</h3>
198 <p>Old HTML tags that work everywhere, enhanced with CSS:</p>
199
200 <center>
201 <font color="magenta"><b>🎉 Centered and Colored! 🎉</b></font>
202 </center>
203
204 <p>Colors using <code>&lt;font color&gt;</code>:</p>
205 <p>
206 <font color="red">Red</font> •
207 <font color="green">Green</font> •
208 <font color="blue">Blue</font> •
209 <font color="yellow">Yellow</font> •
210 <font color="cyan">Cyan</font> •
211 <font color="magenta">Magenta</font>
212 </p>
213
214 <h3>8. Blockquotes</h3>
215 <blockquote>
216 The best programs are written so that computing machines can perform them
217 quickly and so that human beings can understand them clearly. A programmer
218 is ideally an essayist who works with traditional aesthetic and literary forms
219 as well as mathematical concepts, to communicate the way that an algorithm works
220 and to convince a reader that the results will be correct.
221 <footer>— Donald Knuth, <cite>Selected Papers on Computer Science</cite></footer>
222 </blockquote>
223
224 <h3>9. Keyboard and Sample Output</h3>
225 <p>Show keyboard shortcuts and command output:</p>
226 <p>Press <kbd>Ctrl</kbd> + <kbd>K</kbd> to open the command palette.</p>
227 <p>Press <kbd>H</kbd> for help.</p>
228
229 <p>Sample output:</p>
230 <samp>$ npm install textfirst-css
231✓ Package installed successfully
232✓ No build process required
233✓ Ready to use immediately!</samp>
234
235 <h3>10. Code Blocks</h3>
236 <p>Syntax-friendly code display:</p>
237 <pre><code>&lt;!DOCTYPE html&gt;
238&lt;html&gt;
239&lt;head&gt;
240 &lt;title&gt;My Page&lt;/title&gt;
241 &lt;link rel="stylesheet" href="textfirst.css"&gt;
242&lt;/head&gt;
243&lt;body&gt;
244 &lt;banner type="success"&gt;
245 It just works!
246 &lt;/banner&gt;
247&lt;/body&gt;
248&lt;/html&gt;</code></pre>
249
250 <p>Inline code: <code>const x = 42;</code></p>
251 </section>
252
253 <section>
254 <h2>Comparison Table</h2>
255 <p>How does TextFirst.css compare to modern frameworks?</p>
256
257 <table simple>
258 <thead>
259 <tr>
260 <th>Feature</th>
261 <th>TextFirst.css</th>
262 <th>Tailwind</th>
263 <th>Bootstrap</th>
264 </tr>
265 </thead>
266 <tbody>
267 <tr>
268 <td>File Size</td>
269 <td><color name="success">15 KB</color></td>
270 <td><color name="error">3 MB</color> (before purge)</td>
271 <td><color name="warning">200 KB</color></td>
272 </tr>
273 <tr>
274 <td>Build Process</td>
275 <td><color name="success">None</color></td>
276 <td><color name="error">Required</color></td>
277 <td><color name="success">Optional</color></td>
278 </tr>
279 <tr>
280 <td>Works in Text Browsers</td>
281 <td><color name="success">Yes</color></td>
282 <td><color name="error">No</color></td>
283 <td><color name="error">No</color></td>
284 </tr>
285 <tr>
286 <td>Semantic HTML</td>
287 <td><color name="success">Required</color></td>
288 <td><color name="error">Discouraged</color></td>
289 <td><color name="warning">Optional</color></td>
290 </tr>
291 <tr>
292 <td>Learning Curve</td>
293 <td><color name="success">Just HTML</color></td>
294 <td><color name="error">High</color></td>
295 <td><color name="warning">Medium</color></td>
296 </tr>
297 <tr>
298 <td>Dependencies</td>
299 <td><color name="success">Zero</color></td>
300 <td><color name="error">PostCSS, Node</color></td>
301 <td><color name="success">Zero</color></td>
302 </tr>
303 <tr>
304 <td>View Source Readability</td>
305 <td><color name="success">High</color></td>
306 <td><color name="error">Low</color></td>
307 <td><color name="warning">Medium</color></td>
308 </tr>
309 </tbody>
310 </table>
311 </section>
312
313 <section>
314 <h2>Forms Example</h2>
315 <p>Enhanced form controls with zero JavaScript:</p>
316
317 <form>
318 <fieldset>
319 <legend>Contact Information</legend>
320
321 <label for="name">Name</label>
322 <input type="text" id="name" name="name" placeholder="John Doe">
323
324 <label for="email">Email</label>
325 <input type="email" id="email" name="email" placeholder="john@example.com">
326
327 <label for="message">Message</label>
328 <textarea id="message" name="message" rows="5" placeholder="Your message here..."></textarea>
329
330 <label for="priority">Priority</label>
331 <select id="priority" name="priority">
332 <option>Low</option>
333 <option selected>Medium</option>
334 <option>High</option>
335 </select>
336
337 <label>
338 <input type="checkbox" name="newsletter">
339 Subscribe to newsletter
340 </label>
341
342 <button type="submit">Send Message</button>
343 </fieldset>
344 </form>
345 </section>
346
347 <section>
348 <h2>Why TextFirst.css?</h2>
349
350 <aside>
351 <h3>💡 Core Philosophy</h3>
352 <p>
353 TextFirst.css is built on the principle that <color name="highlight">HTML should work standalone</color>.
354 CSS should enhance, not define. JavaScript should be optional for static content.
355 </p>
356 <p>
357 This is <strong>progressive enhancement</strong> done right.
358 </p>
359 </aside>
360
361 <h3>Benefits</h3>
362 <ul>
363 <li><strong>Accessible by default</strong> - Works in text browsers, screen readers, and curl</li>
364 <li><strong>Fast</strong> - Small file size, no build process, instant loading</li>
365 <li><strong>Maintainable</strong> - Semantic HTML is self-documenting</li>
366 <li><strong>Future-proof</strong> - Relies on stable HTML standards, not framework trends</li>
367 <li><strong>Developer-friendly</strong> - View source makes sense, easy to debug</li>
368 </ul>
369
370 <h3>Who is this for?</h3>
371 <dl>
372 <dt>Terminal Users</dt>
373 <dd>SSH sessions, tmux, remote access - full styling in text mode</dd>
374
375 <dt>Minimalists</dt>
376 <dd>People who want fast, simple websites without bloat</dd>
377
378 <dt>Accessibility Advocates</dt>
379 <dd>Screen readers, low vision, keyboard-only navigation</dd>
380
381 <dt>Educators</dt>
382 <dd>Teaching web development without overwhelming students</dd>
383
384 <dt>Static Site Generators</dt>
385 <dd>Hugo, Jekyll, 11ty - no build step needed</dd>
386
387 <dt>Documentation Sites</dt>
388 <dd>Technical docs that should work everywhere</dd>
389 </dl>
390 </section>
391
392 <section>
393 <h2>Getting Started</h2>
394
395 <box style="bold">
396 <h3>Installation</h3>
397 <p>Just one line in your HTML:</p>
398 <pre><code>&lt;link rel="stylesheet" href="textfirst.css"&gt;</code></pre>
399 <p>That's it! No package.json, no webpack, no babel, no build process.</p>
400 <p><color name="success">It just works.</color></p>
401 </box>
402
403 <h3>Basic Usage</h3>
404 <p>Write semantic HTML like it's 1997, but better:</p>
405 <pre><code>&lt;banner type="info"&gt;
406 Welcome to my site!
407&lt;/banner&gt;
408
409&lt;menu type="numbered"&gt;
410 &lt;li&gt;&lt;a href="/home"&gt;Home&lt;/a&gt;&lt;/li&gt;
411 &lt;li&gt;&lt;a href="/about"&gt;About&lt;/a&gt;&lt;/li&gt;
412&lt;/menu&gt;
413
414&lt;article&gt;
415 &lt;h1&gt;My Article&lt;/h1&gt;
416 &lt;p&gt;
417 This is &lt;color name="success"&gt;good content&lt;/color&gt;
418 that works everywhere.
419 &lt;/p&gt;
420&lt;/article&gt;</code></pre>
421 </section>
422
423 <footer>
424 <hr>
425 <center>
426 <p><color name="muted">TextFirst.css - Bringing Back Semantic HTML</color></p>
427 <p><color name="muted">Version 0.1.0 • MIT License • 2025</color></p>
428 <p>
429 <a href="https://github.com/yourusername/textfirst-css">GitHub</a> •
430 <a href="../TEXT-WEB-HTML.md">Documentation</a> •
431 <a href="../SEMANTIC-CSS-FRAMEWORK.md">Philosophy</a>
432 </p>
433 </center>
434 </footer>
435</article>
436
437</body>
438</html>