diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-14 16:21:57 +0100 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-14 16:21:57 +0100 |
| commit | fe7254f7a7b7c8b95824f2d6ce2ee56709ba019d (patch) | |
| tree | 325d04c74c54d1b90b483a96be8c6b689f34137c /luax/pages/blog.luax | |
| parent | 6b068ccd9156de8515203d0000c3a2a8ecb9c5fb (diff) | |
luax: stuff
Diffstat (limited to 'luax/pages/blog.luax')
| -rw-r--r-- | luax/pages/blog.luax | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/luax/pages/blog.luax b/luax/pages/blog.luax new file mode 100644 index 0000000..26f9fc0 --- /dev/null +++ b/luax/pages/blog.luax @@ -0,0 +1,28 @@ +local blogposts = require('blog.posts') + +return function() + local blogpost_html = {} + for _, post in ipairs(blogposts) do + blogpost_html[#blogpost_html + 1] = + <div class="blog-post"> + <div class="blog-post-title"> + {$ post.title $} + </div> + <div class="blog-post-date"> + {$ os.date('%Y-%m-%d', post.date) $} + </div> + <div class="blog-post-description"> + {$ post.description $} + </div> + </div> + end + return + <div class="main-info"> + <div class="main-info-title"> + Blog + </div> + <div class="blog-posts"> + {$ blogpost_html $} + </div> + </div> +end |
