Elixir Phoenix inlining css for sending emails - phoenix-framework

I am sending emails using the mailgun library in Phoenix.
Turns out that when i look at the email in my gmail account, it has been stripped off of all the css classes and the link to external css files.
Mailgun suggests using a css inline library http://blog.mailgun.com/transactional-html-email-templates/
Tried search a lot, but could not find a css inline library for Phoenix/Elixir like the premailer gem in Ruby.
Does anyone know of a way to achieve this?

I just released Smoothie, an Elixir library that does just this. We use this in our product at the startup I run, and decided to write our own library as we also couldn't find one in the elixir ecosystem yet. Check out the github page for installation instructions. Let me know if it works for you!

There is also a library now called premailex which was released October 2017. It handles CSS inlining

I have not been able to find anything myself but I believe you can find tools for that online and use them, it's not exactly the same but I guess it's better than to inline everything manually. For instance, you could use this one. I have not tested it though.
Also you can create a package yourself and share it with us :)

Related

Is there a way to code a bulk download (zip?) for users to download all attachments on my page?

My app serves up a bunch of files as links that the user has to download individually. The customer wants me to provide a bulk download option as well. I'm using ColdFusion, but can probably use other languages or translate into one I can use. I mostly likely cannot download a commercial tool to do it. Thanks!
Use curl - in your case it would be libcurl. This would require C++ bindings.
Create a list of your links in a string or a file that your app would access.
Get started with the curl cli.
See here - https://curl.se/docs/httpscripting.html and here - https://www.freecodecamp.org/news/how-to-start-using-curl-and-why-a-hands-on-introduction-ea1c913caaaa/
Once you are comfortable with this, use libcurl linked within your app and download the files using the libcurl API.
Thanks for your reply - I appreciate it. A coworker found the best answer for ColdFusion. There's a tag called cfzip that does it all.
https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-u-z/cfzip.html

Fable, invoke F# from JS

I see a lot of documentation on F# JS interop and how to use JS code from F#, but I am trying to do the opposite: Call some of my F# code from (inlined) JS. I cannot find any information regarding this. Is it possible? If so how?
So after 2 weeks of trying everything I could think about, google every word combination I could think of and creating a SO account to ask for help: I finally found how to do this.
It turns out I needed to add this to my webpack config's output section:
libraryTarget: 'var',
library: 'EntryPoint'
as explained here: https://itnext.io/calling-a-es6-webpacked-class-from-outside-js-scope-f36dc77ea130
As it turns out this is not related to F#, fable or babel but to webpack.

How do I install and use Groundwork CSS

I've been looking around at some CSS frameworks and I really like the look of the Groundwork CSS framework because it has a nice responsive layout. However I downloaded the source code and I'm a bit lost. I'm used to using Twitter Bootstrap and and I really love it's documentation (the instructions on scaffolding are helpful to beginners), bit I don't really know how to use Groundwork.
How do I get started with using the Groundwork CSS framework?
Groundwork, like Bootstrap, is a web-development framework, not just a set of CSS docs. They both include a set of style-sheets, java-script files, misc icons etc, and one or more HTML docs to bring it all together.Installation is simple; download the framework, rename the folder to "MyCoolNewSite", start editing.
As Michal stated, the "index/html" doc that comes with the framework has lots to look at to help you get started. They also have what looks to be pretty solid documentation on their site, starting here: http://groundwork.sidereel.com/?url=grid
The site has now changed to: http://groundworkcss.github.io/

How do you use the Gettext library with Codeigniter for i18n?

I’m finally developing my first multilingual site which came from an old no-CI site which used Gettext cause there’s a lot of text and not just actions. I’m really struggling to make the gettext library to work with CI, having read the WIKI (first option) but I lacks information and examples.
Is there someone here who has used
the gettext library succesfully?
Can you post some examples of controller
and views?
Thanks in advance!
I'd recommend NOT using CI's language libraries for this. Use Poedit or another gettext()/ngettext() replacement program.
Trust me--you'll want all your externalized strings in a compiled format. Doing this from scratch is far more work than it's worth.

Extend RedCloth via Redmine plugin?

I'm new to Ruby/Redmine/Redcloth but I'm trying to achieve the following:
The default way to build a link in Textile is "foo":http://bar. However, 90% of the day I use Atlassian products, which use [foo|http://bar] as link markup.
To keep everything a bit uniform I'd like to implement this in Redmine via a plugin. However, it appears that you can't change the macro syntax so instead I'll have to look into extending RedCloth to accept this form of inserting links.
Does anyone know how I can achieve this?
Thank you and merry christmas,
Dennis
You might consider switching to one of the two Markdown plugins (one is Markdown Extra-like, based on Bluefeather), which are a bit more similar in link style, although not the same as what you are used to. Since you use SO, though, you're obviously familiar with it.
Otherwise you'd have to write a full plugin, for which either of the plugins I've mentioned would serve as a good model. Best of luck.

Resources