diff options
Diffstat (limited to '.zs/components/wavy')
| -rwxr-xr-x | .zs/components/wavy | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.zs/components/wavy b/.zs/components/wavy new file mode 100755 index 0000000..645442e --- /dev/null +++ b/.zs/components/wavy @@ -0,0 +1,30 @@ +#!/usr/bin/lua + +package.path = ".zs/?.lua;" .. package.path +local html = require "components.html" + +-- select what message to use +local name = arg[1] + +local TEXT = { + hey = "hey there!", + ["404"] = "alas, there is nothing to be found here" +} + +local acc = {} + +local i = 0 +for char in TEXT[name or "hey"]:gmatch(".") do + table.insert(acc, { + tag = "span", + style = "animation-delay:" .. (-800 * i) .. "ms", + char + }) + i = i + 1 +end + +print(html { + tag = "div", + class = "wavy", + acc +}) |
