29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
var acc: lib.str.acc acc:init(1024)
for i = 0, posts.sz do
lib.render.tweet(co, posts(i).ptr, &acc)
posts(i):free()
end
posts:free()
var doc = data.view.docskel {
instance = co.srv.cfg.instance;
title = lib.str.plit'timeline';
body = acc:finalize();
class = lib.str.plit'timeline';
navlinks = co.navbar;
}
var hdrs = array(
lib.http.header { 'Content-Type', 'text/html; charset=UTF-8' }
)
doc:send(co.con,200,[lib.mem.ptr(lib.http.header)] {ct = 1, ptr = &hdrs[0]})
doc.body:free()
end
return render_timeline
|
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
var acc: lib.str.acc acc:init(1024)
for i = 0, posts.sz do
lib.render.tweet(co, posts(i).ptr, &acc)
posts(i):free()
end
posts:free()
var doc = [lib.srv.convo.page] {
title = lib.str.plit'timeline';
body = acc:finalize();
class = lib.str.plit'timeline';
cache = false;
}
co:stdpage(doc)
doc.body:free()
end
return render_timeline
|