7 |
8 |
9 |
10 |
11 |
12 | Component Guide
13 | Hi there,
14 |
15 | Here's a quick guide to some of the built in components.
16 | Each component has it's own partials/components/<component_name>.hbs file and a corresponding _<component_name>.scss
17 |
18 |
19 | {{> divider }}
20 |
21 |
22 | Dividers
23 |
24 | {{> divider }}
25 |
26 | {{> divider }}
27 |
28 |
29 | Notices
30 |
31 | {{> notice type='info' text='Your Text Here' }}
32 |
33 | {{> notice type='info' text='Hello, this is a info notice.' }}
34 | {{> notice type='success' text='Hello, this is a success notice.' }}
35 | {{> notice type='warning' text='Hello, this is a warning notice.' }}
36 | {{> notice type='danger' text='Hello, this is a danger notice.' }}
37 |
38 | {{> divider }}
39 |
40 |
41 | Buttons
42 |
43 | {{> button type='primary' url='Absolute URL' title='Button Text Here' }}
44 |
45 | {{> button type='primary' url='https://github.com/leemunroe/grunt-email-workflow' title='Button (primary)' }}
46 | {{> button type='secondary' url='https://github.com/leemunroe/grunt-email-workflow' title='Button (secondary)' }}
47 |
48 | {{> divider }}
49 |
50 |
51 |
52 |
53 | {{> chart width='534' height='200' params='cht=lc&chd=s:cEAELFJHHHKUju9uuXUc&chco=76A4FB&chls=2.0,0.0,0.0&chxt=x,y&chxl=0:|0|1|2|3|4|5|1:|0|50|100&chg=20,50' alt='beautiful chart' }}
54 |
55 | {{> chart width='534' height='200' params='cht=lc&chd=s:cEAELFJHHHKUju9uuXUc&chco=76A4FB&chls=2.0,0.0,0.0&chxt=x,y&chxl=0:|0|1|2|3|4|5|1:|0|50|100&chg=20,50' alt='beautiful chart' }}
56 |
57 | {{> divider }}
58 |
59 | Feel free to use, copy, modify this email template as you wish.
60 | Thanks, have a lovely day.
61 | {{> follow_lee }}
62 | |
63 |
64 |
65 | |
66 |
67 |
68 |
77 |
--------------------------------------------------------------------------------
/preview/scss/_ui.scss:
--------------------------------------------------------------------------------
1 | .preview-interface-view {
2 |
3 | // Basic elements
4 | body {
5 | background: #fff;
6 | color: #333;
7 | font: normal 14px/1.4 Helvetica, Arial, Sans-serif;
8 | }
9 | a {
10 | color: #000;
11 | text-decoration: none;
12 |
13 | &:hover {
14 | color: #348eda;
15 | }
16 | }
17 | iframe {
18 | border: none;
19 | width: 100%;
20 | }
21 |
22 | // Header
23 | .header {
24 | box-shadow: 0 0 5px rgba(0,0,0,0.4);
25 | display: table;
26 | width: 100%;
27 | position: relative;
28 | z-index: 2;
29 |
30 | > div {
31 | display: table-cell;
32 | padding: 8px 20px;
33 | vertical-align: middle;
34 | }
35 | }
36 | .header--brand {
37 | font-size: 22px;
38 | }
39 | .header--select {
40 | text-align: right;
41 | }
42 |
43 | // Preview Screens
44 | .preview-ui--full,
45 | .preview-ui--mobile,
46 | .preview-ui--mobile__container {
47 | transition: margin all $drawer-animation-duration linear,
48 | padding all $drawer-animation-duration linear,
49 | width all $drawer-animation-duration linear,
50 | opaciy all $drawer-animation-duration linear;
51 | }
52 |
53 | .preview-ui {
54 | overflow: hidden;
55 | position: relative;
56 | z-index: 1;
57 | }
58 | .preview-ui--full {
59 | float: left;
60 | padding-right: 500px;
61 | width: 100%;
62 | }
63 | .preview-ui--mobile {
64 | background: #333;
65 | float: right;
66 | width: 500px;
67 | margin-left: -500px;
68 | position: relative;
69 | text-align: center;
70 |
71 | iframe {
72 | border: 3px solid #efefef;
73 | width: 320px;
74 | height: 461px;
75 | margin: 129px 0 0 23px;
76 | }
77 | }
78 | .preview-ui--mobile__container {
79 | background: transparent url(../img/phone.png) no-repeat 50% 0;
80 | background-size: 363px 711px;
81 | width: 363px;
82 | height: 711px;
83 | margin: 20px auto 0 auto;
84 | opacity: 1;
85 | text-align: left;
86 | }
87 |
88 | .preview-ui--mobile__toggle {
89 | cursor: pointer;
90 | position: absolute;
91 | left: 10px;
92 | top: 10px;
93 | width: 40px;
94 | height: 40px;
95 | z-index: 10;
96 | }
97 |
98 | // Layout elemnts when mobile drawer is hidden
99 | .mobile-drawer-hidden {
100 | .preview-ui--full {
101 | padding-right: 60px;
102 | }
103 | .preview-ui--mobile {
104 | width: 60px;
105 | margin-left: -60px;
106 | }
107 | .preview-ui--mobile__container {
108 | opacity: 0;
109 | }
110 | }
111 |
112 | // Drawer open toggle (phone)
113 | .toggle-drawer-open {
114 | background: transparent url(../img/phone-icon.png) no-repeat 50% 50%;
115 | background-size: 40px 40px;
116 | opacity: 0;
117 | transition: all $drawer-animation-duration ease-in-out;
118 | z-index: -1;
119 | }
120 | .mobile-drawer-hidden {
121 | .toggle-drawer-open {
122 | opacity: 1;
123 | z-index: 2;
124 |
125 | &:hover {
126 | opacity: 0.8;
127 | }
128 | }
129 | }
130 |
131 | // Drawer close toggle (x)
132 | .toggle-drawer-close {
133 | z-index: 1;
134 |
135 | &:hover {
136 | opacity: 0.8;
137 | }
138 |
139 | &:before,
140 | &:after {
141 | content: "";
142 | position: absolute;
143 | background: #fff;
144 | display: block;
145 | width: 4px;
146 | height: 40px;
147 | transition: all $drawer-animation-duration ease-in-out;
148 | }
149 | &:before {
150 | left: 18px;
151 | transform: rotate(45deg);
152 | }
153 | &:after {
154 | right: 18px;
155 | transform: rotate(-45deg);
156 | }
157 | }
158 | .mobile-drawer-hidden {
159 | .toggle-drawer-close {
160 | &:before,
161 | &:after {
162 | width: 1px;
163 | opacity: 0;
164 | transform: rotate(0deg);
165 | }
166 | &:before {
167 | left: 0;
168 | }
169 | &:after {
170 | right: 0;
171 | }
172 | }
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/src/data/hubspot.yml:
--------------------------------------------------------------------------------
1 | # Refer to http://designers.hubspot.com/docs/hubl/hubl-supported-variables
2 |
3 | # Required email template variables
4 | unsubscribe_link: "{{ unsubscribe_link }}"
5 | site_settings-company_city: "{{ site_settings.company_city }}"
6 | site_settings-company_name: "{{ company_name }}"
7 | site_settings-company_state: "{{ company_state }}"
8 | site_settings-company_street_address_1: "{{ company_street_address_1 }}"
9 |
10 | # Variables available in all templates
11 | account: "{{ account }}"
12 | company_domain: "{{ company_domain }}"
13 | contact: "{{ contact }}"
14 | content: "{{ content }}"
15 | content-absolute_url: "{{ content.absolute_url }}"
16 | content-archived: "{{ content.archived }}"
17 | content-author_email: "{{ content.author_email }}"
18 | content-author_name: "{{ content.author_name }}"
19 | content-author_username: "{{ content.author_username }}"
20 | content-campaign: "{{ content.campaign }}"
21 | content-campaign_name: "{{ content.campaign_name }}"
22 | content-created: "{{ content.created }}"
23 | content-meta_description: "{{ content.meta_description }}"
24 | content-name: "{{ content.name }}"
25 | content-publish_date: "{{ content.publish_date }}"
26 | content-publish_date_localized: "{{ content.publish_date_localized }}"
27 | content-template_path: "{{ content.template_path }}"
28 | content-updated: "{{ content.updated }}"
29 | content_id: "{{ content_id }}"
30 | eastern_dt: "{{ eastern_dt }}"
31 | favicon_link: "{{ favicon_link }}"
32 | hub_id: "{{ hub_id }}"
33 | hubspot_analytics_tracking_code: "{{ hubspot_analytics_tracking_code }}"
34 | local_dt: "{{ local_dt }}"
35 | local_time_zone: "{{ local_time_zone }}"
36 | page_meta-canonical_url: "{{ page_meta.canonical_url }}"
37 | page_meta-html_title: "{{ page_meta.html_title }}"
38 | page_meta-name: "{{ page_meta.name }}"
39 | portal_id: "{{ portal_id }}"
40 | request_contact: "{{ request_contact }}"
41 | site_settings: "{{ site_settings }}"
42 | year: "{{ year }}"
43 |
44 | # Color and font settings
45 | site_settings-background_color: "{{ site_settings.background_color }}"
46 | site_settings-body_border_color: "{{ site_settings.body_border_color }}"
47 | site_settings-body_border_color_choice: "{{ site_settings.body_border_color_choice }}"
48 | site_settings-body_color: "{{ site_settings.body_color }}"
49 | site_settings-color_picker_favorite_1: "{{ site_settings.color_picker_favorite_1 }}"
50 | site_settings-primary_accent_color: "{{ site_settings.primary_accent_color }}"
51 | site_settings-primary_font: "{{ site_settings.primary_font }}"
52 | site_settings-primary_font_color: "{{ site_settings.primary_font_color }}"
53 | site_settings-primary_font_size: "{{ site_settings.primary_font_size }}"
54 | site_settings-secondary_accent_color: "{{ site_settings.secondary_accent_color }}"
55 | site_settings-secondary_font: "{{ site_settings.secondary_font }}"
56 | site_settings-secondary_font_color: "{{ site_settings.secondary_font_color }}"
57 | site_settings-secondary_font_size: "{{ site_settings.secondary_font_size }}"
58 |
59 | # Email variables
60 | background_color: "{{ background_color }}"
61 | body_border_color: "{{ body_border_color }}"
62 | body_border_color_choice: "{{ body_border_color_choice }}"
63 | body_color: "{{ body_color }}"
64 | content-create_page: "{{ content.create_page }}"
65 | content-email_body: "{{ content.email_body }}"
66 | content-emailbody_plaintext: "{{ content.emailbody_plaintext }}"
67 | content-from_name: "{{ content.from_name }}"
68 | content-reply_to: "{{ content.reply_to }}"
69 | content-subject: "{{ content.subject }}"
70 | email_body_border_css: "{{ email_body_border_css }}"
71 | email_body_padding: "{{ email_body_padding }}"
72 | email_body_width: "{{ email_body_width }}"
73 | primary_accent_color: "{{ primary_accent_color }}"
74 | primary_font: "{{ primary_font }}"
75 | primary_font_color: "{{ primary_font_color }}"
76 | primary_font_size: "{{ primary_font_size }}"
77 | primary_font_size_num: "{{ primary_font_size_num }}"
78 | secondary_accent_color: "{{ secondary_accent_color }}"
79 | secondary_font: "{{ secondary_font }}"
80 | secondary_font_color: "{{ secondary_font_color }}"
81 | secondary_font_size_num: "{{ secondary_font_size_num }}"
82 | site_settings-company_street_address_2: "{{ site_settings.company_street_address_2 }}"
83 | site_settings-office_location_name: "{{ site_settings.office_location_name }}"
84 | subscription_confirmation_url: "{{ subscription_confirmation_url }}"
85 | subscription_name: "{{ subscription_name }}"
86 | unsubscribe_anchor: "{{ unsubscribe_anchor }}"
87 | unsubscribe_link_all: "{{ unsubscribe_link_all }}"
88 | unsubscribe_section: "{{ unsubscribe_section }}"
89 | view_as_page_section: "{{ view_as_page_section }}"
90 | view_as_page_url: "{{ view_as_page_url }}"
--------------------------------------------------------------------------------
/preview/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |