diff --git a/colors.php b/colors.php index bdc285a..c273188 100644 --- a/colors.php +++ b/colors.php @@ -4,6 +4,7 @@ 'white' => "#FFFFFF", 'background' => "#F3F6F8", 'text' => '#353535', + 'success' => '#007E65', 'error' => '#FF001F', 'link' => '#1282D6', 'border' => '#DCDCDE' diff --git a/components.php b/components.php index e93a3f3..58f75bc 100644 --- a/components.php +++ b/components.php @@ -7,7 +7,7 @@ function renderVerticalSpacer( $size = "20px" ) { - +
  
@@ -164,7 +164,6 @@ function renderUnorderedList( $list, $icon ) { } function renderItem( $itemTitle, $itemStatus, $itenStatusMessage, $itemDescription) { - $color = include("colors.php"); $title = renderBoldText( $itemTitle ); $status = renderBoldText( $itenStatusMessage, $itemStatus ); $description = renderRegularText( $itemDescription ); @@ -192,6 +191,27 @@ function renderItem( $itemTitle, $itemStatus, $itenStatusMessage, $itemDescripti return $item; } +function renderItemVariant( $itemTitle, $itemDescription, $itemStatus, $statusColor ) { + $title = renderBoldText( $itemTitle ); + $verticalSpacer = renderVerticalSpacer("0px"); + $horizontalRule = renderHorizontalRule(); + $description = renderRegularText( $itemDescription ); + $status = renderBoldText( $itemStatus, $statusColor ); + $manageSubscriptionButton = renderTextButton("Manage Subscription"); + + $itemVariant = << + $title
+ $description +

+ + $status $manageSubscriptionButton + EOD; + + return $itemVariant; +} + function renderPrimaryButton( $buttonCta ) { $color = include("colors.php"); diff --git a/expiring.php b/expiring.php new file mode 100644 index 0000000..47adb00 --- /dev/null +++ b/expiring.php @@ -0,0 +1,102 @@ + + + + + + + WordPress.com + + + + + + + + + + + + + " . renderRegularText("filippodt.wordpress.com") . ")", + ); + $button_cta = renderRegularText("Add another month for $3", $color["white"], "14px"); + $button = renderPrimaryButton( $button_cta ); + $manageSubscriptionButton = renderTextButton( "Manage subscription" ); + $verticalSpacer = renderVerticalSpacer( "40px" ); + $halfVerticalSpacer = renderVerticalSpacer( "20px" ); + $featureTitle = renderSecondaryTitle( "Don’t loose out" ); + $featureParagraph = "

" . renderRegularText("Please note that if you choose not to renew, these features will be removed from your site.") . "

"; + $featureList = renderUnorderedList( array( + 1 => renderRegularText("Ability to set filippodt.com as your primary address."), + 2 => renderRegularText("Remove WordPress.com ads from your site."), + 3 => renderRegularText("Access to live chat when you need immediate support."), + 4 => renderRegularText("Increased storage space for your photos, audio files, or videos."), + ), "warning"); + + $billingHistoryTitle = renderSecondaryTitle( "Billing history" ); + + $billingHistoryAccount = + renderBoldText( "Account" ) . "
" . + renderRegularText( "fditrapani" ) . "
" . + "" . renderRegularText("filippodt@gmail.com") . "" . "
" . + " " . renderRegularText( "Manage account" ) . ""; + + $billingHistoryReceipt = renderBoldText("Receipt") . "
" . + renderRegularText( "#19681643" ). "
" . + " " . renderRegularText( "View receipt" ) . ""; + + + $billingContent = renderTwoColumn( $billingHistoryAccount, $billingHistoryReceipt); + + $recentPurchaseTitle = renderSecondaryTitle("Recently renewed"); + $horizontalRule = renderHorizontalRule(); + $recentPurchaseDetails = renderItemVariant( + "filippodt.com", + ".com domain registration", + "Renewed for $20 on July 22, 2020", + $color['success'] ); + + $supportContent = renderSupport(); + + $content = << + + + $button + + + $manageSubscriptionButton + + + + $verticalSpacer + + $featureTitle + $featureParagraph + $featureList + $verticalSpacer + + $billingHistoryTitle + $billingContent + $halfVerticalSpacer + + $recentPurchaseTitle + $recentPurchaseDetails + $halfVerticalSpacer + + $supportContent + $halfVerticalSpacer + EOD; + + echo renderEmailTemplate( "Your plan is about to expire", $content ); + ?> + + \ No newline at end of file diff --git a/index.php b/index.php index dd675ef..076925f 100644 --- a/index.php +++ b/index.php @@ -21,7 +21,8 @@ '' . renderRegularText("Expired") . '' + 1 => '' . renderRegularText("Expired") . '', + 2 => '' . renderRegularText("Expiring") . '' ), "checkmark"); echo renderEmailTemplate( "Email templates", $listOfPages );