diff options
| author | Vasco <[email protected]> | 2026-08-24 17:47:30 +0100 |
|---|---|---|
| committer | Vasco <[email protected]> | 2026-08-24 17:50:52 +0100 |
| commit | cc3429220b19df8c5ca6abf28a02cd38d08de32d (patch) | |
| tree | dd6fe3911535cc75570e5fe34ff84c758028aa81 /Cool/README.md | |
| parent | ad5248a3e1bafc1b7dec4c8af82d56ed324ef314 (diff) | |
Cool 0.0.0. Rend 1.0.4.
Diffstat (limited to 'Cool/README.md')
| -rw-r--r-- | Cool/README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Cool/README.md b/Cool/README.md new file mode 100644 index 0000000..3c9f770 --- /dev/null +++ b/Cool/README.md @@ -0,0 +1,44 @@ +# Cool + +Build server-side components with C! Use the single-header library as a standalone HTML formatter +or use the transpiler to convert `.cool` files into `.c` files that you can include directly! + +## Example + +Write something like so: + +```code +COOL void Api(char *name, char *func, char *desc) { + <div class="api-card"> + <h3 class="api-name">{ name }</h3> + <code class="language-c">{ func } </code> + <div class="api-description"> + { desc } + </div> + </div> +} +``` + +Call `compiler.py` to get `view.cool.c` and include it into your code. + +```c +#include "views.cool.c" // include server side components directly + +int main() { + char func_name[256]; + char func_decl[256]; + char *comment_text = NULL; + /* ... */ + /* call you view directly! */ + if (feel_like_it) { + Api(func_name, func_decl, comment_text); + } + return 0; +} + +``` + +## Contributing + +This is one of the few open source projects where I'm very open to contribution. +Web is not my area of expertise. And this idea deserves fome fleshing out. |
