kocotian.pl

My personal webpage sources
git clone git://git.kocotian.pl/kocotian.pl.git
Log | Files | Refs | README | LICENSE

commit ea5f587f6ed4bbf40535603327c00a8c5c0dd5ea
parent a22b4e623521d20c903fb5aac4dd655955e32182
Author: kocotian <kocotian@kocotian.pl>
Date:   Thu, 25 Mar 2021 13:55:20 +0100

Gitignore changes, examples, templates and simple index

Diffstat:
M.gitignore | 2--
Aexamples/processes.stac | 1+
Aexamples/simple_git_generator.stac | 4++++
Ain/index.stac | 19+++++++++++++++++++
Atemplates/basic.stac | 13+++++++++++++
5 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,6 +1,4 @@ compile -in/* -templates/* meta out *.o diff --git a/examples/processes.stac b/examples/processes.stac @@ -0,0 +1 @@ +<pre>% system("ps -xj"); %</pre> diff --git a/examples/simple_git_generator.stac b/examples/simple_git_generator.stac @@ -0,0 +1,4 @@ +@title = Repository log + +<h1>Log of repository % system("pwd"); %</h1> +<pre>% system("git log"); %</pre> diff --git a/in/index.stac b/in/index.stac @@ -0,0 +1,19 @@ +<p> + <!--% /* %--> + If you can see this text, something probably went wrong. + <!--% */ + char *msg = + "\x2d\x2d>\n" + "\t<h1>Everything works!</h1>\n" + "\tIf you can see this text, everything works perfectly.\n" + "\tNow you can create new files in <code>\x25s/in</code>.\n" + "\tIf you want some help, visit <a href=\"" + "https://nanohard.xyz/stac" + "\">this</a> page.\n" + "\t<!\x2d\x2d"; + char cwd[4096], out[(sizeof msg / sizeof *msg) + 4097]; + if (getcwd(cwd, 4096) == NULL) + strcpy(cwd, "(directory with stacinhtml here)"); + write(fd, out, sprintf(out, msg, cwd)); + %--> +</p> diff --git a/templates/basic.stac b/templates/basic.stac @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8" /> + <title>%$$(title)%</title> + </head> + <body> + +@<### +<p>Generated by <a href="https://git.kocotian.pl/stacinhtml">stac</a></p> + + </body> +</html>