diff --git a/docs/_data/nav.yml b/docs/_data/nav.yml index 9c656bd8b6..5ed9e0f993 100755 --- a/docs/_data/nav.yml +++ b/docs/_data/nav.yml @@ -1,7 +1,7 @@ # URLs below should be exactly the same as real paths. Just follow examples… - title: Product url: product/guidelines/using-stacks/ - sublinks: + sublinks: - title: Guidelines subsublinks: - title: Using Stacks @@ -103,11 +103,31 @@ url: email/best-practices - title: FAQ url: email/faq - - title: Elements + - title: Templates + subsublinks: + - title: Short Transactional + url: email/templates/short-transactional + - title: Long Transactional + url: email/templates/long-transactional + - title: Promotional + url: email/templates/promotional + - title: Base subsublinks: - - title: Templates - url: email/templates - - title: Components - url: email/components - - title: Patterns - url: email/patterns + - title: Border Radius + url: email/base/border-radius + - title: Outlook Conditional CSS + url: email/base/mso + - title: Responsiveness + url: email/base/responsive + - title: Typography + url: email/base/typography + - title: Components + subsublinks: + - title: Buttons + url: email/components/buttons + - title: Images + url: email/components/images + - title: Tags + url: email/components/tags + - title: Team Identification + url: email/components/team-identification diff --git a/docs/_includes/notice-email-head-support.html b/docs/_includes/notice-email-head-support.html new file mode 100644 index 0000000000..f7e35ea5ee --- /dev/null +++ b/docs/_includes/notice-email-head-support.html @@ -0,0 +1,6 @@ +
+
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" %}
+
+ Note: Only email clients that support <style> in <head> will render this. +
+
\ No newline at end of file diff --git a/docs/_includes/notice-email-master-templates.html b/docs/_includes/notice-email-master-templates.html new file mode 100644 index 0000000000..4690d80769 --- /dev/null +++ b/docs/_includes/notice-email-master-templates.html @@ -0,0 +1,6 @@ +
+
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" %}
+
+ Note: If an email inherits from a master template (eg. _Stacks-Layout.Html.cshtml), only the middle part of the template is needed (the <head>, logo, and footer are automatically included). Each template includes <!-- EMAIL BODY : BEGIN --> and <!-- EMAIL BODY : END --> markers indicating this middle section. +
+
\ No newline at end of file diff --git a/docs/_includes/notice-unset.html b/docs/_includes/notice-unset.html index 60b341bdbf..b22c6032de 100644 --- a/docs/_includes/notice-unset.html +++ b/docs/_includes/notice-unset.html @@ -1,5 +1,5 @@
-
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" aria-hidden="true" class="svg-icon iconAlert" %}
+
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" %}
Note: The unset property is a combination property that resets a property to its inherited value. It behaves like the inherit and the initial keywords, but it properly selects the right value for you. Unfortunately, unset is not fully supported in Internet Explorer. Because of this all unset values have the correct inherit or initial value applied.
diff --git a/docs/email/base/border-radius.html b/docs/email/base/border-radius.html new file mode 100644 index 0000000000..0b1ae2c06c --- /dev/null +++ b/docs/email/base/border-radius.html @@ -0,0 +1,149 @@ +--- +layout: page +title: Border Radius +description: Border radius classes are provided as a progressive enhancement to email containers. The border radius on containers are removed at smaller breakpoints, once the width of the container matches the width of its viewport. +--- + + +
+ {% header {element: 'h2', text: 'Border Radius Classes'} %} + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassOutputUse Case
.barborder-radius: 5px;Rounding all four corners of a simple email.
.btrborder-top-left-radius: 5px;
border-top-right-radius: 5px;
Rounding the top corners of a complex promotional email in one location…
.bbrborder-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
…and rounding the bottom corners in another location.
+
+{% highlight html linenos %} + + + ... + + + + +{% endhighlight %} +
+ + +
+ +
+
+

Round corners in wide viewports.

+

Square corners in narrow viewports.

+
+ Works on Foreground Images Too +
+
+ +
+
+ {% include notice-email-head-support.html %} +
+ diff --git a/docs/email/base/mso.html b/docs/email/base/mso.html new file mode 100644 index 0000000000..015b859afb --- /dev/null +++ b/docs/email/base/mso.html @@ -0,0 +1,183 @@ +--- +layout: page +title: Outlook Conditional CSS +description: Windows Outlook 2003 and above use Microsoft Word as a rendering engine, which can lead to some weird rendering issues. Outlook conditional comments allow us to add bits of HTML that are only read by the Word-based versions of Outlook. +--- + + +
+ {% header {element: 'h2', text: 'Basic Syntax'} %} +

