antizer
antizer copied to clipboard
css file is missing in cljsjs/antd/development
I get an error because it can't find the file, the only file that there is in this directory is the antd.inc.js
, any ideas?
I think you have to use the CDN to access it in your index.html (or your head[] in handler.clj if you used the figwheel template).
(include-css "https://cdnjs.cloudflare.com/ajax/libs/antd/2.13.10/antd.css")
I did thank you and worked, but how to change the theme color? I thought to import the antd.less
and use
lein-less
to recompile less to css but I get an error on .make-color-classes();
SyntaxError: variable @#ffc0cb-6 is undefined
I think antd generate .less variables from the changed color.
Solution can be found here:
- https://www.reddit.com/r/Clojurescript/comments/74dhct/i_dont_understand_how_should_i_include_the_ant/
To sum up, add a route in your app to serve those css
- https://github.com/dfuenzalida/antizer-demo/blob/1ecd8ee2116dd1a93673a64c76b235bdda470271/src/antizer_demo/core.clj#L26
Thanks @jiacai2050 for the links, I have updated the documentation to include the different methods for including the CSS files and added the example (thanks @dfuenzalida) in the documentation.
@narocath Can we close this?
this makes it clear how to load the css but to @narocath question - how do we update the theme colors to matching our project's branding?
In the main ant design theme docs it mentions being able to set it in the package.json but what's clojure version of that? I assume somewhere in the project.clj file?!
It would be nice to be able to this:
:theme {
"primary-color" "#1DA57A"
;; etc for other colors
}
It seems there is no documentation in antizer for setting the theme - sorry if I missed it but I couldn't find any
sorry for the late response, yes you can and thank you for your time guys! Also a solution like @headwinds suggestion I think would serve better