#include "demo_guard.h"
void render_card(String url, String title, String desc)
{
<>
= title ?>
= desc ?>
>
}
RENDER(Request& context)
{
DValue p;
p.set(context.params);
bool allow_server_demos = test_demo_request_allowed(context);
<>
Basics
render_card("hello.uce", "Hello World", "Basic output and server time"); ?>
render_card("header.uce", "Headers", "HTTP response headers"); ?>
if(allow_server_demos) { render_card("working-dir.uce", "Working Directory", "Server paths and cwd"); } ?>
if(allow_server_demos) { render_card("error-reporting.uce", "Error Reporting", "Error handling and output"); } ?>
Data Types & Parsing
render_card("dvalue.uce", "DValue", "Dynamic hierarchical data tree"); ?>
render_card("json.uce", "JSON", "Parse and encode JSON data"); ?>
render_card("xml.uce", "XML", "Structural XML encode/decode with DValue"); ?>
render_card("yaml.uce", "YAML", "Concise config files with DValue"); ?>
render_card("preprocessor-comments.uce", "Preprocessor Comments", "Regression coverage for comment parsing in templates"); ?>
render_card("regex.uce", "Regular Expressions", "PCRE2 matching, captures, replacement, and splitting"); ?>
render_card("string.uce", "String", "String operations"); ?>
render_card("collections.uce", "Collection Helpers", "Map, filter, group, pick, and omit render data"); ?>
render_card("str_replace.uce", "String Replace", "Search and replace in strings"); ?>
render_card("utf8.uce", "UTF-8", "Unicode string handling"); ?>
render_card("random.uce", "RNG / Noise", "Random generation and noise"); ?>
render_card("parse_time.uce", "time_parse()", "Date and time parsing"); ?>
HTTP & Forms
render_card("post.uce", "Form POST", "URL-encoded form submission"); ?>
render_card("post-multipart.uce", "Multipart POST", "File upload and multipart forms"); ?>
render_card("uri.uce", "URI", "URI encoding and decoding"); ?>
render_card("cookie.uce", "Cookies", "Read and write browser cookies"); ?>
render_card("session.uce", "Session", "Server-side session state"); ?>
Storage & I/O
render_card("fileio.uce", "File I/O", "Read and write files"); ?>
if(allow_server_demos) { render_card("zip.uce", "ZIP", "Create, list, read, and extract ZIP archives"); } ?>
if(allow_server_demos) { render_card("file_append.uce", "File Append", "Append data to files"); } ?>
if(allow_server_demos) { render_card("shell.uce", "Shell", "Execute shell commands"); } ?>
if(allow_server_demos) { render_card("memcached.uce", "Memcached", "Memcached key-value store"); } ?>
if(allow_server_demos) { render_card("sqlite.uce", "SQLite", "Embedded SQLite database connector"); } ?>
if(allow_server_demos) { render_card("mysql.uce", "MySQL", "MySQL database connector"); } ?>
Advanced
render_card("call_file.uce", "unit_call()", "Dynamic file inclusion"); ?>
render_card("components.uce", "Components", "Reusable component system"); ?>
render_card("once-init.uce", "ONCE / INIT", "Unit lifecycle hooks for worker load and request entry"); ?>
render_card("markdown.uce", "Markdown", "Markdown parsing with components"); ?>
render_card("script.uce", "Script", "UCE script integration"); ?>
render_card("websockets.ws.uce", "WebSockets", "Real-time WebSocket chat"); ?>
render_card("unit-browser.uce", "Unit Browser", "units_list(), unit_info(), unit_compile()"); ?>
if(allow_server_demos) { render_card("task.uce", "Task", "Background task execution"); } ?>
if(allow_server_demos) { render_card("task_repeat.uce", "Task Repeat", "Recurring task scheduling"); } ?>
if(!allow_server_demos) { ?>