Created
July 30, 2021 16:38
-
-
Save jordanlambrecht/7ea6da2ddcd1b1a6a6c8bb6bb49baf25 to your computer and use it in GitHub Desktop.
Two php files that Pixel Bakery uses in conjunction to generate our employee's email signatures for Gmail.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$phoneInput = $_REQUEST['phonepretty']; | |
$phonePretty = preg_replace('/\D/', ' ', $phoneInput ); | |
$phoneURL = preg_replace('/\D/', '', $phoneInput); | |
$name = $_REQUEST['name']; | |
$position = $_REQUEST['position']; | |
?> | |
<br> | |
<table cellpadding="0" cellspacing="0" border="0" style="background: none; border-width: 0px; border: 0px; margin: 0; padding: 0;"> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap'); | |
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); | |
</style> | |
<tr> | |
<td valign="top" style="padding-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 15px; border-top: 0; border-bottom: 0; border-left: 0; "> | |
<a href="https://pixelbakery.com" target="_blank"> | |
<img style="height: 135px !important; width:135px !important;" id="preview-image-url" alt="Pixel Bakery Logo" src="https://media.pixelbakery.com/pb/pixelbakery_2021_logo_color_transparent.png" /> | |
</a> | |
</td> | |
<td style="padding-top: 0; padding-bottom: 0; padding-left: 12px; padding-right: 0;"> | |
<table cellpadding="0" cellspacing="0" border="0" style="background: none; border-width: 0px; border: 0px; margin: 0; padding: 0;"> | |
<tr> | |
<td colspan="2" style="margin-top:0px; padding-top: 0px; font-weight: 600; color: #333333; font-size: 13.5px; font-family: 'Poppins', 'Open Sans', sans-serif;"> <?php echo $name ?></td> | |
</tr> | |
<tr> | |
<td colspan="2" style="color: #333333; font-size: 12px; font-family: 'Poppins', 'Open Sans', Helvetica, sans-serif;"><i><?php echo $position ; ?></i></td> | |
</tr> | |
<tr> | |
<td style="padding-bottom: 5px; color: #333333; font-size: 12px; font-family: 'Poppins', 'Open Sans', Helvetica, sans-serif; text-decoration: none;"> | |
<?php if($phoneInput): ?> | |
<a style=" color: #ED6970; text-decoration: none; font-weight: normal; font-size: 12px;" href="tel:<?php echo $phoneURL; ?>" target="_blank">c: <?php echo $phonePretty ; ?></a> | |
</br> | |
<?php endif; ?> | |
<a style=" color: #ED6970; text-decoration: none; font-weight: normal; font-size: 12px;" href="tel:14023020323" target="_blank">o: 402 302 0323</a> | |
</td> | |
</tr> | |
<tr> | |
<td colspan="2" style="color: #333333; font-size: 12px; font-weight: 600; font-family: 'Poppins', 'Open Sans', Helvetica, sans-serif;">Pixel Bakery Design Studio</td> | |
</tr> | |
<tr> | |
<td colspan="2" style="color: #333333; font-size: 12px; font-family: 'Poppins', 'Open Sans', Helvetica, sans-serif;"> | |
<a href="https://pixelbakery.com" style="color: #ED6970; text-decoration: none !important; font-weight: normal; font-size: 12px; font-family: 'Poppins', 'Open Sans', Helvetica, sans-serif;" target="_blank">pixelbakery.com</a> | |
</td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous"> | |
<title>Hello, world!</title> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); | |
body{ | |
font-family: 'Poppins', Helvetica, sans-serif; | |
min-height: 100vh; | |
width: 100%; | |
background: #ED6970; | |
} | |
h1{ | |
color: #EFE9F3; | |
} | |
.pb-bg{ | |
background-color: #EFE9F3; | |
} | |
p{ | |
color: #504E57; | |
max-width: 760px; | |
} | |
.btn.btn-primary{ | |
background-color: #fe6f73; | |
} | |
</style> | |
</head> | |
<body> | |
<section class="container py-5 d-flex flex-column justify-content-center vh-100"> | |
<div class="row"> | |
<div class="col-12"> | |
<h1>Pixel Bakery Email Generator</h1> | |
</div> | |
</div> | |
<div class="row pb-bg px-md-5 py-3 py-md-5"> | |
<div class="col-12 col-md-8 pe-5"> | |
<p class="lead"> | |
This form will generate an email signature for you to use with your Pixel Bakery email account. Follow the directions below. | |
</p> | |
<h3>Directions</h3> | |
<ol> | |
<li>Enter your first name, middle initial, and last name. It should look similar to Jordan D. Lambrecht</li> | |
<li> Enter your Client-Facing job title. This may be different than your internal position title.</li> | |
<li> | |
If you were assigned one, enter your work number. | |
</li> | |
<li> | |
After you hit Generate you'll be redirected to a new page. click somewhere within the body of the page to set focus, hit CMD+A to select everything on the page followed by CMD+C to copy everything on the page. | |
</li> | |
<li> | |
From within Gmail, go to your settings and scroll down to the Email Signature section. press CMD+V to paste it. Hit save and send someone a test email to make sure it works. | |
</li> | |
</ol> | |
<hr /> | |
</div> | |
<div class="col-12 col-md-4"> | |
<form action="email-generator-result.php" method="post" class="forms-form"> | |
<div class="mb-3"> | |
<label for="name" class="form-label">First M Last:</label> | |
<input type="text" name="name" class="form-control" placeholder="Jordan D. Lambrecht" required/> | |
</div> | |
<div class="mb-3"> | |
<label for="position" class="form-label">Job Title:</label> | |
<input type="text" name="position" class="form-control" placeholder="Managing Partner" required/> | |
</div> | |
<div class="mb-3"> | |
<label for="phonepretty" class="form-label">Work Phone Number:</label> | |
<input type="tel" name="phonepretty" class="form-control" placeholder="402.238.8366" /> | |
</div> | |
<input type="submit" value="Submit me!" class="btn btn-primary" /> | |
</form> | |
</div> | |
</div> | |
</div> | |
</section> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script> | |
</body> | |
</html> | |
<?php ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment