Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriyzhuk committed Oct 1, 2016
1 parent 3e4859b commit 04aaa3f
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
19 changes: 19 additions & 0 deletions example/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.header {
background: #8a8a8a;
}

.header .columns {
padding-bottom: 0;
}

.header p {
padding-top: 15px;
}

.header .wrapper-inner {
padding: 20px;
}

.header .container {
background: transparent;
}
18 changes: 18 additions & 0 deletions example/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

require '../vendor/autoload.php';

require '../src/InkyPremailer.php';

use Dreamvention\InkyPremailer\InkyPremailer;

$inkyPremailer = new InkyPremailer();

$styles = array();
$styles[] = 'css/style.css'; // this will override the styles in the template file.

$html = file_get_contents('template/basic.html');

$email = $inkyPremailer->render($html, $styles);

echo $email;
96 changes: 96 additions & 0 deletions example/template/basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!-- Emails use the XHTML Strict doctype -->
<!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>
<!-- The character set should be utf-8 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<!-- Link to the email\'s CSS, which will be inlined into the email -->
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/foundation-emails/2.2.1/foundation-emails.css" rel="stylesheet" media="screen" />
<style type="text/css">
.header {
background: #fff;
}
table.button.facebook table td {
background: #3B5998 !important;
border-color: #3B5998;
}

table.button.twitter table td {
background: #1daced !important;
border-color: #1daced;
}

table.button.google table td {
background: #DB4A39 !important;
border-color: #DB4A39;
}

.wrapper.secondary {
background: #f3f3f3;
}
</style>

</head>

<body>

<!-- Wrapper for the body of the email -->
<table class="body" data-made-with-foundation>
<tr>
<!-- The class, align, and <center> tag center the container -->
<td class="float-center" align="center" valign="top">
<center>
<wrapper class="header">
<container>
<row class="collapse">
<columns small="6">
<img src="http://placehold.it/200x50/def0fc">
</columns>
<columns small="6">
<p class="text-right">Inky-Premailer</p>
</columns>
</row>
</container>
</wrapper>

<container>

<spacer size="16"></spacer>

<row>
<columns small="12">

<h1>Hi, Susan Calvin</h1>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magni, iste, amet consequatur a veniam.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut optio nulla et, fugiat. Maiores accusantium nostrum asperiores provident, quam modi ex inventore dolores id aspernatur architecto odio minima perferendis, explicabo. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima quos quasi itaque beatae natus fugit provident delectus, magnam laudantium odio corrupti sit quam. Optio aut ut repudiandae velit distinctio asperiores?</p>
<callout class="primary">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit repellendus natus, sint ea optio dignissimos asperiores inventore a molestiae dolorum placeat repellat excepturi mollitia ducimus unde doloremque ad, alias eos!</p>
</callout>
</columns>
</row>
<wrapper class="secondary">

<spacer size="16"></spacer>

<row>
<columns large="6">
<h5>Connect With Us:</h5>
<button class="facebook expand" href="http://zurb.com">Facebook</button>
<button class="twitter expand" href="http://zurb.com">Twitter</button>
<button class="google expand" href="http://zurb.com">Google+</button>
</columns>
<columns large="6">
<h5>Contact Info:</h5>
<p>Phone: 408-341-0600</p>
<p>Email: <a href="mailto:[email protected]">[email protected]</a></p>
</columns>
</row>
</wrapper>
</container>
</center>
</td>
</tr>
</table>
</body>
</html>

0 comments on commit 04aaa3f

Please sign in to comment.