This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-18
Channels
- # admin-announcements (12)
- # adventofcode (2)
- # beginners (10)
- # boot (340)
- # cljs-dev (1)
- # cljsrn (30)
- # clojure (79)
- # clojure-germany (4)
- # clojure-japan (4)
- # clojure-nl (2)
- # clojure-russia (141)
- # clojurescript (125)
- # core-async (9)
- # datascript (2)
- # datavis (8)
- # datomic (9)
- # editors (5)
- # editors-rus (4)
- # hoplon (69)
- # ldnclj (63)
- # off-topic (1)
- # om (291)
- # parinfer (7)
- # portland-or (3)
- # proton (248)
- # rdf (3)
- # re-frame (14)
- # remote-jobs (4)
How could I go about using a custom element to implement a new native element like "Picture" http://responsiveimages.org/demos/basic-implementation/index.html
Still having windows problems. Here's the new dev task from build.boot: (deftask dev "Build address-book for local development." [] (comp (watch) (speak) (hoplon) (reload) (cljs) (serve :port 8000 :init-params {"useFileMappedBuffer" "false"}))) But I am still getting a slew of couldn't delete exceptions in tmp.
Do I need to update my dependencies perhaps? :dependencies '[[adzerk/boot-cljs "1.7.170-3"] [adzerk/boot-reload "0.4.2"] [hoplon/boot-hoplon "0.1.10"] [hoplon/hoplon "6.0.0-alpha11"] [org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.189"] [tailrecursion/boot-jetty "0.1.1"]]
Thanks! Do you have a simple example of that max-width cell implementation?
OK, I changed/saved build.boot and reran boot dev. Same problem. And I just confirmed that 0.1.3 has been added to my local repository. 😞
The Picture element is not fully supported yet (no IE, Safari, IOS). So then I would look to js polyfills or libraries. But I am not skilled with js interop yet. Seems like an ideomatic Hoplon/Javelin solution might be more elegant and flexible.
I imagine the tradeoff would be that by not using native "Picture" markup, you might lose image preloading, in that the browser has to wait for the js/cljs to know what image to download. But is this inevitable with Hoplon anyway, since it's dom is rendered from cljs?
I guess it could be prerendered...
yeah i don't remember which event it is that is fired when viewport orientation / dimensions change
@laforge49: it doesn't help?
take your time. I still have not finished the getting started page and this is not a complete blocker.
Compiling Hoplon pages... ò index.cljs.hl Adding :require adzerk.boot-reload to index.html.cljs.edn... Compiling ClojureScript... ò index.html.js java.util.concurrent.ExecutionException: java.nio.file.AccessDeniedException: target\index.html.out\hoplon\app_pages\indexDOT_html.js java.nio.file.AccessDeniedException: target\index.html.out\hoplon\app_pages\indexDOT_html.js file: "target\\index.html.out\\hoplon\\app_pages\\indexDOT_html.js" sun.nio.fs.WindowsException.translateToIOException sun.nio.fs.WindowsException.rethrowAsIOException sun.nio.fs.WindowsException.rethrowAsIOException sun.nio.fs.WindowsFileCopy.copy sun.nio.fs.WindowsFileSystemProvider.copy ...
@mathiasx: howdy!
things are good
@laforge49 What combination got the hoplon reload to work on Windows? I just tried a new test project. No dice, with or without the BOOT_EMIT_TARGET=no added to the boot.properties
@symbit: I have had less issues with boot on windows 10 than <8.1
@micah @laforge49 changing boot-jetty 0.1.3 back to [pandeiro/boot-http "0.7.0"] with BOOT_EMIT_TARGET=no works with Windows 7 and boot 2.5.1
@flyboarder: Good to hear. For me it's still the corporate standard.
ah thats too bad, but makes sense in larger environments
Heck, maybe we'll move to Macs, since IBM recently ordered 400,000 new Macs for all employees. Hopefully we'll follow their lead.
I love my mac 😍
unix and I can vm everything else I need, plus vagrant homebrew etc...
Thanks for the help Micha, that snippet is working for me!...
(with-init!
(defc initial-page-width (.width (js/jQuery js/window)))
(defc page-width @initial-page-width))
(.on (js/jQuery js/window) "resize" #(reset! page-width (.width (js/jQuery js/window))))
(img :src (cell= (cond (<= page-width 800) "image1.jpg" (> page-width 800) "image2.jpg")))
Im trying to do something like this:
(defc page-width)
(.on (js/jQuery js/window) "resize" #(reset! page-width (.width (js/jQuery js/window))))
(defc= dynamic-rules
(cond
(<= page-width 800)
{:background-color "red" :border "4px black"})))
(div :css (merge {:height "400px"} dynamic-rules))
But it doesn't seem to be working, any hints?I'm getting an error Uncaught Error: No protocol method IDeref.-deref defined for type cljs.core/PersistentArrayMap: {:background-color "red"}
Its working now! Thanks again!