antizer icon indicating copy to clipboard operation
antizer copied to clipboard

css file is missing in cljsjs/antd/development

Open narocath opened this issue 7 years ago • 7 comments

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?

narocath avatar Nov 26 '17 13:11 narocath

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")

mitchgillin avatar Dec 04 '17 17:12 mitchgillin

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.

narocath avatar Dec 09 '17 00:12 narocath

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

jiacai2050 avatar Jul 28 '18 15:07 jiacai2050

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.

priornix avatar Aug 08 '18 07:08 priornix

@narocath Can we close this?

priornix avatar Aug 12 '18 06:08 priornix

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

headwinds avatar Aug 17 '18 14:08 headwinds

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

narocath avatar Aug 21 '18 12:08 narocath