
Documentation
Generated by Codox
Tolgraven 0.1.0-SNAPSHOT
website.util
->css-var
(->css-var var-name value)Set value of CSS variable. Causing issues ‘no prot method IMap.-dissoc defined for object CSSStyleDeclaration’ - in interceptor, is re-frisk related or?
<-css-var
(<-css-var var-name & calc)Get value of CSS variable. Have to apply to dummy div to force calc
at
(at val-or-atom & [fallback])Take symbol: if value, return it. If ratom, deref it, thereby avoiding nil derefing etc…
local-time
(local-time clock)Format a full provider ISO timestamp as local HH:mm:ss plus its UTC offset.
merge-attrs
(merge-attrs attrs-1 attrs-2)Combine attrs instead of replacing. Would support some common stuff like merging :style, wrapping :ref, combining :class strs
play-pauser
(play-pauser video & {:keys [rate-step time-per-step], :or {rate-step 0.3, time-per-step 330}})Returns fn to :play or :pause video smoothly by changing playback rate progressively (calls itself in intervals)
previous-month-date
(previous-month-date ms)UTC calendar subtraction, clamped to the preceding month’s last day.
px-to-rem
(px-to-rem px-val)Convert pixels to rem. Doesnt seem like gets quite perfect…
rem-to-px
(rem-to-px rem-val)Convert rem to pixels. Doesnt seem like gets quite perfect…
remove-nils
(remove-nils m)Remove keys with nil or empty seq values, even in nested maps.
scroll-by
(scroll-by rem & [id])Manually scroll view by. But guess need custom for Safar-eye
scroll-to
(scroll-to id & [offset])Manual so Safari gets same fn as chrome Plus move page down correctly when open menu etc… There is a CSS offset thing but cant get it working?
scroll-to-end!
(scroll-to-end! element)Scroll a referenced element without changing React-owned markup.
set-attr!
(set-attr! id-or attr value)Set attribute on element. Avoid for general use. Good for document (pass id nil)
timestamp
(timestamp ms)(timestamp ms now)Use minutes ago, hours ago, then a UTC date. Optional now keeps this pure in tests.
toggle-class!
(toggle-class! id-or class)Toggle class on element. Avoid for general use. Good for root (pass id nil or :root), can also pass type/class
unix->ts
(unix->ts ms & [format])Format epoch milliseconds in UTC, matching the original log/chat formatter.