blob: 793f946382eaa471e98f9fdffb95558c042502d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/- boke, tp=trill-post, cnt=contact
/+ kaji, fetch-lib=fetch, plib=trill-utils, const=constants, sr=sortug, lib=boke, ui=trill-ui
/= index /web/index
/= main /web/calendar/main
/= notes /web/calendar/notes
/= todo /web/calendar/todo
/= cal /web/calendar/cal/month
|_ [rl=req-line:kaji s=state:boke =bowl:gall]
+* fetch ~(. fetch-lib [s bowl])
++ eyre-bail (error-response:kaji 404)
++ manx-bail (error-page:kaji 404)
::
++ $ ^- eyre-res:kaji
~& >> routing-cal=rl
=/ p pat.rl ::?. mob.rl pat.rl [%m pat.rl]
?+ p eyre-bail
~ root
[%f rest=*] :- %html (fragment rest.p)
==
++ root
:- %page (main s bowl)
++ fragment
|= p=(pole knot)
=/ st s
?+ p manx-bail
[%notes ~] (notes note-list bowl)
[%todo ~] (todo st bowl)
[%cal ~] (~(html cal bowl) now.bowl)
::
[%note uid=@t ~] (note uid.p)
[%todo uid=@t ~] manx-bail
[%cal %day uid=@t ~] manx-bail
[%cal %week uid=@t ~] manx-bail
[%cal %month uid=@t ~] manx-bail
[%cal %event uid=@t ~] manx-bail
==
++ note |= uid=@t ^- manx
=/ upid (dec:kaji uid pid:tp)
?~ upid manx-bail
=/ =post:tp (make-note 'rofl')
(note:notes post)
++ note-list ^- (list post:tp)
%+ turn ~['Note 1' 'Lol' 'Hoon' 'Blog ideas' 'lmao']
make-note
++ make-note
|= t=@t ^- post:tp
=/ tokens (tokenize:ui t)
=/ tags (silt ~[t 'note'])
=/ p (build-post:lib tokens tags [our.bowl now.bowl])
p(title t)
+$ task
$: title=@t
desc=paragraph:tp
priority=@ud
status=$?(%todo %wip %done)
created=@da
due=((mop @da @da) gth)
creator=@p
subtasks=$~(~ (list task))
workers=(map @p @t) :: who's doing what
tags=(set @t)
==
--
|