├── demo.gif
├── www
├── favicon.ico
├── apple-icon.png
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon-96x96.png
├── ms-icon-70x70.png
├── apple-icon-57x57.png
├── apple-icon-60x60.png
├── apple-icon-72x72.png
├── apple-icon-76x76.png
├── apple-touch-icon.png
├── images
│ ├── og-image.png
│ ├── blog
│ │ ├── image-1.jpg
│ │ ├── image-2.jpg
│ │ ├── image-3.jpg
│ │ ├── image-4.jpg
│ │ └── image-7.jpg
│ ├── feed
│ │ ├── image-1.jpg
│ │ └── image-2.jpg
│ ├── kanban
│ │ ├── task-1.jpg
│ │ ├── task-2.jpg
│ │ └── task-3.jpg
│ ├── products
│ │ ├── imac.png
│ │ ├── ipad.png
│ │ ├── watch.png
│ │ ├── iphone.png
│ │ ├── apple-imac-1.png
│ │ ├── apple-imac-2.png
│ │ └── apple-imac-3.png
│ ├── users
│ │ ├── jese-leos.png
│ │ ├── lana-byrd.png
│ │ ├── neil-sims.png
│ │ ├── bonnie-green.png
│ │ ├── helene-engels.png
│ │ ├── jese-leos-2x.png
│ │ ├── joseph-mcfall.png
│ │ ├── michael-gough.png
│ │ ├── robert-brown.png
│ │ ├── roberta-casas.png
│ │ ├── thomas-lean.png
│ │ ├── bonnie-green-2x.png
│ │ ├── leslie-livingston.png
│ │ └── roberta-casas-2x.png
│ ├── authentication
│ │ ├── login.jpg
│ │ ├── create-account.jpg
│ │ └── reset-password.jpg
│ └── flags
│ │ ├── bt.svg
│ │ ├── se.svg
│ │ ├── li.svg
│ │ ├── ua.svg
│ │ ├── id.svg
│ │ ├── mc.svg
│ │ ├── pl.svg
│ │ ├── be.svg
│ │ ├── gn.svg
│ │ ├── ml.svg
│ │ ├── ro.svg
│ │ ├── td.svg
│ │ ├── vn.svg
│ │ ├── so.svg
│ │ ├── ci.svg
│ │ ├── fr.svg
│ │ ├── ie.svg
│ │ ├── it.svg
│ │ ├── ng.svg
│ │ ├── pe.svg
│ │ ├── bd.svg
│ │ ├── pw.svg
│ │ ├── lv.svg
│ │ ├── am.svg
│ │ ├── bo.svg
│ │ ├── cz.svg
│ │ ├── fi.svg
│ │ ├── ga.svg
│ │ ├── lt.svg
│ │ ├── ax.svg
│ │ ├── is.svg
│ │ ├── at.svg
│ │ ├── ee.svg
│ │ ├── hu.svg
│ │ ├── lu.svg
│ │ ├── nl.svg
│ │ ├── sl.svg
│ │ ├── ye.svg
│ │ ├── bg.svg
│ │ ├── ru.svg
│ │ ├── bh.svg
│ │ ├── qa.svg
│ │ ├── gy.svg
│ │ ├── mg.svg
│ │ ├── bn.svg
│ │ ├── dk.svg
│ │ ├── tt.svg
│ │ ├── bw.svg
│ │ ├── gm.svg
│ │ ├── mu.svg
│ │ ├── cr.svg
│ │ ├── gr.svg
│ │ ├── th.svg
│ │ ├── ae.svg
│ │ ├── cg.svg
│ │ ├── no.svg
│ │ ├── sd.svg
│ │ ├── kw.svg
│ │ ├── ma.svg
│ │ ├── bf.svg
│ │ ├── tg.svg
│ │ ├── md.svg
│ │ ├── ch.svg
│ │ ├── tl.svg
│ │ ├── mv.svg
│ │ ├── jm.svg
│ │ ├── vc.svg
│ │ ├── sn.svg
│ │ ├── tz.svg
│ │ ├── cl.svg
│ │ ├── mm.svg
│ │ ├── dj.svg
│ │ ├── gw.svg
│ │ ├── jp.svg
│ │ ├── gh.svg
│ │ ├── tw.svg
│ │ ├── ar.svg
│ │ ├── la.svg
│ │ ├── cd.svg
│ │ ├── mw.svg
│ │ ├── mr.svg
│ │ ├── ne.svg
│ │ ├── lr.svg
│ │ ├── sr.svg
│ │ ├── bs.svg
│ │ ├── om.svg
│ │ ├── ca.svg
│ │ ├── tn.svg
│ │ ├── ni.svg
│ │ ├── za.svg
│ │ ├── jo.svg
│ │ ├── cu.svg
│ │ ├── tr.svg
│ │ ├── il.svg
│ │ ├── mz.svg
│ │ ├── bz.svg
│ │ ├── cv.svg
│ │ ├── cf.svg
│ │ ├── ad.svg
│ │ ├── kp.svg
│ │ ├── fm.svg
│ │ ├── sy.svg
│ │ ├── pa.svg
│ │ ├── na.svg
│ │ ├── pk.svg
│ │ ├── py.svg
│ │ ├── dz.svg
│ │ ├── cm.svg
│ │ ├── in.svg
│ │ ├── sc.svg
│ │ ├── gg.svg
│ │ ├── st.svg
│ │ ├── pt.svg
│ │ ├── ec.svg
│ │ ├── cn.svg
│ │ ├── by.svg
│ │ ├── et.svg
│ │ ├── to.svg
│ │ ├── gq.svg
│ │ ├── kh.svg
│ │ ├── ls.svg
│ │ ├── gb.svg
│ │ ├── kn.svg
│ │ ├── ws.svg
│ │ ├── sv.svg
│ │ ├── my.svg
│ │ ├── ge.svg
│ │ ├── kg.svg
│ │ ├── lc.svg
│ │ ├── ww.svg
│ │ ├── aw.svg
│ │ ├── csa.svg
│ │ ├── es.svg
│ │ ├── br.svg
│ │ ├── mn.svg
│ │ ├── sm.svg
│ │ ├── an.svg
│ │ ├── uy.svg
│ │ ├── si.svg
│ │ ├── rw.svg
│ │ ├── gt.svg
│ │ ├── ve.svg
│ │ ├── mx.svg
│ │ ├── af.svg
│ │ ├── lb.svg
│ │ ├── zw.svg
│ │ ├── hn.svg
│ │ ├── bi.svg
│ │ ├── km.svg
│ │ ├── mk.svg
│ │ ├── gi.svg
│ │ ├── pr.svg
│ │ ├── do.svg
│ │ ├── az.svg
│ │ ├── caf.svg
│ │ ├── tj.svg
│ │ ├── bj.svg
│ │ └── co.svg
├── ms-icon-144x144.png
├── ms-icon-150x150.png
├── ms-icon-310x310.png
├── mstile-150x150.png
├── android-icon-36x36.png
├── android-icon-48x48.png
├── android-icon-72x72.png
├── android-icon-96x96.png
├── apple-icon-114x114.png
├── apple-icon-120x120.png
├── apple-icon-144x144.png
├── apple-icon-152x152.png
├── apple-icon-180x180.png
├── android-icon-144x144.png
├── android-icon-192x192.png
├── android-chrome-192x192.png
├── android-chrome-512x512.png
├── apple-icon-precomposed.png
├── browserconfig.xml
├── site.webmanifest
└── manifest.json
├── .gitignore
├── src
├── Models
│ ├── User.roc
│ ├── Product.roc
│ └── Session.roc
├── Views
│ └── Layout.roc
├── Controllers
│ ├── Product.roc
│ └── User.roc
└── Sql
│ ├── Product.roc
│ └── User.roc
├── templates
├── stylesheet.html
├── layoutNormal.html
├── layoutSidebar.html
├── error401.html
├── error404.html
└── error500.html
├── flake.nix
├── README.md
└── LICENSE
/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/demo.gif
--------------------------------------------------------------------------------
/www/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/favicon.ico
--------------------------------------------------------------------------------
/www/apple-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon.png
--------------------------------------------------------------------------------
/www/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/favicon-16x16.png
--------------------------------------------------------------------------------
/www/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/favicon-32x32.png
--------------------------------------------------------------------------------
/www/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/favicon-96x96.png
--------------------------------------------------------------------------------
/www/ms-icon-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/ms-icon-70x70.png
--------------------------------------------------------------------------------
/www/apple-icon-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-57x57.png
--------------------------------------------------------------------------------
/www/apple-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-60x60.png
--------------------------------------------------------------------------------
/www/apple-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-72x72.png
--------------------------------------------------------------------------------
/www/apple-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-76x76.png
--------------------------------------------------------------------------------
/www/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-touch-icon.png
--------------------------------------------------------------------------------
/www/images/og-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/og-image.png
--------------------------------------------------------------------------------
/www/ms-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/ms-icon-144x144.png
--------------------------------------------------------------------------------
/www/ms-icon-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/ms-icon-150x150.png
--------------------------------------------------------------------------------
/www/ms-icon-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/ms-icon-310x310.png
--------------------------------------------------------------------------------
/www/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/mstile-150x150.png
--------------------------------------------------------------------------------
/www/android-icon-36x36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-icon-36x36.png
--------------------------------------------------------------------------------
/www/android-icon-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-icon-48x48.png
--------------------------------------------------------------------------------
/www/android-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-icon-72x72.png
--------------------------------------------------------------------------------
/www/android-icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-icon-96x96.png
--------------------------------------------------------------------------------
/www/apple-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-114x114.png
--------------------------------------------------------------------------------
/www/apple-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-120x120.png
--------------------------------------------------------------------------------
/www/apple-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-144x144.png
--------------------------------------------------------------------------------
/www/apple-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-152x152.png
--------------------------------------------------------------------------------
/www/apple-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-180x180.png
--------------------------------------------------------------------------------
/www/android-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-icon-144x144.png
--------------------------------------------------------------------------------
/www/android-icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-icon-192x192.png
--------------------------------------------------------------------------------
/www/images/blog/image-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/blog/image-1.jpg
--------------------------------------------------------------------------------
/www/images/blog/image-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/blog/image-2.jpg
--------------------------------------------------------------------------------
/www/images/blog/image-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/blog/image-3.jpg
--------------------------------------------------------------------------------
/www/images/blog/image-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/blog/image-4.jpg
--------------------------------------------------------------------------------
/www/images/blog/image-7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/blog/image-7.jpg
--------------------------------------------------------------------------------
/www/images/feed/image-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/feed/image-1.jpg
--------------------------------------------------------------------------------
/www/images/feed/image-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/feed/image-2.jpg
--------------------------------------------------------------------------------
/www/images/kanban/task-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/kanban/task-1.jpg
--------------------------------------------------------------------------------
/www/images/kanban/task-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/kanban/task-2.jpg
--------------------------------------------------------------------------------
/www/images/kanban/task-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/kanban/task-3.jpg
--------------------------------------------------------------------------------
/www/images/products/imac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/imac.png
--------------------------------------------------------------------------------
/www/images/products/ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/ipad.png
--------------------------------------------------------------------------------
/www/images/products/watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/watch.png
--------------------------------------------------------------------------------
/www/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-chrome-192x192.png
--------------------------------------------------------------------------------
/www/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/android-chrome-512x512.png
--------------------------------------------------------------------------------
/www/apple-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/apple-icon-precomposed.png
--------------------------------------------------------------------------------
/www/images/products/iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/iphone.png
--------------------------------------------------------------------------------
/www/images/users/jese-leos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/jese-leos.png
--------------------------------------------------------------------------------
/www/images/users/lana-byrd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/lana-byrd.png
--------------------------------------------------------------------------------
/www/images/users/neil-sims.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/neil-sims.png
--------------------------------------------------------------------------------
/www/images/users/bonnie-green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/bonnie-green.png
--------------------------------------------------------------------------------
/www/images/users/helene-engels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/helene-engels.png
--------------------------------------------------------------------------------
/www/images/users/jese-leos-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/jese-leos-2x.png
--------------------------------------------------------------------------------
/www/images/users/joseph-mcfall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/joseph-mcfall.png
--------------------------------------------------------------------------------
/www/images/users/michael-gough.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/michael-gough.png
--------------------------------------------------------------------------------
/www/images/users/robert-brown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/robert-brown.png
--------------------------------------------------------------------------------
/www/images/users/roberta-casas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/roberta-casas.png
--------------------------------------------------------------------------------
/www/images/users/thomas-lean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/thomas-lean.png
--------------------------------------------------------------------------------
/www/images/authentication/login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/authentication/login.jpg
--------------------------------------------------------------------------------
/www/images/products/apple-imac-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/apple-imac-1.png
--------------------------------------------------------------------------------
/www/images/products/apple-imac-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/apple-imac-2.png
--------------------------------------------------------------------------------
/www/images/products/apple-imac-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/products/apple-imac-3.png
--------------------------------------------------------------------------------
/www/images/users/bonnie-green-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/bonnie-green-2x.png
--------------------------------------------------------------------------------
/www/images/users/leslie-livingston.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/leslie-livingston.png
--------------------------------------------------------------------------------
/www/images/users/roberta-casas-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/users/roberta-casas-2x.png
--------------------------------------------------------------------------------
/www/images/authentication/create-account.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/authentication/create-account.jpg
--------------------------------------------------------------------------------
/www/images/authentication/reset-password.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lukewilliamboswell/roc-htmx-tailwindcss-demo/HEAD/www/images/authentication/reset-password.jpg
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # generated files
2 | www/app.css
3 |
4 | # binary files
5 | app
6 | main
7 | server
8 |
9 | # the database
10 | app.db
11 |
12 | # macOS files
13 | .DS_Store
14 |
--------------------------------------------------------------------------------
/src/Models/User.roc:
--------------------------------------------------------------------------------
1 | module [User]
2 |
3 | User : {
4 | id : I64,
5 | name : Str,
6 | avatar : Str,
7 | email : Str,
8 | biography : Str,
9 | position : Str,
10 | country : Str,
11 | status : Str,
12 | }
13 |
--------------------------------------------------------------------------------
/www/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 | #ffffff
--------------------------------------------------------------------------------
/src/Models/Product.roc:
--------------------------------------------------------------------------------
1 | module [Product, sample_data]
2 |
3 | Product : {
4 | id : I64,
5 | name : Str,
6 | category : Str,
7 | technology : Str,
8 | description : Str,
9 | price : Str,
10 | discount : Str,
11 | }
12 |
13 | sample_data : List Product
14 | sample_data = []
15 |
--------------------------------------------------------------------------------
/templates/stylesheet.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/src/Models/Session.roc:
--------------------------------------------------------------------------------
1 | module [
2 | Session,
3 | is_authenticated,
4 | ]
5 |
6 | Session : {
7 | id : I64,
8 | user : [Guest, LoggedIn Str],
9 | }
10 |
11 | is_authenticated : [Guest, LoggedIn Str] -> Result {} [Unauthorized]
12 | is_authenticated = \user ->
13 | if user == Guest then
14 | Err Unauthorized
15 | else
16 | Ok {}
17 |
--------------------------------------------------------------------------------
/www/images/flags/bt.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "short_name": "demo",
4 | "icons": [
5 | {
6 | "src": "/static/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/static/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/www/images/flags/se.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/li.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ua.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/id.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/mc.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/pl.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/templates/layoutNormal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{{ model.header }}}
5 |
6 | {{{ model.navbar }}}
7 |
8 |
9 |
13 | {{{ model.content }}} {{{ model.footer }}}
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/www/images/flags/be.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/gn.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ml.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ro.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/td.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/vn.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/so.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ci.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/fr.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ie.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/it.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ng.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/pe.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/templates/layoutSidebar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{{ model.header }}}
5 |
6 | {{{ model.navbar }}}
7 |
8 |
9 | {{{ model.sidebar }}}
10 |
14 | {{{ model.content }}} {{{ model.footer }}}
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/www/images/flags/bd.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/pw.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/lv.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/am.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/bo.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/cz.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/fi.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/ga.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/lt.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ax.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/is.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/at.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ee.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/hu.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/lu.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/nl.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/sl.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ye.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/bg.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ru.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/bh.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/qa.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/gy.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/mg.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/bn.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/dk.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/tt.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/bw.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/gm.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/mu.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/cr.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/gr.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/www/images/flags/th.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ae.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/cg.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/no.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/sd.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/kw.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ma.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/bf.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/tg.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/md.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/ch.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/tl.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/mv.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/jm.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/vc.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "devShell flake";
3 |
4 | inputs = {
5 | roc.url = "github:roc-lang/roc";
6 | nixpkgs.follows = "roc/nixpkgs";
7 |
8 | # to easily make configs for multiple architectures
9 | flake-utils.url = "github:numtide/flake-utils";
10 | };
11 |
12 | outputs = { self, nixpkgs, roc, flake-utils }:
13 | let supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
14 | in flake-utils.lib.eachSystem supportedSystems (system:
15 | let
16 | pkgs = import nixpkgs { inherit system; };
17 | rocPkgs = roc.packages.${system};
18 |
19 | sharedInputs = (with pkgs; [
20 | rocPkgs.cli
21 | ]);
22 | in {
23 |
24 | devShell = pkgs.mkShell {
25 | buildInputs = sharedInputs;
26 | };
27 |
28 | formatter = pkgs.nixpkgs-fmt;
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/www/images/flags/sn.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/tz.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/cl.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/mm.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/dj.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/gw.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/jp.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/www/images/flags/gh.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/tw.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ar.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/la.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/cd.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/mw.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/mr.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/ne.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/lr.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/sr.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/bs.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/www/images/flags/om.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "App",
3 | "icons": [
4 | {
5 | "src": "/static/android-icon-36x36.png",
6 | "sizes": "36x36",
7 | "type": "image/png",
8 | "density": "0.75"
9 | },
10 | {
11 | "src": "/static/android-icon-48x48.png",
12 | "sizes": "48x48",
13 | "type": "image/png",
14 | "density": "1.0"
15 | },
16 | {
17 | "src": "/static/android-icon-72x72.png",
18 | "sizes": "72x72",
19 | "type": "image/png",
20 | "density": "1.5"
21 | },
22 | {
23 | "src": "/static/android-icon-96x96.png",
24 | "sizes": "96x96",
25 | "type": "image/png",
26 | "density": "2.0"
27 | },
28 | {
29 | "src": "/static/android-icon-144x144.png",
30 | "sizes": "144x144",
31 | "type": "image/png",
32 | "density": "3.0"
33 | },
34 | {
35 | "src": "/static/android-icon-192x192.png",
36 | "sizes": "192x192",
37 | "type": "image/png",
38 | "density": "4.0"
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/www/images/flags/ca.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/www/images/flags/tn.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Roc + HTMX + tailwindcss Demo
2 |
3 | Inspired by the [flowbite-admin-dashboard](https://github.com/themesberg/flowbite-admin-dashboard), this is an example web app using [roc](https://www.roc-lang.org), [htmx](https://htmx.org), and [tailwindcss](https://tailwindcss.com).
4 |
5 | 
6 |
7 | This repo aims to provide a simple starting point for building web apps with roc using htmx and tailwindcss.
8 |
9 | There's a lot of things that can be improved, and I don't have a lot of time to dedicate to this, so please contribute to this demo and open an issue or submit a PR to help improve it.
10 |
11 | ## Getting Started
12 |
13 | Build using the script `./build.sh`
14 |
15 | You will need the following on your `PATH`;
16 | 1. [roc](https://www.roc-lang.org/install)
17 | 2. [rtl](https://github.com/isaacvando/rtl)
18 | 3. [tailwindcss](https://tailwindcss.com/docs/installation)
19 |
20 | Alternatively, run the steps manually and make use of the `--watch` cli commands for a nicer development experience.
21 |
--------------------------------------------------------------------------------
/www/images/flags/ni.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/za.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/www/images/flags/jo.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/cu.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/tr.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/il.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/mz.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/www/images/flags/bz.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/cv.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Luke Boswell
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/www/images/flags/cf.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/ad.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/www/images/flags/kp.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/fm.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/sy.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/pa.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/na.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/pk.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/py.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/dz.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/cm.svg:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/www/images/flags/in.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/sc.svg:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/www/images/flags/gg.svg:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/www/images/flags/st.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/www/images/flags/pt.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/ec.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/www/images/flags/cn.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/by.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/src/Views/Layout.roc:
--------------------------------------------------------------------------------
1 | module [
2 | normal,
3 | sidebar,
4 | ]
5 |
6 | import Views.Pages
7 |
8 | header_template : Str
9 | header_template = Views.Pages.header {
10 | authors: "Themesberg",
11 | description: "Get started with a free and open-source admin dashboard layout built with Tailwind CSS and Flowbite featuring charts, widgets, CRUD layouts, authentication pages, and more",
12 | stylesheet: Views.Pages.stylesheet {},
13 | title: "Tailwind CSS Admin Dashboard - Flowbite",
14 | }
15 |
16 | # TODO restore the footer
17 | # footerTemplate : Str
18 | # footerTemplate = Views.Pages.footer {
19 | # copyright: "",
20 | # }
21 |
22 | navbar_template : Str
23 | navbar_template = Views.Pages.navBar {
24 | relURL: "",
25 | }
26 |
27 | sidebar_template : Str
28 | sidebar_template = Views.Pages.sidebar {
29 | ariaLabel: "Sidebar",
30 | }
31 |
32 | normal : Str -> Str
33 | normal = \content ->
34 | Views.Pages.layoutNormal {
35 | header: header_template,
36 | content: content,
37 | footer: "",
38 | navbar: "",
39 | }
40 |
41 | sidebar : Str -> Str
42 | sidebar = \content ->
43 | Views.Pages.layoutSidebar {
44 | header: header_template,
45 | content,
46 | footer: "",
47 | navbar: navbar_template,
48 | sidebar: sidebar_template,
49 | }
50 |
--------------------------------------------------------------------------------
/www/images/flags/et.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/to.svg:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/www/images/flags/gq.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/kh.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/ls.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/gb.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/www/images/flags/kn.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/www/images/flags/ws.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/sv.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/www/images/flags/my.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/ge.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/kg.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/lc.svg:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/src/Controllers/Product.roc:
--------------------------------------------------------------------------------
1 | module [handle_routes!]
2 |
3 | import web.Http exposing [Request, Response]
4 | import Sql.Product
5 | import Views.Layout
6 | import Views.Pages
7 | import Helpers
8 |
9 | handle_routes! :
10 | {
11 | req : Request,
12 | url_segments : List Str,
13 | db_path : Str,
14 | }
15 | => Result Response _
16 | handle_routes! = \{ req, url_segments, db_path } ->
17 |
18 | query_params =
19 | req.uri
20 | |> Helpers.parse_query_params
21 | |> Result.withDefault (Dict.empty {})
22 |
23 | partial =
24 | query_params
25 | |> Dict.get "partial"
26 | |> Result.map \val -> if val == "true" then Bool.true else Bool.false
27 | |> Result.withDefault Bool.false
28 |
29 | when (req.method, url_segments) is
30 | (GET, []) ->
31 | products = Sql.Product.list!? { db_path }
32 |
33 | view = Views.Pages.pageProducts {
34 | products,
35 | }
36 |
37 | if partial then
38 | view
39 | |> Helpers.respond_template! 200 [
40 | { name: "HX-Push-Url", value: "/products" },
41 | ]
42 | else
43 | view
44 | |> Views.Layout.sidebar
45 | |> Helpers.respond_template! 200 [
46 | { name: "HX-Push-Url", value: "/products" },
47 | ]
48 |
49 | _ -> Err (NotHandled req)
50 |
--------------------------------------------------------------------------------
/src/Controllers/User.roc:
--------------------------------------------------------------------------------
1 | module [handle_routes!]
2 |
3 | import web.Http exposing [Request, Response]
4 | import Sql.User
5 | # import Models.Session exposing [Session]
6 | import Views.Layout
7 | import Views.Pages
8 | import Helpers
9 |
10 | handle_routes! :
11 | {
12 | req : Request,
13 | url_segments : List Str,
14 | db_path : Str,
15 | }
16 | => Result Response _
17 | handle_routes! = \{ req, url_segments, db_path } ->
18 |
19 | query_params =
20 | req.uri
21 | |> Helpers.parse_query_params
22 | |> Result.withDefault (Dict.empty {})
23 |
24 | partial =
25 | query_params
26 | |> Dict.get "partial"
27 | |> Result.map \val -> if val == "true" then Bool.true else Bool.false
28 | |> Result.withDefault Bool.false
29 |
30 | when (req.method, url_segments) is
31 | (GET, []) ->
32 | users = Sql.User.list!? { db_path }
33 |
34 | view = Views.Pages.pageUsers {
35 | users,
36 | }
37 |
38 | if partial then
39 | view
40 | |> Helpers.respond_template! 200 [
41 | { name: "HX-Push-Url", value: "/users" },
42 | ]
43 | else
44 | view
45 | |> Views.Layout.sidebar
46 | |> Helpers.respond_template! 200 [
47 | { name: "HX-Push-Url", value: "/users" },
48 | ]
49 |
50 | _ -> Err (NotHandled req)
51 |
--------------------------------------------------------------------------------
/src/Sql/Product.roc:
--------------------------------------------------------------------------------
1 | module [list!]
2 |
3 | import Models.Product exposing [Product]
4 | import web.SQLite3
5 |
6 | list! : { db_path : Str } => Result (List Product) _
7 | list! = \{ db_path } ->
8 |
9 | query =
10 | """
11 | SELECT
12 | [id],
13 | [name],
14 | [category],
15 | [technology],
16 | [description],
17 | [price],
18 | [discount]
19 | FROM [products];
20 | """
21 |
22 | rows =
23 | SQLite3.execute! {
24 | path: db_path,
25 | query,
26 | bindings: [],
27 | }
28 | |> Result.mapErr? SqlErrGettingProducts
29 |
30 | parse_product_rows rows []
31 |
32 | parse_product_rows : List (List SQLite3.Value), List Product -> Result (List Product) _
33 | parse_product_rows = \rows, acc ->
34 | when rows is
35 | [] -> Ok acc
36 | [[Integer id, String name, String category, String technology, String description, String price, String discount], .. as rest] ->
37 | parse_product_rows
38 | rest
39 | (
40 | List.append acc {
41 | id,
42 | name,
43 | category,
44 | technology,
45 | description,
46 | price,
47 | discount,
48 | }
49 | )
50 |
51 | row -> Err (UnexpectedValues "unexpected values, got row $(Inspect.toStr row)")
52 |
--------------------------------------------------------------------------------
/src/Sql/User.roc:
--------------------------------------------------------------------------------
1 | module [list!]
2 |
3 | import Models.User exposing [User]
4 | import web.SQLite3
5 |
6 | list! : { db_path : Str } => Result (List User) _
7 | list! = \{ db_path } ->
8 |
9 | query =
10 | """
11 | SELECT
12 | [id],
13 | [name],
14 | [avatar],
15 | [email],
16 | [biography],
17 | [position],
18 | [country],
19 | [status]
20 | FROM [users];
21 | """
22 |
23 | rows =
24 | SQLite3.execute! {
25 | path: db_path,
26 | query,
27 | bindings: [],
28 | }
29 | |> Result.mapErr? SqlErrGettingUsers
30 |
31 | parse_user_rows rows []
32 |
33 | parse_user_rows : List (List SQLite3.Value), List User -> Result (List User) _
34 | parse_user_rows = \rows, acc ->
35 | when rows is
36 | [] -> Ok acc
37 | [[Integer id, String name, String avatar, String email, String biography, String position, String country, String status], .. as rest] ->
38 | parse_user_rows
39 | rest
40 | (
41 | List.append acc {
42 | id,
43 | name,
44 | avatar,
45 | email,
46 | biography,
47 | position,
48 | country,
49 | status,
50 | }
51 | )
52 |
53 | row -> Err (UnexpectedValues "unexpected values, got row $(Inspect.toStr row)")
54 |
--------------------------------------------------------------------------------
/www/images/flags/ww.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/aw.svg:
--------------------------------------------------------------------------------
1 |
26 |
--------------------------------------------------------------------------------
/www/images/flags/csa.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/es.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/www/images/flags/br.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/www/images/flags/mn.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/www/images/flags/sm.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/an.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/www/images/flags/uy.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/www/images/flags/si.svg:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/www/images/flags/rw.svg:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/www/images/flags/gt.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/ve.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/mx.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/www/images/flags/af.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/lb.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/zw.svg:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/www/images/flags/hn.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/www/images/flags/bi.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/km.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/www/images/flags/mk.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/gi.svg:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/www/images/flags/pr.svg:
--------------------------------------------------------------------------------
1 |
28 |
--------------------------------------------------------------------------------
/www/images/flags/do.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/www/images/flags/az.svg:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/www/images/flags/caf.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/www/images/flags/tj.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/templates/error401.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |

7 |
8 |
9 |
12 | Unauthorized Access
13 |
14 |
17 | Sorry, you do not have permission to access this page. If you
18 | believe this is a mistake, please contact your administrator.
19 |
20 |
24 |
36 | Go back home
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/templates/error404.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |

10 |
11 |
12 |
15 | Page not found
16 |
17 |
20 | Oops! Looks like you followed a bad link. If you think this is a
21 | problem with us, please tell us.
22 |
23 |
27 |
39 | Go back home
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/templates/error500.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |

10 |
11 |
12 |
15 | Something has gone seriously wrong
16 |
17 |
20 | It's always time for a coffee break. We should be back by the
21 | time you finish your coffee.
22 |
23 |
27 |
39 | Go back home
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/www/images/flags/bj.svg:
--------------------------------------------------------------------------------
1 |
34 |
--------------------------------------------------------------------------------
/www/images/flags/co.svg:
--------------------------------------------------------------------------------
1 |
34 |
--------------------------------------------------------------------------------