+ We can use MSO (Microsoft Office) tags to add HTML / CSS anywhere in an email template. This code will be ignored by other email clients. Here’s what it looks like: +

+
+{% highlight html linenos %} + +{% endhighlight %} +
+

+ Only Outlook will render this table. +

+

+ MSO tags can also be used to add styles targeting Outlook (Outlook supports CSS in the <head>): +

+
+{% highlight html linenos %} + +{% endhighlight %} +
+

+ It’s the same thing we used to do to target old versions of Internet Explorer, except it targets Microsoft Office. +

+
+
+ {% header {element: 'h2', text: 'Ghost Tables'} %} +

+ The main way we use MSO tags in our emails is to create “ghost tables” so hybrid emails don’t fall apart in Outlook. Hybrid design uses inline-block, max-width, min-width to stack table columns. Outlook doesn’t support these CSS properties, so we use MSO tags to create “ghost tables” that apply a fixed width just for Outlook. +

+
+{% highlight html linenos %} + +
+ Outlook can’t render the CSS in this DIV but other email clients can, + so we wrap this in a ghost table that replicates the DIV’s desktop style. + In this case, a container 340px wide. +
+ +{% endhighlight %} +
+

+ Without the ghost table above, Outlook would display the <div> at 100% width. Learn how we use ghost tables to make our emails responsive. +

+
+
+ {% header {element: 'h2', text: 'Targeting Specific Outlook Versions'} %} +

+ We usually target all versions of Outlook using <!--[if mso]>. But sometimes when testing emails in Litmus, an email looks ok in one Outlook version but is broken in another. It’s not common but it happens, and there are a few ways to target specific versions of Outlook while omitting others. +

+ {% header {element: 'h3', text: 'Outlook Versions'} %} +

+ Using Microsoft Office version numbers allows you to target a specific Outlook version. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Outlook Version(s)Code
+
+ All Windows Outlook + Most common +
<!--[if mso]> your code <![endif]-->
Outlook 2000<!--[if mso 9]> your code <![endif]-->
Outlook 2002<!--[if mso 10]> your code <![endif]-->
Outlook 2003<!--[if mso 11]> your code <![endif]-->
Outlook 2007<!--[if mso 12]> your code <![endif]-->
Outlook 2010<!--[if mso 14]> your code <![endif]-->
Outlook 2013<!--[if mso 15]> your code <![endif]-->
Outlook 2016<!--[if mso 16]> your code <![endif]-->
+
+
+
+ {% header {element: 'h3', text: 'Conditional Logic'} %} +

+ Using operators allows you to create conditional expressions for targeting multiple Outlook versions. +

+
+
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" %}
+
+ Note: We tend to keep our designs simple and don’t use these very often. They’re here if you need them every once in a while, but if you find yourself reaching for these often, please open an issue or ask us about it. +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeDescriptionExample
gtgreater than<!--[if gt mso 14]> Everything above Outlook 2010 <![endif]-->
ltless than<!--[if lt mso 14]> Everything below Outlook 2010 <![endif]-->
gtegreater than or equal to<!--[if gte mso 14]> Outlook 2010 and above <![endif]-->
lteless than or equal to<!--[if lte mso 14]> Outlook 2010 and below <![endif]-->
|or<!--[if (mso 12)|(mso 16)]> Outlook 2007 / 2016 only <![endif]-->
!not<!--[if !mso]><!--> All Outlooks will ignore this <!--<![endif]-->
+
+
\ No newline at end of file diff --git a/docs/email/base/responsive.html b/docs/email/base/responsive.html new file mode 100644 index 0000000000..2ca315822a --- /dev/null +++ b/docs/email/base/responsive.html @@ -0,0 +1,119 @@ +--- +layout: page +title: Responsiveness +description: All email templates use a hybrid approach to reconfigure the layout for different screen sizes in all email clients (regardless of media query support). Once a mobile-friendly baseline is set, media queries can be used to progressively enhance emails further in clients that support them. +--- + +
+ {% header {element: 'h2', text: 'Stacking Columns'} %} +

+ Media queries are a standard way to optimize layouts for small screen sizes on the web. In the email world, though, there are some “small screen scenarios” where media queries aren’t supported (eg. some Gmail Apps) or only partially supported (eg. some Android device native mail apps). +

