Skip to content

Commit f62e550

Browse files
add %tahuti-ui agent to serve front-end
more basic setup
1 parent be0f45e commit f62e550

11 files changed

+699
-51
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Maat
22

3-
Todo app for [Urbit](https://urbit.org/).
3+
A Todo app for [Urbit](https://urbit.org/).
44

55
Install from `~talfus-laddus/maat`.
66

esbuild.mjs

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ let ctx = await esbuild.context({
55
"./ui/html/index.html",
66
"./ui/css/udjat.css",
77
"./ui/css/style.css",
8-
"./ui/css/soria.ttf",
8+
"./ui/css/soria.woff2",
9+
"./ui/svg/circle-checked.svg",
10+
"./ui/svg/circle-plus.svg",
11+
"./ui/svg/circle-question.svg",
12+
"./ui/svg/circle.svg",
913
"./ui/svg/circles.svg",
14+
"./ui/svg/icon.svg",
1015
"./ui/js/index.js",
1116
"./node_modules/htmx.org/dist/ext/path-deps.js",
1217
"./node_modules/htmx.org/dist/ext/json-enc.js",
1318
"./node_modules/htmx.org/dist/ext/client-side-templates.js",
1419
],
15-
external: ['*.ttf'],
20+
external: ['*.svg', '*.woff2'],
1621
entryNames: "[ext]/[name]", // will name the result files by their folder names
1722
bundle: true,
18-
loader: { ".json": "copy", ".html": "copy", ".svg": "copy", ".png": "copy", ".ttf": "copy"},
23+
loader: { ".json": "copy", ".html": "copy", ".svg": "copy", ".png": "copy", ".woff2": "copy"},
1924
outdir: "maat/app/ui",
2025
});
2126

maat/app/maat-ui.hoon

+25-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
/- *maat
1+
:: /- *maat
22
/+ dbug
33
/+ verb
44
/+ default-agent
55
/+ server :: HTTP request processing
66
/+ schooner :: HTTP response handling
77
::
8-
/* html-index %html /app/ui/html/index/html
9-
/* css-udjat %css /app/ui/css/udjat/css
10-
/* css-style %css /app/ui/css/style/css
11-
/* svg-circles %svg /app/ui/svg/circles/svg
12-
/* svg-icon %svg /app/ui/svg/icon/svg
13-
/* ttf-soria %ttf /app/ui/ttf/soria/ttf
14-
/* js-index %js /app/ui/js/index/js
15-
/* js-json-enc %js /app/ui/js/json-enc/js
16-
/* js-path-deps %js /app/ui/js/path-deps/js
17-
/* js-client-side-templates %js /app/ui/js/client-side-templates/js
8+
/* html-index %html /app/ui/html/index/html
9+
/* css-udjat %css /app/ui/css/udjat/css
10+
/* css-style %css /app/ui/css/style/css
11+
/* svg-circles %svg /app/ui/svg/circles/svg
12+
/* svg-circle %svg /app/ui/svg/circle/svg
13+
/* svg-circle-checked %svg /app/ui/svg/circle-checked/svg
14+
/* svg-circle-question %svg /app/ui/svg/circle-question/svg
15+
/* svg-circle-plus %svg /app/ui/svg/circle-plus/svg
16+
/* svg-icon %svg /app/ui/svg/icon/svg
17+
/* woff2-soria %woff2 /app/ui/woff2/soria/woff2
18+
/* js-index %js /app/ui/js/index/js
19+
/* js-json-enc %js /app/ui/js/json-enc/js
20+
/* js-path-deps %js /app/ui/js/path-deps/js
21+
/* js-client-side-templates %js /app/ui/js/client-side-templates/js
1822
::
1923
|%
2024
+$ card card:agent:gall
@@ -106,12 +110,20 @@
106110
::
107111
[%apps %maat %circles ~]
108112
[(send [200 ~ [%svg svg-circles]]) state]
113+
[%apps %maat %circle ~]
114+
[(send [200 ~ [%svg svg-circle]]) state]
115+
[%apps %maat %circle-checked ~]
116+
[(send [200 ~ [%svg svg-circle-checked]]) state]
117+
[%apps %maat %circle-plus ~]
118+
[(send [200 ~ [%svg svg-circle-plus]]) state]
119+
[%apps %maat %circle-question ~]
120+
[(send [200 ~ [%svg svg-circle-question]]) state]
109121
[%apps %maat %icon ~]
110122
[(send [200 ~ [%svg svg-icon]]) state]
111-
:: ttf
123+
:: woff2
112124
::
113125
[%apps %maat %soria ~]
114-
[(send [200 ~ [%font-ttf q.ttf-soria]]) state]
126+
[(send [200 ~ [%font-woff2 q.woff2-soria]]) state]
115127
:: js
116128
::
117129
[%apps %maat %index ~]

maat/lib/schooner.hoon

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
[%plain p=tape]
2626
[%png p=@]
2727
[%svg p=@]
28-
[%font-ttf p=@]
28+
[%font-woff2 p=@]
2929
::
3030
[%login-redirect l=cord]
3131
[%hx-login-redirect l=cord]
@@ -80,10 +80,10 @@
8080
:- http-status
8181
(weld headers ['content-type'^'image/svg+xml']~)
8282
::
83-
%font-ttf
83+
%font-woff2
8484
:_ `(as-octs:mimes:html p.resource)
8585
:- http-status
86-
(weld headers ['content-type'^'font/ttf']~)
86+
(weld headers ['content-type'^'fonts/woff2']~)
8787
::
8888
%login-redirect
8989
=+ %^ cat 3

maat/sur/maat.hoon

+18-18
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
::
1818
:: tag
1919
::
20-
+$ tag @tas
21-
+$ tags (list tags)
20+
+$ tag @tas
21+
+$ tags (set tag)
2222
::
2323
:: task
2424
::
25-
+$ tid @tas
26-
+$ title @t
27-
+$ desc @tas
28-
+$ date @da
29-
+$ done ?
25+
+$ tid @tas
26+
+$ title @t
27+
+$ desc @t
28+
+$ date @da
29+
+$ done ?
3030
+$ task
3131
$:
3232
=tid
@@ -36,13 +36,13 @@
3636
=done
3737
=tags
3838
==
39-
+$ tasks (map tid task)
39+
+$ tasks (map tid task)
4040
::
4141
:: list
4242
::
43-
+$ lid @tas
44-
+$ host @p
45-
+$ public ?
43+
+$ lid @tas
44+
+$ host @p
45+
+$ public ?
4646
+$ list
4747
$:
4848
=lid
@@ -51,18 +51,18 @@
5151
=public
5252
=tasks
5353
==
54-
+$ lists (map lid list)
54+
+$ lists (map lid list)
5555
::
5656
:: register of members (reg)
5757
:: access-control list (acl)
5858
::
59-
+$ member @tas
60-
+$ reg (set member)
61-
+$ acl (set @p)
62-
+$ regs (map lid reg)
63-
+$ acls (map lid acl)
59+
+$ member @tas
60+
+$ reg (set member)
61+
+$ acl (set @p)
62+
+$ regs (map lid reg)
63+
+$ acls (map lid acl)
6464
::
6565
:: invites
6666
::
67-
+$ invites (map lid host)
67+
+$ invites (set [lid host])
6868
--

0 commit comments

Comments
 (0)