Code Monkey home page Code Monkey logo

laravel-inky's People

Contributors

bplugaru avatar petecoop avatar robgridley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravel-inky's Issues

Should <link> elements be removed after reading?

Given a very simple template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width"/>
  <link rel="stylesheet" href="foundation-inky.css">
</head>
<body>
  <container>
    <row>
      <columns>The time is now, [[date("c")]]</columns>
    </row>
  </container>
</body>
</html>

The CSS file is correctly found in resources/css and correctly inlined. This library is so awesome, I'm delighted to be using it.

But the HTML still contains a <link> element, and because the file it refers to is in a non-shared directory, it always 404s.

Is there something the library could do, e.g., near line 32 of src/InkyCompilerEngine.php to delete the <link> elements in the returned HTML?

(I'm testing locally by just returning the HTML like a regular view, and testing with MailTrap.io, both of which actually do try to follow the link. I wouldn't be surprised if many "real" clients don't, but it still seems worthy of clean up.)

Support for Laravel 5.4 ?

I'm having problems with including this package with Laravel 5.4 when running composer update:

  • Conclusion: remove laravel/framework v5.4.1
  • Installation request for petecoop/laravel-inky ^0.2.0 -> satisfiable by petecoop/laravel-inky[0.2.0].
  • Conclusion: don't install laravel/framework v5.4.1
  • Conclusion: don't install laravel/framework v5.4.0
  • petecoop/laravel-inky 0.2.0 requires illuminate/view 5.1.|5.2.|5.3.* -> satisfiable by laravel/framework[5.3.x-dev], illuminate/view[5.1.x-dev, 5.2.x-dev, 5.3.x-dev, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4].
  • Can only install one of: laravel/framework[5.4.x-dev, 5.3.x-dev].

Is there any plans for expanding laravel-inky package to Laravel 5.4 version ?

Hidden elements are removed from dom

Hi! Thanks for your work on this package. Works pretty good. One thing I've noticed is that Emogrifier removes elements that are hidden by display: none;. When a preheader needs to be included, it needs to be present in the html of the email - even though it is hidden via css.

I've found that adding $emogrifier->disableInvisibleNodeRemoval(); right after the new Emogrifier instance is created fixes this issue. But, I'm unaware of any other effects this might cause. Perhaps this has to be an option? I'm thinking that, in line with Foundation for Emails, the default behavior should be that $emogrifier->disableInvisibleNodeRemoval(); is present.

I'd like your opinion on this issue. Thanks!

laravel-inky prevents Laravel Framework from being upgraded

Trying to upgrade from Laravel 5.5 to 5.6 logs the following:

petecoop/laravel-inky 0.5.1 requires illuminate/view 5.1.*|5.2.*|5.3.*|5.4.*|5.5.* -> satisfiable by laravel/framework[v5.5.34]

Can only install one of: laravel/framework[v5.6.0, v5.5.34].

Class does not inject whole CSS file into <style>

In layout I have:

<link rel="stylesheet" href="foundation-emails.css">

I expect that class injects whole CSS file between

<style></style>

But it only injects part of file.

Inlining is fine, it works well, but injecting does not works like expected.

Is there any solution to this problem ?

Does not support PHP > 7.1

Unfortunately this library cannot be used in modern environments running PHP higher than 7.1

Is there any chance this will be supported in the future?

Responsive classes not working.

i have copied and pasted the foundation for mail css in <link rel="stylesheet" href="foundation-emails.css"> they get inlined properly but the responsive classes don't seem to be working

Undefined offset: 1

I keep getting the following error when trying to send mail.

[ErrorException]
Undefined offset: 1

Composer install fails on symfony css selector

When I try to install I get the following error running laravel 5.6

Using version ^0.5.2 for petecoop/laravel-inky
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for petecoop/laravel-inky ^0.5.2 -> satisfiable by petecoop/laravel-inky[0.5.2].
    - Conclusion: remove symfony/css-selector v4.0.4
    - Conclusion: don't install symfony/css-selector v4.0.4
    - petecoop/laravel-inky 0.5.2 requires symfony/css-selector ^2.7|^3.0 -> satisfiable by symfony/css-selector[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.3, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.36, v2.7.37, v2.7.38, v2.7.39, v2.7.4, v2.7.40, v2.7.41, v2.7.42, v2.7.43, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v3.0.0, v3.0.0-BETA1, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.0-BETA1, v3.1.0-RC1, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6].
    - Can only install one of: symfony/css-selector[2.7.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[2.8.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[3.0.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[3.1.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[3.2.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[3.3.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[3.4.x-dev, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.0-BETA2, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.10, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.11, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.12, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.13, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.14, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.15, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.16, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.17, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.18, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.19, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.20, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.21, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.22, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.23, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.24, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.25, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.26, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.27, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.28, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.29, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.30, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.31, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.32, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.33, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.34, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.35, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.36, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.37, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.38, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.39, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.40, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.41, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.42, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.43, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.6, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.7, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.8, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.7.9, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.10, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.11, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.12, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.13, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.14, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.15, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.16, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.17, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.18, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.19, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.20, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.21, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.22, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.23, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.24, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.25, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.26, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.27, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.28, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.29, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.30, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.31, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.32, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.33, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.34, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.35, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.36, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.6, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.7, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.8, v4.0.4].
    - Can only install one of: symfony/css-selector[v2.8.9, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.6, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.7, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.8, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.0.9, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.0-RC1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.10, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.6, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.7, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.8, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.1.9, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.0-RC1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.0-RC2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.10, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.11, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.12, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.13, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.14, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.6, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.7, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.8, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.2.9, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.0-RC1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.10, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.11, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.12, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.13, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.14, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.15, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.16, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.6, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.7, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.8, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.3.9, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0-BETA1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0-BETA2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0-BETA3, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0-BETA4, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0-RC1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.0-RC2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.1, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.2, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.3, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.4, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.5, v4.0.4].
    - Can only install one of: symfony/css-selector[v3.4.6, v4.0.4].
    - Installation request for symfony/css-selector (locked at v4.0.4) -> satisfiable by symfony/css-selector[v4.0.4].


Installation failed, reverting ./composer.json to its original content.

Engine [inky] not found.

i followed all the steps downgraded sympfony/css-selector, included Petecoop\LaravelInky\InkyServiceProvider::class in providers, but still when i try to route to .ink.php in laravel i get the error
InvalidArgumentException
Engine [inky] not found.

please help

layout.inky.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width"/>
  <link rel="stylesheet" href="foundation-emails.css">
</head>
<body>
  @yield('content')
</body>
</html>

welcome.inky.php

@extends('emails.layout')

@section('content')
  <container>
    <row>
      <columns>Welcome</columns>
    </row>
  </container>
@stop

btw i m also using laravel.mix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.