+ {% header {element: 'h3', text: 'Hybrid Design'} %} +

+ Hybrid design uses inline-block, max-width, min-width, and ghost tables stack columns without media queries while imposing a fixed, desktop width for Outlook. +

+
+{% highlight html linenos %} + + + +
+ Column 1 +
+ +
+ Column 2 +
+ + + +{% endhighlight %} +
+

+ In this example, the two columns will display side-by-side on wide, desktop displays and stack on top of each other in narrow, mobile displays. The promotional email template uses this technique in a few places. +

+ {% header {element: 'h3', text: 'Media Queries'} %} +

+ Once a hybrid baseline is set, media queries can be used to fine-tune a responsive email layout. Since columns are (hopefully) already stacked, media queries can be used to change the width and text alignment in small viewports. +

+ + + + + + + + + + + + + + + + + +
ClassDescription
stack-columnMakes table columns 100% wide and stacks them in source order.
stack-column-centerMakes table columns 100% wide, stacks them in source order, and centers everything inside.
+ {% include notice-email-head-support.html %} +
+
+ {% header {element: 'h2', text: 'Responsive Spacing'} %} +

+ Default desktop padding for email templates is 30px. Utility classes can be used to reduce spacing to 20px on smaller viewports. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassOutput
.sm-ppadding: 20px;
.sm-ptpadding-top: 20px;
.sm-pbpadding-bottom: 20px;
.sm-prpadding-right: 20px;
.sm-plpadding-left: 20px;
.sm-pypadding-top: 20px; padding-bottom: 20px;
.sm-pxpadding-right: 20px; padding-left: 20px;
.sm-mbmargin-bottom: 20px;
+ {% include notice-email-head-support.html %} +
diff --git a/docs/email/base/typography.html b/docs/email/base/typography.html new file mode 100644 index 0000000000..8a23d9fe10 --- /dev/null +++ b/docs/email/base/typography.html @@ -0,0 +1,143 @@ +--- +layout: page +title: Typography +description: This page provides some common typography patterns for email, but anything on the main Stacks typography page is fair game. +--- +
+

+ It’s safe and accessible to use semantic HTML tags like <h>, <p>, and <ul> for text in email just as we do for the web. The main difference in email is that CSS should be written inline to specify intended styles (like the color of an <a href> tag) and zero out unintended defaults (like the margin around a <p> tag) +

+
+
+ {% header {element: 'h2', text: 'Paragraphs'} %} +
+{% highlight html linenos %} + +

A lead paragraph with slightly larger text lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nisi magna, mollis luctus sapien varius, mattis ornare est.

+

A regular paragraph with strong and italic text, consectetur adipiscing elit. Cras nisi magna, mollis luctus sapien varius, mattis ornare est. Sed non tincidunt erat, ut commodo augue.

+

A paragraph with no margin (useful for the last paragraph in a section).

+ +{% endhighlight %} +
+

A lead paragraph with slightly larger text lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nisi magna, mollis luctus sapien varius, mattis ornare est.

+

A regular paragraph with strong and italic text, consectetur adipiscing elit. Cras nisi magna, mollis luctus sapien varius, mattis ornare est. Sed non tincidunt erat, ut commodo augue.

+

A paragraph with no margin (useful for the last paragraph in a section).

+
+
+
+
+ {% header {element: 'h2', text: 'Headlines'} %} +
+{% highlight html linenos %} +

I’m a headline

+

I’m a subheadline

+{% endhighlight %} +
+

I’m a headline

+

I’m a subheadline

+
+
+
+
+ {% header {element: 'h2', text: 'Lists'} %} +
+{% highlight html linenos %} +
    +
  • You get a list item.
  • +
  • And you get a list item!
  • +
  • Everyone gets a list item!
  • +
+
    +
  1. You get a list item.
  2. +
  3. And you get a list item!
  4. +
  5. Everyone gets a list item!
  6. +
+{% endhighlight %} +
+
    +
  • You get a list item.
  • +
  • And you get a list item!
  • +
  • Everyone gets a list item!
  • +
+
    +
  1. You get a list item.
  2. +
  3. And you get a list item!
  4. +
  5. Everyone gets a list item!
  6. +
+
+
+
+
+ {% header {element: 'h2', text: 'Links'} %} +
+{% highlight html linenos %} +Go to the homepage +{% endhighlight %} + +
+ {% header {element: 'h3', text: 'Links in Markdown'} %} +

