aboutsummaryrefslogtreecommitdiff
path: root/pages/blogpost.luax
blob: e7d7b86407c08fcae23199da67bfa4cb38933ff6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local blog_cache = require('blog.cache')

return function(props)
  local post = props.attrs.post
  local content = blog_cache(post)
  return
  <div>
    <div class="post">
      <div class="main-info">
        <div class="main-info-title">
            {$ post.title $}
        </div>
        <div class="post-date">
            {$ os.date('%Y-%m-%d', post.date) $}
        </div>
        <div class="post-description">
            {$ post.description $}
        </div>
        <div class="post-content">{$ content $}</div>
      </div>
    </div>
  </div>
end