Skip to content

Commit

Permalink
notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 16, 2024
1 parent 127657a commit 2724164
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 27 deletions.
4 changes: 2 additions & 2 deletions demo/demo/page5/format.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[goldly.page :as page]
[goog.string]
[tick.core :as t]
[tick.goldly]
[tick.helper]
[goldly.js :refer [parse-float to-fixed]]))

(parse-float "34")
Expand Down Expand Up @@ -38,7 +38,7 @@
[:p "date (format with 3 numbers): " (goog.string/format "%s %s %s" 2021 11 13)]

[:h1 "dt-format"]
[:p "date (instant) format: " (tick.goldly/dt-format "YYYYMMdd HH:mm:ss" (tick.core/now))]
[:p "date (instant) format: " (tick.helper/dt-format "YYYYMMdd HH:mm:ss" (tick.core/now))]
])

(page/add format-page :demo-format)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns demo.notebook.format
(:require
[tick.core :as t]
[tick.goldly :refer [dt-format]]
[goldly.js :refer [to-fixed]]
[tick.helper :refer [dt-format]]
[pinkgorilla.repl.cljs.js :refer [to-fixed]]
[goog.string :refer [format]]))

(dt-format "YYYYMMdd HH:mm:ss" (t/now))
Expand Down
14 changes: 14 additions & 0 deletions resources/demo/notebook/load_js.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(ns demo.notebook.load-js
(:require
[pinkgorilla.repl.cljs.http :refer [application-url ws-origin]]
[pinkgorilla.repl.cljs.jsloader :refer [load-js]]))

; demonstrates loading a js file.

(load-js "/r/repl/test2.js")

(application-url)

(ws-origin "/test")


File renamed without changes.
File renamed without changes.
23 changes: 0 additions & 23 deletions src/demo/notebook/load_js.cljs

This file was deleted.

0 comments on commit 2724164

Please sign in to comment.