askrobots / dbbasic-textbrowser
Public
A text-mode web browser with AI help, inspired by Lynx, plus TextFirst.css for text-first websites.
demo.html · 8.9 KB · 190 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>Color Demo - DBBasic TextBrowser</title> |
| 7 | </head> |
| 8 | <body> |
| 9 | <h1>DBBasic TextBrowser Color Demo</h1> |
| 10 | <p>This page demonstrates HTML font colors in a text browser!</p> |
| 11 | |
| 12 | <hr> |
| 13 | |
| 14 | <h2>What You're Seeing</h2> |
| 15 | <p>The <font color="red"><font color></font> tag was part of HTML since 1997, but <font color="blue">text browsers never rendered it</font>. Until now!</p> |
| 16 | |
| 17 | <p><font color="green">DBBasic TextBrowser bridges the gap</font> between <font color="yellow">HTML colors</font> and <font color="cyan">terminal colors</font>, creating what could have been: <font color="magenta">a colorful BBS-style web</font>.</p> |
| 18 | |
| 19 | <hr> |
| 20 | |
| 21 | <h2>Standard HTML Color Names</h2> |
| 22 | |
| 23 | <h3>Basic Colors</h3> |
| 24 | <p><font color="red">Red</font> - Errors, warnings, important notices</p> |
| 25 | <p><font color="green">Green</font> - Success, confirmation, positive actions</p> |
| 26 | <p><font color="blue">Blue</font> - Information, links, neutral content</p> |
| 27 | <p><font color="yellow">Yellow</font> - Caution, highlights, attention</p> |
| 28 | <p><font color="cyan">Cyan</font> - Secondary information, metadata</p> |
| 29 | <p><font color="magenta">Magenta</font> - Special content, emphasis</p> |
| 30 | <p><font color="white">White</font> - Default text, primary content</p> |
| 31 | <p><font color="black">Black</font> - (May not be visible on dark backgrounds)</p> |
| 32 | |
| 33 | <h3>Extended Colors</h3> |
| 34 | <p><font color="orange">Orange</font> - Warnings (maps to yellow/red)</p> |
| 35 | <p><font color="purple">Purple</font> - Special content (maps to magenta)</p> |
| 36 | <p><font color="pink">Pink</font> - Highlight (maps to magenta)</p> |
| 37 | <p><font color="brown">Brown</font> - Neutral (maps to yellow)</p> |
| 38 | <p><font color="gray">Gray</font> - Muted content (maps to white/black)</p> |
| 39 | <p><font color="grey">Grey</font> - British spelling also works!</p> |
| 40 | |
| 41 | <hr> |
| 42 | |
| 43 | <h2>Practical Examples</h2> |
| 44 | |
| 45 | <h3>System Messages</h3> |
| 46 | <p><font color="green">✓ SUCCESS:</font> Your changes have been saved.</p> |
| 47 | <p><font color="red">✗ ERROR:</font> Unable to connect to server.</p> |
| 48 | <p><font color="yellow">⚠ WARNING:</font> This action cannot be undone.</p> |
| 49 | <p><font color="blue">ℹ INFO:</font> You have 3 unread messages.</p> |
| 50 | |
| 51 | <h3>Code Syntax</h3> |
| 52 | <p><font color="magenta">function</font> <font color="cyan">calculateTotal</font>() {</p> |
| 53 | <p> <font color="magenta">return</font> <font color="yellow">price</font> * <font color="cyan">quantity</font>;</p> |
| 54 | <p>}</p> |
| 55 | |
| 56 | <h3>Status Indicators</h3> |
| 57 | <p>Server Status: <font color="green">● ONLINE</font></p> |
| 58 | <p>Database Status: <font color="green">● ONLINE</font></p> |
| 59 | <p>Cache Status: <font color="yellow">● DEGRADED</font></p> |
| 60 | <p>Backup Status: <font color="red">● OFFLINE</font></p> |
| 61 | |
| 62 | <h3>Log Output</h3> |
| 63 | <p><font color="cyan">[2025-01-28 14:32:01]</font> <font color="green">INFO</font> Server started on port 8080</p> |
| 64 | <p><font color="cyan">[2025-01-28 14:32:15]</font> <font color="blue">DEBUG</font> Processing request from 192.168.1.1</p> |
| 65 | <p><font color="cyan">[2025-01-28 14:32:16]</font> <font color="yellow">WARN</font> Slow query detected (2.3s)</p> |
| 66 | <p><font color="cyan">[2025-01-28 14:32:20]</font> <font color="red">ERROR</font> Connection timeout</p> |
| 67 | |
| 68 | <h3>File Listings</h3> |
| 69 | <p><font color="blue">documents/</font> - Directory</p> |
| 70 | <p><font color="green">script.sh*</font> - Executable</p> |
| 71 | <p><font color="white">readme.txt</font> - Text file</p> |
| 72 | <p><font color="cyan">config.json</font> - Config file</p> |
| 73 | <p><font color="red">secret.key</font> - Important file</p> |
| 74 | |
| 75 | <h3>Progress Indicators</h3> |
| 76 | <p>Download: <font color="green">████████████████████</font> 100%</p> |
| 77 | <p>Upload: <font color="yellow">███████████░░░░░░░░░</font> 55%</p> |
| 78 | <p>Install: <font color="red">███░░░░░░░░░░░░░░░░░</font> 15%</p> |
| 79 | |
| 80 | <hr> |
| 81 | |
| 82 | <h2>The BBS-Style Web That Could Have Been</h2> |
| 83 | |
| 84 | <p>In the 1980s and 90s, <font color="cyan">BBS systems</font> used <font color="yellow">ANSI color codes</font> to create <font color="green">vibrant, colorful text interfaces</font>.</p> |
| 85 | |
| 86 | <p>In 1997, HTML added the <font color="magenta"><font color></font> tag.</p> |
| 87 | |
| 88 | <p><font color="red">But text browsers like Lynx never implemented it.</font></p> |
| 89 | |
| 90 | <p><font color="green">Why not?</font> They had all the technology:</p> |
| 91 | <ul> |
| 92 | <li><font color="cyan">Terminals supported 8-16 colors</font> (ANSI codes)</li> |
| 93 | <li><font color="yellow">HTML defined standard color names</font></li> |
| 94 | <li><font color="magenta">Browsers could parse the tags</font></li> |
| 95 | </ul> |
| 96 | |
| 97 | <p><font color="blue">The result:</font> The text web remained monochrome while BBSes were colorful.</p> |
| 98 | |
| 99 | <p><font color="green">Until now.</font> <font color="yellow">DBBasic TextBrowser</font> brings color to the text web.</p> |
| 100 | |
| 101 | <hr> |
| 102 | |
| 103 | <h2>Technical Details</h2> |
| 104 | |
| 105 | <h3>Color Mapping</h3> |
| 106 | <p>Terminal color palette (8 basic + bright variants):</p> |
| 107 | <ul> |
| 108 | <li><font color="black">0: Black</font></li> |
| 109 | <li><font color="red">1: Red</font></li> |
| 110 | <li><font color="green">2: Green</font></li> |
| 111 | <li><font color="yellow">3: Yellow</font></li> |
| 112 | <li><font color="blue">4: Blue</font></li> |
| 113 | <li><font color="magenta">5: Magenta</font></li> |
| 114 | <li><font color="cyan">6: Cyan</font></li> |
| 115 | <li><font color="white">7: White</font></li> |
| 116 | </ul> |
| 117 | |
| 118 | <h3>Why This Works</h3> |
| 119 | <ul> |
| 120 | <li><font color="green">No bandwidth overhead</font> - colors are text attributes</li> |
| 121 | <li><font color="cyan">Universal support</font> - works in any terminal</li> |
| 122 | <li><font color="yellow">Semantic meaning</font> - colors convey information</li> |
| 123 | <li><font color="magenta">Accessibility</font> - color + text = redundant encoding</li> |
| 124 | <li><font color="blue">Standards-based</font> - uses HTML 3.2 tags</li> |
| 125 | </ul> |
| 126 | |
| 127 | <hr> |
| 128 | |
| 129 | <h2>Rainbow Text Demo</h2> |
| 130 | <p> |
| 131 | <font color="red">C</font><font color="yellow">o</font><font color="green">l</font><font color="cyan">o</font><font color="blue">r</font><font color="magenta">f</font><font color="red">u</font><font color="yellow">l</font> |
| 132 | <font color="green">t</font><font color="cyan">e</font><font color="blue">x</font><font color="magenta">t</font> |
| 133 | <font color="red">i</font><font color="yellow">n</font> |
| 134 | <font color="green">a</font> |
| 135 | <font color="cyan">t</font><font color="blue">e</font><font color="magenta">r</font><font color="red">m</font><font color="yellow">i</font><font color="green">n</font><font color="cyan">a</font><font color="blue">l</font><font color="magenta">!</font> |
| 136 | </p> |
| 137 | |
| 138 | <hr> |
| 139 | |
| 140 | <h2>ASCII Art + Color</h2> |
| 141 | <pre> |
| 142 | <font color="yellow"> ___</font> |
| 143 | <font color="yellow"> / \</font> |
| 144 | <font color="yellow"> | O O |</font> <font color="cyan">DBBasic TextBrowser</font> |
| 145 | <font color="yellow"> \___/</font> <font color="green">Bringing color to the text web</font> |
| 146 | <font color="yellow"> | |</font> |
| 147 | <font color="yellow"> / \</font> |
| 148 | </pre> |
| 149 | |
| 150 | <hr> |
| 151 | |
| 152 | <h2>Compare With Modern Web</h2> |
| 153 | |
| 154 | <h3>Modern Web (CSS):</h3> |
| 155 | <p><code><span class="text-red-500 font-bold bg-gray-100 px-4 py-2 rounded-lg">Error</span></code></p> |
| 156 | <ul> |
| 157 | <li>Requires CSS framework (Tailwind)</li> |
| 158 | <li>50+ KB CSS file</li> |
| 159 | <li>Doesn't work in text browsers</li> |
| 160 | <li>Breaks without JavaScript sometimes</li> |
| 161 | </ul> |
| 162 | |
| 163 | <h3>DBBasic TextBrowser (HTML font colors):</h3> |
| 164 | <p><code><font color="red">Error</font></code></p> |
| 165 | <ul> |
| 166 | <li><font color="green">No framework needed</font></li> |
| 167 | <li><font color="green">Zero CSS</font></li> |
| 168 | <li><font color="green">Works in text browsers</font></li> |
| 169 | <li><font color="green">Never breaks</font></li> |
| 170 | </ul> |
| 171 | |
| 172 | <hr> |
| 173 | |
| 174 | <h2>Future Possibilities</h2> |
| 175 | <p>What if the web had embraced terminal colors?</p> |
| 176 | <ul> |
| 177 | <li><font color="cyan">SSH web browsing</font> - Full color over slow connections</li> |
| 178 | <li><font color="yellow">BBS-style web apps</font> - Text interfaces with color</li> |
| 179 | <li><font color="green">Low-bandwidth rich content</font> - No images needed</li> |
| 180 | <li><font color="magenta">Terminal-native web</font> - curl + color = rich experience</li> |
| 181 | <li><font color="blue">Accessibility first</font> - Screen readers + semantic color</li> |
| 182 | </ul> |
| 183 | |
| 184 | <hr> |
| 185 | |
| 186 | <p><em><font color="cyan">Press Ctrl-K to go anywhere</font> | <font color="yellow">Press H for help</font> | <font color="green">Press Q to quit</font></em></p> |
| 187 | |
| 188 | <p><small><font color="magenta">DBBasic TextBrowser</font> - <font color="cyan">The colorful text web that should have existed</font></small></p> |
| 189 | </body> |
| 190 | </html> |