1
1
mirror of https://github.com/srid/ema.git synced 2024-11-25 20:12:20 +03:00
This commit is contained in:
Sridhar Ratnakumar 2021-04-20 15:20:12 -04:00
parent 3cb3154706
commit 0d35adf0a5
3 changed files with 122 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# ema
<img width="10%" src="./ema.svg">
ema is a **WIP** next-gen Haskell static site generator that is *change-aware*. In addition to static site generation, it provides a live server that hot-reload's on code *or* data change[^1].
The ultimate goal of ema is to make it possible to easily implement your own [neuron](https://neuron.zettel.page/), or just about any app that creates a browser view of arbitrarily changing data (on disk, database, or whatever). ema is designed to facilitate creation of apps whose data is normally *edited* via traditional mechanisms (eg: text editor) but *rendered* as a delightful web page - so as to provide an economical read-only view, of your data, on desktop & mobile.
@ -31,11 +33,13 @@ Run `bin/run` (or <kbd>Ctrl+Shift+B</kbd> in VSCode). This runs the clock exampl
- [ ] Refactor Server.hs & Changing.hs
pre-announce,
- [ ] plan features, re: hakyll
- [ ] plan features / messaging, re: hakyll
- Safer and simpler routes system
- Template system?
- [ ] CLI UX (opts, logging, etc.)
- [ ] add common examples,
- filesystem watcher
- docs site (w/ sidebar and possibly even search)
- [x] filesystem watcher
- [ ] docs site for self (w/ sidebar and possibly even search)
- [ ] documentation ([howto](https://documentation.divio.com/))
doc notes,

114
ema.svg Normal file
View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 464 464" style="enable-background:new 0 0 464 464;" xml:space="preserve">
<g>
<path style="fill:#FFD7A3;" d="M448,72c0-41.333-23.5-72-64-72c-20.712,0-36.963,8.368-47.914,16.546
c-2.988-2.239-7.235-2.14-10.124,0.445c-2.013,1.801-2.894,4.392-2.607,6.886C303.415,7.644,282.16,0,272,0c-26,0-40,8-40,8
s-14-8-40-8c-10.16,0-31.415,7.644-51.355,23.877c0.288-2.494-0.593-5.084-2.607-6.886c-2.889-2.585-7.136-2.684-10.124-0.445
C116.963,8.368,100.712,0,80,0C39.5,0,16,30.667,16,72c0,41.967,46.667,154.667,24,224c0,0,52.387-18.053,75.575-88.414
C117.01,207.854,118.488,208,120,208v8c0,19.377,11.651,36.854,29.538,44.308L184,274.667v25.801
c0,6.887-4.407,13.001-10.94,15.179l-32.343,11.9l-0.553-0.885c-2.312-3.699-7.16-4.864-10.9-2.62l-26.278,15.767
c-3.555,2.133-4.842,6.581-3.128,10.241c-3.698,5.207-6.172,11.307-7.047,17.87l-9.188,68.908
C81.705,451.216,92.898,464,107.413,464h249.175c14.515,0,25.708-12.784,23.789-27.172l-9.188-68.908
c-0.875-6.563-3.348-12.664-7.047-17.87c1.714-3.661,0.426-8.108-3.128-10.241l-26.278-15.767c-3.74-2.244-8.588-1.079-10.9,2.62
l-0.553,0.885l-32.343-11.9c-6.534-2.178-10.94-8.292-10.94-15.179v-25.802l34.461-14.359C332.349,252.855,344,235.378,344,216v-8
c1.512,0,2.99-0.146,4.425-0.414C371.613,277.947,424,296,424,296C401.334,226.667,448,113.967,448,72z"/>
<path style="fill:#FDC88E;" d="M280,274h-96v26.468l0,0v0.001c0,0.391-0.017,0.777-0.046,1.161c-0.014,0.2-0.04,0.396-0.062,0.595
c-0.018,0.16-0.034,0.32-0.057,0.478c-0.043,0.307-0.098,0.609-0.158,0.91c-0.001,0.006-0.003,0.013-0.004,0.02
c-0.888,4.4-3.587,8.228-7.425,10.537C243.173,325.73,280,274,280,274z"/>
<g>
<path style="fill:#D48F60;" d="M320,32c0,0,23.5-32,64-32s64,30.667,64,72c0,41.967-46.667,154.667-24,224c0,0-60-20.667-80-104
c-18.34-76.418,8-128,8-128L320,32z"/>
</g>
<g>
<path style="fill:#C57E52;" d="M348,40c0,0,25.5-19,44-8c40.721,24.213,7.454,90.732,0,128c-10,50-6,98,32,136
c0,0-60-20.667-80-104c-18.34-76.418,4-128,4-128V40z"/>
</g>
<g>
<path style="fill:#43A0C5;" d="M356.092,50.666L356.092,50.666c3.293-2.946,3.574-8.004,0.628-11.296l-19.461-21.75
c-2.946-3.293-8.004-3.574-11.296-0.628l0,0c-3.293,2.946-3.574,8.004-0.628,11.296l19.461,21.75
C347.741,53.331,352.799,53.612,356.092,50.666z"/>
</g>
<g>
<path style="fill:#D48F60;" d="M144,32c0,0-23.5-32-64-32S16,30.667,16,72c0,41.967,46.667,154.667,24,224c0,0,60-20.667,80-104
c18.34-76.418-8-128-8-128L144,32z"/>
</g>
<g>
<path style="fill:#C57E52;" d="M117,40c0,0-26.5-19-45-8c-40.721,24.213-7.454,90.732,0,128c10,50,6,98-32,136
c0,0,60-20.667,80-104c18.34-76.418-3-128-3-128V40z"/>
</g>
<g>
<path style="fill:#43A0C5;" d="M107.909,50.666L107.909,50.666c-3.293-2.946-3.574-8.004-0.628-11.296l19.461-21.75
c2.946-3.293,8.004-3.574,11.296-0.628l0,0c3.293,2.946,3.574,8.004,0.628,11.296l-19.461,21.75
C116.259,53.331,111.202,53.612,107.909,50.666z"/>
</g>
<path style="fill:#FFE1B2;" d="M344,160v-16c0-22.091-17.909-56-40-56H160c-22.091,0-40,33.909-40,56v16c-13.255,0-24,10.746-24,24
c0,13.255,10.745,24,24,24v8c0,19.377,11.651,36.854,29.538,44.308l51.691,21.538c9.75,4.063,20.208,6.154,30.77,6.154l0,0
c10.562,0,21.019-2.092,30.769-6.154l51.694-21.539C332.349,252.855,344,235.378,344,216v-8c13.255,0,24-10.745,24-24
S357.255,160,344,160z"/>
<g>
<path style="fill:#623F33;" d="M176,192L176,192c-4.4,0-8-3.6-8-8v-8c0-4.4,3.6-8,8-8l0,0c4.4,0,8,3.6,8,8v8
C184,188.4,180.4,192,176,192z"/>
</g>
<g>
<path style="fill:#623F33;" d="M288,192L288,192c-4.4,0-8-3.6-8-8v-8c0-4.4,3.6-8,8-8l0,0c4.4,0,8,3.6,8,8v8
C296,188.4,292.4,192,288,192z"/>
</g>
<g>
<g>
<path style="fill:#E4B07B;" d="M232,248.219c-14.223,0-27.527-3.5-36.5-9.605c-3.652-2.484-4.602-7.461-2.113-11.113
c2.48-3.648,7.461-4.598,11.113-2.113c6.289,4.277,16.57,6.832,27.5,6.832s21.211-2.555,27.5-6.832
c3.66-2.492,8.629-1.539,11.113,2.113c2.488,3.652,1.539,8.629-2.113,11.113C259.528,244.719,246.223,248.219,232,248.219z"/>
</g>
</g>
<path style="fill:#FFD7A3;" d="M120,160c-13.255,0-24,10.745-24,24s10.745,24,24,24v8c0,19.378,11.651,36.855,29.538,44.308
l51.69,21.538c2.53,1.054,5.112,1.962,7.727,2.749c-22.844-16.711-38.05-31.32-46.96-40.872c-6.482-6.95-9.995-16.121-9.995-25.625
v-44.711c22.9-7.993,87.178-34.248,88-77.387c0.192-10.066-0.464-20.642-1.667-26C226.367,134.113,128.076,160,120,160z"/>
<g>
<path style="fill:#57B9DD;" d="M323.837,326.662L295.05,372.72c-4.386,7.017-12.077,11.28-20.352,11.28h-85.396
c-8.275,0-15.966-4.263-20.352-11.28l-28.786-46.058c-2.312-3.699-7.16-4.864-10.9-2.62l-26.278,15.767
c-3.837,2.302-5.04,7.305-2.668,11.1L136,408h192l35.682-57.092c2.372-3.795,1.169-8.797-2.668-11.1l-26.278-15.767
C330.997,321.798,326.148,322.964,323.837,326.662z"/>
</g>
<g>
<rect x="136" y="408" style="fill:#43A0C5;" width="192" height="56"/>
</g>
<path style="fill:#D48F60;" d="M272,0c-26,0-40,8-40,8s-14-8-40-8S67.333,50.055,104,166.055c0,0,128-22.722,128-78.055
c0,55.333,128,78.055,128,78.055C396.667,50.055,298,0,272,0z"/>
<g>
<path style="fill:#CA8357;" d="M232,8.004V8c0,0-14-8-40-8S67.334,50.055,104,166.055c0,0,15.495-2.757,35.69-8.67
C117.089,53.368,207.192,8.084,232,8.004z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -142,7 +142,7 @@ renderOrg _org@(Org.OrgFile meta doc) = do
renderMeta :: Map Text Text -> H.Html
renderMeta meta = do
H.table ! A.class_ "Metatable-auto" $ do
H.table ! A.class_ "table-auto" $ do
let td cls = H.td ! A.class_ ("border px-4 py-2 " <> cls)
forM_ (Map.toList meta) $ \(k, v) ->
H.tr $ do