ex_admin icon indicating copy to clipboard operation
ex_admin copied to clipboard

How to add custom theme?

Open ArthurPai opened this issue 8 years ago • 4 comments

I have project need custom theme, how can i add custom theme?

or, change the color of the theme (not just the skin, maybe the side color, font color, warning flash color etc.)

can you give any suggestion, thank you.

ArthurPai avatar Jan 09 '17 05:01 ArthurPai

the same question

d4rk5eed avatar Jan 17 '17 12:01 d4rk5eed

There is not currently a way to create a custom theme. I think you can do some things though to change the theme.

Add a custom logo:

config :ex_admin,
  logo_full: "<h1>Logo</h1>",
  logo_mini: "<h1>Logo</h1>"

Add custom header info like a stylesheet:

config :ex_admin,
  head_template: {ExAdminDemo.AdminView, "admin_layout.html"}

Where:

  • ExAdminDemo.AdminView is a view in your project
  • admin_layout.html is a template in web/templates/admin directory

This renders in the head of the page, so you can put in stylesheets

gwincr11 avatar Jan 19 '17 01:01 gwincr11

I`d remark ExAdminDemo.AdminView must be view in your project, not ExAdmin.AdminView Something generic

defmodule YourPrjNamespace.AdminView do
  use YourPrjNamespace.Web, :view
end

d4rk5eed avatar Feb 09 '17 10:02 d4rk5eed

This is coming in another major version.

nkezhaya avatar Mar 22 '17 16:03 nkezhaya