snake117

snake117

Incorporating 3rd party admin template to Phoenix 1.4 project

I recently came across this theme on Bootstrap Dash: Corona Bootstrap Admin Template | BootstrapDash and would like to incorporate it in my next Phoenix 1.4 project. I have not done this before and was wondering how to go about doing it?

It comes with folders for: css, fonts, gulp-tasks, images, js, pages, partials, scss, vendors,as well as a gulpfile.js.

Also, will it be problematic if Gulp is used in phoenix?

If anyone can guide me through this I would greatly appreciate it :innocent:

Thanks

First Post!

OvermindDL1

OvermindDL1

Phoenix is just the webserver, it doesn’t control what you put on the page itself. :slight_smile:

By default the modern phoenix generators come with webpack definition files setup to make it easy to setup all the javascript/css/images/etc… but even that is optional. However, assuming you are using the normal modern template generator then you’d just integrate it with webpack the same as any other webpack thing, not specific to phoenix whatsoever and lots of docs on the Internet about it. :slight_smile:

Most Liked

sanswork

sanswork

It depends a lot on how good the template author has done their job but generally I copy the precompiled css file instead of the scss files.

For the JS I ignore their venders/third party scripts directory and use npm modules as I need them so check their scripts and often they’ll have a demo.js or something like that which shows off everything. Ignore that and look for what it includes as the base js file. Copy that file to your project and require it from your app.js and if you need one of the thirdparty vendor scripts npm install it and require it from that script instead.

fonts/images go in assets/static. The rest you don’t need to copy over.

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54260 488
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement