anelixiruser

anelixiruser

Workflow ideas - using static HTML & tools like Pinegrow with a LiveView app

I’m not the greatest at front-end work and a tool like Pinegrow seems like it could help me a lot. It supports the concept of “partials” which I think is a good start towards being able to using it to build the HTML for pages & LiveComponents. While it doesn’t list EEX support, I think the ERB support is all that I need (since it treats the code as on opaque blob).

I’d also like to be able to hand off the HTML part of development to somebody that is an HTML/CSS developer that doesn’t have Elixir knowledge.

Does anybody have any experience in setting up a workflow for doing this effectively? I’m thinking of something like having a folder with nothing but static HTML partials which are effectively a mockup of my app.

Here’s where things get fuzzy:

  • Do I have the HTML developer just put placeholder text everywhere? And then add a search and replace / build step that turns it into EEX? (I need to deal with i18n so pretty much all the text in my HTML needs to be parameterized).
  • Do I put my @assigns and for loops and such directly in the static HTML? What do I do with things that render conditionally?
  • How do I then have this work fit into the directory layout of my Phoenix LiveView app?

One idea I’ve had is to add some routes to my app which re-export static HTML partials for use by the front-end developer.components. That seems like it could create a lot of extra work though.

Basically what I’m looking for is an effective two-way collaborative process between these two parts of the development process. I feel like this must be a problem other people have solved, but I don’t even know what to call the problem I am describing.

Bonus points if anybody has suggestions which also allow me to effectively deal with using my same templates & layouts for some legacy parts of the application which are still written in PHP using Smarty templating.

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
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
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
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

We're in Beta

About us Mission Statement