summaryrefslogtreecommitdiff
path: root/.zs/components/wavy
diff options
context:
space:
mode:
Diffstat (limited to '.zs/components/wavy')
-rwxr-xr-x.zs/components/wavy23
1 files changed, 20 insertions, 3 deletions
diff --git a/.zs/components/wavy b/.zs/components/wavy
index 645442e..20c4a70 100755
--- a/.zs/components/wavy
+++ b/.zs/components/wavy
@@ -14,13 +14,30 @@ local TEXT = {
local acc = {}
local i = 0
-for char in TEXT[name or "hey"]:gmatch(".") do
- table.insert(acc, {
+for word in TEXT[name or "hey"]:gmatch("[^ ]+") do
+ local word_acc = {}
+
+ for char in word:gmatch(".") do
+ table.insert(word_acc, {
+ tag = "span",
+ style = "animation-delay:" .. (-800 * i) .. "ms",
+ char
+ })
+ i = i + 1
+ end
+
+ table.insert(word_acc, {
tag = "span",
style = "animation-delay:" .. (-800 * i) .. "ms",
- char
+ " "
})
+
i = i + 1
+
+ table.insert(acc, {
+ tag = "div",
+ word_acc
+ })
end
print(html {