+ If email content is written in markdown, we can’t write inline CSS into link tags. Left unstyled, links will appear like this. To style links contained in markdown text, add a class="has-markdown" to any parent tag that might contain a markdown link. +

+
+{% highlight html linenos %} +

@_s("I’m a text string in markdown.")

+

@_m("I’m a *bold* [text link](https://www.stackoverflow.com) in markdown.")

+{% endhighlight %} +
+

I’m a text string in markdown.

+

I’m a bold text link in markdown.

+
+
+ +
+
{% svg /product/resources/svg-icons/Info.svg width="18" height="18" aria-hidden="true" %}
+
+ Note: Using class="has-markdown" applies styles defined in the <style> tag. Only email clients that support <style> in <head> will render has-markdown links properly. +
+
+ + {% header {element: 'h3', text: 'Auto-detected links'} %} +

+ Some email clients auto-detect certain text strings (like dates, times, and locations) and automatically convert them into hyperlinks. We can’t remove the link, but we can make the link appear like the text around it by negating a few CSS styles. +

+
+{% highlight html linenos %} +

On Thursday we’ll be doing on planned maintenance on our New York server, so the parts of the site might be unavailable.

+

On Thursday we’ll be doing on planned maintenance on our New York server, so the parts of the site might be unavailable.

+{% endhighlight %} +
+

On Thursday we’ll be doing on planned maintenance on our New York server, so the parts of the site might be unavailable.

+

On Thursday we’ll be doing on planned maintenance on our New York server, so the parts of the site might be unavailable.

+
+
+ +
+
{% svg /product/resources/svg-icons/Info.svg width="18" height="18" aria-hidden="true" %}
+
+ Note: Using class="unstyle-auto-detected-links" applies styles defined in the <style> tag. Only email clients that support <style> in <head> will render has-markdown links properly. +
+
+
+
+ + {% header {element: 'h2', text: 'Preventing Text Wrapping'} %} +

+ A non-breaking space (&nbsp;) can be used to prevent a group of words from breaking onto multiple lines. Useful for keeping names together and preventing typographic orphans and widows. +
Inspect the line above to see ☝️ +

+
+{% highlight html linenos %} +

Now with Stack Overflow you can level up.

+

The last sentence shouldn’t produce an orphan.

+

@_m("Also works for text written in$nbsp$markdown.", new { nbsp = " ".AsRawHtml() })

+{% endhighlight %} +
+

Now with Stack Overflow you can level up.

+

The last sentence shouldn’t produce an orphan.

+

Also works for text written in markdown.

+
+
+
\ No newline at end of file diff --git a/docs/email/components/buttons.html b/docs/email/components/buttons.html new file mode 100644 index 0000000000..b0344d1cd2 --- /dev/null +++ b/docs/email/components/buttons.html @@ -0,0 +1,71 @@ +--- +layout: page +title: Buttons +description: Creating a button successfully in email requires multiple html tags to progressively enhance and prevent text-decoration in certain email clients. +--- + + +
+ {% header {element: 'h2', text: 'Primary'} %} +

+ A visual style used to highlight the most important actions. To avoid confusing users, don’t use more than one primary button within an email. +

+
+{% highlight html linenos %} + + + ... + + +{% endhighlight %} + +
+
+
+ {% header {element: 'h2', text: 'White'} %} +

+ A visual style used to highlight the most important actions on a dark background. To avoid confusing users, don’t use more than one white button within an email. +

+
+{% highlight html linenos %} + + + ... + + +{% endhighlight %} + +
+
+
+ {% header {element: 'h2', text: 'Outlined'} %} +

+ All buttons, by default, are secondary buttons. +

+
+{% highlight html linenos %} + + + ... + + +{% endhighlight %} + +
+ +
+
{% svg /product/resources/svg-icons/Info.svg width="18" height="18" aria-hidden="true" %}
+
+ Note: Using the s-btn class with s-btn__primary, s-btn__white or s-btn__outlined applies :hover progressive enhancements defined in the <style> tag. Only email clients that support <style> in <head> will render the :hover. +
+
+
diff --git a/docs/email/components/images.html b/docs/email/components/images.html new file mode 100644 index 0000000000..4e5490951c --- /dev/null +++ b/docs/email/components/images.html @@ -0,0 +1,208 @@ +--- +layout: page +title: Images +description: +--- + + +
+ {% header {element: 'h2', text: 'Foreground Images'} %} +

