~pepe/good-place

d0d78e265b8f6302313bc6986561ed95ced75eca — Josef Pospíšil 4 months ago 1c7d155
Add bearimy
3 files changed, 7 insertions(+), 1 deletions(-)

M good-place/utils.janet
M project.janet
M templates/blog.temple
M good-place/utils.janet => good-place/utils.janet +4 -0
@@ 1,6 1,7 @@
(use spork)
(use marble)
(use /vendor/jpm)
(use bearimy)

(def . string)



@@ 52,3 53,6 @@

(defn path [req]
  (match-first '(* "GET " '(to " HTTP")) req))

(defn format-date [date]
  (:format (make-date date)))

M project.janet => project.janet +1 -0
@@ 11,6 11,7 @@
                 "https://git.sr.ht/~pepe/kamilah"
                 "https://git.sr.ht/~pepe/eleanor"
                 "https://git.sr.ht/~pepe/chidi"
                 "https://git.sr.ht/~pepe/bearimy"
                 "https://git.sr.ht/~pepe/trevor"]
  :description
  ```

M templates/blog.temple => templates/blog.temple +2 -1
@@ 1,10 1,11 @@
{$
(use spork/temple) (add-loader)
(import /templates/head) (import /templates/foot)
(use /good-place/utils)
$}
{- (head/render-dict args) -}
  <h1 style="margin-top: 5rem">{- (args :title) -}</h1>
  <strong>By {{ (args :author) }} on {{ (args :date) }}</strong>
  <strong>By {{ (args :author) }} on {{ (format-date (args :date)) }}</strong>
  <text style="max-width: 45rem">
    {- (args :content) -}
  </text>