+ All email clients can display .png, .gif, and .jpg images displayed with the <img> tag. .svg images are not well supported, regardless of how they’re referenced, so avoid using these. +

+

+ Most images should be coded responsive by default, meaning they’ll scale down proportionately in small viewports. It’s safest to code all images this way, even if they don’t end up scaling in practice. However if we’re confident that an image will never scale, we can display a non-responsive image using less code. +

+ {% header {element: 'h3', text: 'Foreground Image Attributes'} %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeNotes
srcattributeAlways set and use full https:// reference.
widthattributeAlways set to intended desktop width.
heightattributeOptional. Use only for images that won’t scale.
borderattributeAlways set to 0 to avoid blue outlines on image links.
altattributeAlways include but can be left empty if image is ornamental (Eg. alt="").
widthinline CSS[Responsive] Always set to 100% for responsive images. Optional for static images.
max-widthinline CSS[Responsive] Always set to intended desktop width. Optional for static images.
heightinline CSS[Responsive] Always set to auto for responsive images. Optional for static images.
displayinline CSSGenerally good practice to use `display:block;` when possible since it negates a few pixels of unwanted space below images in some clients.
.g-imgclassAdvisable for images larger than ~300px wide. Prevents gmail from displaying an image download icon over images.
+ {% header {element: 'h3', text: 'Foreground Image Examples'} %} +
+{% highlight html linenos %} +/* Responsive */ +alt_text + +/* Static */ +alt_text +{% endhighlight %} +
+ alt_text +
+ alt_text +
+
+
+ + +
+ {% header {element: 'h2', text: 'Background Images'} %} +

+ Background images allow us to place additional HTML content on top of them, one of the few reliable ways to provide layering possibilities in email. A benefit of using background images over foreground images is, when paired with a background color, the HTML content on top of the background image remains accessible even when images are disabled. +

+

+ Background images can be complicated to implement in email, as many properties need to be defined once in CSS and again in VML for Windows Outlook and Win10 Mail. +

+ {% header {element: 'h3', text: 'Background Image Attributes'} %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeNotes
background-imageinline CSSAlways set and use full https:// reference.
background-positioninline CSSOptional to set the size of the image.
background-sizeinline CSSOptional to set the position of the image.
background-colorinline CSSAlways set to make foreground HTML legible if background image doesn’t load.
widthVML in <v:rect>Always set to full container width. VML doesn’t account for padding, adjust as necessary.
heightVML in <v:rect>Always set to full container height. VML doesn’t account for padding, adjust as necessary.
srcVML in <v:fill>Always set and use full https:// reference.
color (background color)VML in <v:fill>Always set to make foreground HTML legible if background image doesn’t load.
+ {% header {element: 'h3', text: 'Background Image Examples'} %} +
+{% highlight html linenos %} + + +
+ + + + + +
+ Foreground HTML content. +
+ +
+ + +{% endhighlight %} +
+ + + + +
+
+ + + + + +
+ Foreground HTML content. +
+ +
+
+
+
+
+
{% svg /product/resources/svg-icons/Info.svg width="18" height="18" aria-hidden="true" %}
+
+ Note: Windows Outlook and Win10 Mail cannot scale background images, so the image referenced in VML should be prepared @1x. Most other email clients can scale background images defined in CSS, so using @2x images is advisable. +
+
+
diff --git a/docs/email/components/tags.html b/docs/email/components/tags.html new file mode 100644 index 0000000000..c03baaa926 --- /dev/null +++ b/docs/email/components/tags.html @@ -0,0 +1,37 @@ +--- +layout: page +title: Tags +description: Tags are interface elements that allow users to organize and discover related information throughout Stack Overflow. +--- + + +
+

+ Questions, jobs, and candidates can be tagged with up to 5 tags. Individual tags should not break onto multiple lines, though a list of tags can. +

+
+
+ {% header {element: 'h2', text: 'Examples'} %} +
+{% highlight html linenos %} + + tag-name + tag + another-tag-name + +{% endhighlight %} + +
+
+
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" %}
+
+ Note: Using the s-tag class applies :hover progressive enhancements defined in the <style> tag. Only email clients that support <style> in <head> will render the :hover. +
+
+
diff --git a/docs/email/components/team-identification.html b/docs/email/components/team-identification.html new file mode 100644 index 0000000000..51c087f41d --- /dev/null +++ b/docs/email/components/team-identification.html @@ -0,0 +1,57 @@ +--- +layout: page +title: Team Identification +description: Emails coming from a private Team should be clearly labeled. +--- +
+ {% header {element: 'h2', text: 'Example'} %} +

Team Icon and Names should be placed in a prominent place to identify the private Team an email is referencing. If spacing is tight, an icon-only version is also available.

+
+
{% svg /product/resources/svg-icons/Alert.svg width="18" height="18" aria-hidden="true" %}
+
+ Note: An email should only contain content from one Team. A Team’s content should never appear mixed alongside with content from another Team or public content in a single email. +
+
+
+{% highlight html linenos %} + + + + + + + +
+ T + + Team Name +
+{% endhighlight %} +
+ + + + + +
+ T + + Team Name +
+
+ + + + +
+ T +
+
+
+
+
{% svg /product/resources/svg-icons/Info.svg width="18" height="18" aria-hidden="true" %}
+
+ Note: The color should match the Team’s Theme Color as defined in their Display Settings (eg. https://stackoverflow.com/c/team-name/admin/settings/theme) on Stack Overflow or Stack Overflow for Enterprise. +
+
+
diff --git a/docs/email/faq.html b/docs/email/faq.html index 2ded615586..2a8fc58e7b 100644 --- a/docs/email/faq.html +++ b/docs/email/faq.html @@ -59,7 +59,7 @@
{% header {element: 'h2', text: 'How do margin and padding work in email?'} %}

- Use margin block-level typography tags like <h>, <p>, <ul>, and <li>... and use padding on <td>’s. + Use margin block-level typography tags like <h>, <p>, <ul>, and <li>... and use padding on <td>s.

Outlook only honors margins on typography tags, and only honors padding on <td> tags. Its interpretation of spacing on other tags like <table>, <div>, and <img> tags is sketchy, so it’s best to avoid spacing with those. diff --git a/docs/email/index.html b/docs/email/index.html index bc71abdca9..cc718df827 100644 --- a/docs/email/index.html +++ b/docs/email/index.html @@ -9,25 +9,22 @@

Templates

Starting points for creating new emails.

-
- View all templates -
- + short transactional preview

Short Transactional

-

Great for emails with a single message like 'Forgot password', 'You’ve been removed from a Team', or 'Cart abandonment'.

+

Great for emails with a single message like “Forgot password”, “You’ve been removed from a Team”, or “Cart abandonment”.

- + long transactional preview

Long Transactional

-

For complex emails that could contain multiple messages like 'Your answer was accepted', 'New Interests', or 'Tag digest'.

+

For complex emails that could contain multiple messages like “Your answer was accepted”, “New Interests”, or “Tag digest”.

- + promotional preview

Promotional

-

Major announcements worthy of grabbing attention or celebrating, like a product launch, 'Welcome to Talent', or 'You've reached 10k rep'.

+

Major announcements worthy of grabbing attention or celebrating, like a product launch, “Welcome to Talent”, or “You’ve reached 10k rep”.

@@ -38,22 +35,22 @@

Customizing Email

Tools to create more custom emails.

- +
one puzzle piece
- - +
+
puzzle pieces
diff --git a/docs/email/templates.html b/docs/email/templates.html deleted file mode 100644 index cc31d27cf1..0000000000 --- a/docs/email/templates.html +++ /dev/null @@ -1,295 +0,0 @@ ---- -layout: page-nomenu -title: Email Templates -description: A few starter templates that allow us to create consistently designed, properly rendered emails. ---- -
- {% header {element: 'h2', text: 'Templates'} %} -
-
-

Stacks provides 3 starter templates. Each template is explained below, detailing how and when to use them.

-
    -
  1. Short Transactional
  2. -
  3. Long Transactional
  4. -
  5. Promotional
  6. -
-
-
-
-
{% svg /product/resources/svg-icons/Help.svg width="18" height="18" aria-hidden="true" class="svg-icon iconHelp" %}
-
- Note: If an email inherits from a master template (eg. _Stacks-Layout.Html.cshtml), only the middle part of the template is needed (the <head>, logo, and footer are automatically included). Each template includes <!-- EMAIL BODY : BEGIN --> and <!-- EMAIL BODY : END --> markers indicating this middle section. -
-
-
-
-
-
- {% header {element: 'h2', text: 'Short Transactional'} %} -

- A starting point for simple transactional emails with a single message. -

-
-
-

- {% svg /product/resources/svg-icons/Checkmark.svg width="18" height="18" aria-hidden="true" class="svg-icon iconCheckmark mr4" %} Good For: -

-

Simple transactions that include a short message, such as:

-
    -
  • Forgot password
  • -
  • You’ve been removed from a Team
  • -
  • Cart abandonment
  • -
  • We’ve updated our privacy policy
  • -
-
-
-

- {% svg /product/resources/svg-icons/Clear.svg width="18" height="18" aria-hidden="true" class="svg-icon iconClear mr4" %} Not So Good For: -

-

Lengthy transactions that include multiple messages, lists or one time announcements, such as:

-
    -
  • Your answer has been accepted!
  • -
  • New featured jobs
  • -
  • Weekly recommendations
  • -
  • New application
  • -
-
-
- -
- -
- -
- -
- {% header {element: 'h2', text: 'Long Transactional'} %} -

- A starting point for more complex transactional emails that could contain multiple messages. -

-
-
-

- {% svg /product/resources/svg-icons/Checkmark.svg width="18" height="18" aria-hidden="true" class="svg-icon iconCheckmark mr4" %} Good For: -

-

Complex transactions that include multiple messages or lists, such as:

-
    -
  • Your answer was accepted
  • -
  • You’ve been added to a Team
  • -
  • New Interests
  • -
  • Tag digest
  • -
-
-
-

- {% svg /product/resources/svg-icons/Clear.svg width="18" height="18" aria-hidden="true" class="svg-icon iconClear mr4" %} Not So Good For: -

-

Simple transactions that include a short message or one time announcements, such as:

-
    -
  • Account deactivated
  • -
  • New message from employer
  • -
  • Product announcement
  • -
  • You have an unused search subscription
  • -
-
-
- -
- -
- -
- -
- {% header {element: 'h2', text: 'Promotional'} %} -

- Starter for emails with a major announcement. -

-
-
-

- {% svg /product/resources/svg-icons/Checkmark.svg width="18" height="18" aria-hidden="true" class="svg-icon iconCheckmark mr4" %} Good For: -

-

One time announcements that are worthy of grabbing attention/celebrating, such as:

-
    -
  • Product launch
  • -
  • Welcome to Teams
  • -
  • Welcome to Talent
  • -
  • You’ve reached 10k reputation
  • -
-
-
-

- {% svg /product/resources/svg-icons/Clear.svg width="18" height="18" aria-hidden="true" class="svg-icon iconClear mr4" %} Not So Good For: -

-

Emails that a user may receive multiple times or emails with a negative connotation, such as:

-
    -
  • New answers
  • -
  • Job recommendations
  • -
  • Out-of-region applicants
  • -
  • Your admin privileges have been removed
  • -
-
-
- -
- -
-
- - diff --git a/docs/email/templates/Logo@2x.png b/docs/email/templates/code/Logo@2x.png similarity index 100% rename from docs/email/templates/Logo@2x.png rename to docs/email/templates/code/Logo@2x.png diff --git a/docs/email/templates/LogoSm@2x.png b/docs/email/templates/code/LogoSm@2x.png similarity index 100% rename from docs/email/templates/LogoSm@2x.png rename to docs/email/templates/code/LogoSm@2x.png diff --git a/docs/email/templates/illo-128-1.png b/docs/email/templates/code/illo-128-1.png similarity index 100% rename from docs/email/templates/illo-128-1.png rename to docs/email/templates/code/illo-128-1.png diff --git a/docs/email/templates/illo-128-2.png b/docs/email/templates/code/illo-128-2.png similarity index 100% rename from docs/email/templates/illo-128-2.png rename to docs/email/templates/code/illo-128-2.png diff --git a/docs/email/templates/illo-64-1.png b/docs/email/templates/code/illo-64-1.png similarity index 100% rename from docs/email/templates/illo-64-1.png rename to docs/email/templates/code/illo-64-1.png diff --git a/docs/email/templates/illo-scene-1.png b/docs/email/templates/code/illo-scene-1.png similarity index 100% rename from docs/email/templates/illo-scene-1.png rename to docs/email/templates/code/illo-scene-1.png diff --git a/docs/email/templates/code/promotional.html b/docs/email/templates/code/promotional.html new file mode 100644 index 0000000000..bbd598ab7b --- /dev/null +++ b/docs/email/templates/code/promotional.html @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ (Optional) This text will appear in the inbox preview, but not the email body. It can be used to supplement the email subject line or even summarize the email's contents. Extended text preheaders (~490 characters) seems like a better UX for anyone using a screenreader or voice-command apps like Siri to dictate the contents of an email. If this text is not included, email clients will automatically populate it using the text (including image alt text) at the start of the email's body. +
+ + + + +
+ + \ No newline at end of file diff --git a/docs/email/templates/transactional-long.html b/docs/email/templates/code/transactional-long.html similarity index 100% rename from docs/email/templates/transactional-long.html rename to docs/email/templates/code/transactional-long.html diff --git a/docs/email/templates/transactional-short.html b/docs/email/templates/code/transactional-short.html similarity index 100% rename from docs/email/templates/transactional-short.html rename to docs/email/templates/code/transactional-short.html diff --git a/docs/email/templates/long-transactional.html b/docs/email/templates/long-transactional.html new file mode 100644 index 0000000000..8083549d4b --- /dev/null +++ b/docs/email/templates/long-transactional.html @@ -0,0 +1,92 @@ +--- +layout: page-nomenu +title: Long Transactional Template +description: A starter template for more complex transactional emails that could contain multiple messages. +--- +
+
+
+

+ {% svg /product/resources/svg-icons/Checkmark.svg width="18" height="18" aria-hidden="true" class="svg-icon iconCheckmark mr4" %} Good For: +

+

Complex transactions that include multiple messages or lists, such as:

+
    +
  • Your answer was accepted
  • +
  • You’ve been added to a Team
  • +
  • New Interests
  • +
  • Tag digest
  • +
+
+
+

+ {% svg /product/resources/svg-icons/Clear.svg width="18" height="18" aria-hidden="true" class="svg-icon iconClear mr4" %} Not So Good For: +

+

Simple transactions that include a short message or one time announcements, such as:

+
    +
  • Account deactivated
  • +
  • New message from employer
  • +
  • Product announcement
  • +
  • You have an unused search subscription
  • +
+
+ {% include notice-email-master-templates.html %} +
+ +
+ +
+
+ + diff --git a/docs/email/templates/promotional.html b/docs/email/templates/promotional.html index 21e571964d..533e8e973a 100644 --- a/docs/email/templates/promotional.html +++ b/docs/email/templates/promotional.html @@ -1,581 +1,92 @@ - - - - - - - - - - - - - - - - - - - - -
- - - -
- (Optional) This text will appear in the inbox preview, but not the email body. It can be used to supplement the email subject line or even summarize the email's contents. Extended text preheaders (~490 characters) seems like a better UX for anyone using a screenreader or voice-command apps like Siri to dictate the contents of an email. If this text is not included, email clients will automatically populate it using the text (including image alt text) at the start of the email's body. +--- +layout: page-nomenu +title: Promotional Template +description: A starter template for emails with a major announcement. +--- +
+
+
+

+ {% svg /product/resources/svg-icons/Checkmark.svg width="18" height="18" aria-hidden="true" class="svg-icon iconCheckmark mr4" %} Good For: +

+

One time announcements that are worthy of grabbing attention/celebrating, such as:

+
    +
  • Product launch
  • +
  • Welcome to Teams
  • +
  • Welcome to Talent
  • +
  • You’ve reached 10k reputation
  • +
- - -
- - \ No newline at end of file + {% include notice-email-master-templates.html %} +
+ +
+ +
+ + + diff --git a/docs/email/templates/short-transactional.html b/docs/email/templates/short-transactional.html new file mode 100644 index 0000000000..8c5bfbdda3 --- /dev/null +++ b/docs/email/templates/short-transactional.html @@ -0,0 +1,94 @@ +--- +layout: page-nomenu +title: Short Transactional Template +description: A starter template for simple transactional emails with a single message. +--- + +
+
+
+

+ {% svg /product/resources/svg-icons/Checkmark.svg width="18" height="18" aria-hidden="true" class="svg-icon iconCheckmark mr4" %} Good For: +

+

Simple transactions that include a short message, such as:

+
    +
  • Forgot password
  • +
  • You’ve been removed from a Team
  • +
  • Cart abandonment
  • +
  • We’ve updated our privacy policy
  • +
+
+
+

+ {% svg /product/resources/svg-icons/Clear.svg width="18" height="18" aria-hidden="true" class="svg-icon iconClear mr4" %} Not So Good For: +

+

Lengthy transactions that include multiple messages, lists or one time announcements, such as:

+
    +
  • Your answer has been accepted!
  • +
  • New featured jobs
  • +
  • Weekly recommendations
  • +
  • New application
  • +
+
+ {% include notice-email-master-templates.html %} +
+ +
+ +
+
+ + +