BaseWithHeaderEmailLayout.coffee 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. _ = require("underscore")
  2. settings = require "settings-sharelatex"
  3. module.exports = _.template """
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  5. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="Margin: 0; background: #f6f6f6 !important; margin: 0; min-height: 100%; padding: 0;">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  9. <meta name="viewport" content="width=device-width">
  10. <style>.avoid-auto-linking a,
  11. .avoid-auto-linking a[href] {
  12. color: #a93529 !important;
  13. text-decoration: none !important;
  14. -moz-hyphens: none;
  15. -ms-hyphens: none;
  16. -webkit-hyphens: none;
  17. hyphens: none; }
  18. .avoid-auto-linking a:visited,
  19. .avoid-auto-linking a[href]:visited {
  20. color: #a93529; }
  21. .avoid-auto-linking a:hover,
  22. .avoid-auto-linking a[href]:hover {
  23. color: #80281f; }
  24. .avoid-auto-linking a:active,
  25. .avoid-auto-linking a[href]:active {
  26. color: #80281f; }
  27. @media only screen {
  28. html {
  29. min-height: 100%;
  30. background: #f6f6f6;
  31. }
  32. }
  33. @media only screen and (max-width: 596px) {
  34. .small-float-center {
  35. margin: 0 auto !important;
  36. float: none !important;
  37. text-align: center !important;
  38. }
  39. .small-text-center {
  40. text-align: center !important;
  41. }
  42. .small-text-left {
  43. text-align: left !important;
  44. }
  45. .small-text-right {
  46. text-align: right !important;
  47. }
  48. }
  49. @media only screen and (max-width: 596px) {
  50. .hide-for-large {
  51. display: block !important;
  52. width: auto !important;
  53. overflow: visible !important;
  54. max-height: none !important;
  55. font-size: inherit !important;
  56. line-height: inherit !important;
  57. }
  58. }
  59. @media only screen and (max-width: 596px) {
  60. table.body table.container .hide-for-large,
  61. table.body table.container .row.hide-for-large {
  62. display: table !important;
  63. width: 100% !important;
  64. }
  65. }
  66. @media only screen and (max-width: 596px) {
  67. table.body table.container .callout-inner.hide-for-large {
  68. display: table-cell !important;
  69. width: 100% !important;
  70. }
  71. }
  72. @media only screen and (max-width: 596px) {
  73. table.body table.container .show-for-large {
  74. display: none !important;
  75. width: 0;
  76. mso-hide: all;
  77. overflow: hidden;
  78. }
  79. }
  80. @media only screen and (max-width: 596px) {
  81. table.body img {
  82. width: auto;
  83. height: auto;
  84. }
  85. table.body center {
  86. min-width: 0 !important;
  87. }
  88. table.body .container {
  89. width: 95% !important;
  90. }
  91. table.body .columns,
  92. table.body .column {
  93. height: auto !important;
  94. -moz-box-sizing: border-box;
  95. -webkit-box-sizing: border-box;
  96. box-sizing: border-box;
  97. padding-left: 16px !important;
  98. padding-right: 16px !important;
  99. }
  100. table.body .columns .column,
  101. table.body .columns .columns,
  102. table.body .column .column,
  103. table.body .column .columns {
  104. padding-left: 0 !important;
  105. padding-right: 0 !important;
  106. }
  107. table.body .collapse .columns,
  108. table.body .collapse .column {
  109. padding-left: 0 !important;
  110. padding-right: 0 !important;
  111. }
  112. td.small-1,
  113. th.small-1 {
  114. display: inline-block !important;
  115. width: 8.33333% !important;
  116. }
  117. td.small-2,
  118. th.small-2 {
  119. display: inline-block !important;
  120. width: 16.66667% !important;
  121. }
  122. td.small-3,
  123. th.small-3 {
  124. display: inline-block !important;
  125. width: 25% !important;
  126. }
  127. td.small-4,
  128. th.small-4 {
  129. display: inline-block !important;
  130. width: 33.33333% !important;
  131. }
  132. td.small-5,
  133. th.small-5 {
  134. display: inline-block !important;
  135. width: 41.66667% !important;
  136. }
  137. td.small-6,
  138. th.small-6 {
  139. display: inline-block !important;
  140. width: 50% !important;
  141. }
  142. td.small-7,
  143. th.small-7 {
  144. display: inline-block !important;
  145. width: 58.33333% !important;
  146. }
  147. td.small-8,
  148. th.small-8 {
  149. display: inline-block !important;
  150. width: 66.66667% !important;
  151. }
  152. td.small-9,
  153. th.small-9 {
  154. display: inline-block !important;
  155. width: 75% !important;
  156. }
  157. td.small-10,
  158. th.small-10 {
  159. display: inline-block !important;
  160. width: 83.33333% !important;
  161. }
  162. td.small-11,
  163. th.small-11 {
  164. display: inline-block !important;
  165. width: 91.66667% !important;
  166. }
  167. td.small-12,
  168. th.small-12 {
  169. display: inline-block !important;
  170. width: 100% !important;
  171. }
  172. .columns td.small-12,
  173. .column td.small-12,
  174. .columns th.small-12,
  175. .column th.small-12 {
  176. display: block !important;
  177. width: 100% !important;
  178. }
  179. table.body td.small-offset-1,
  180. table.body th.small-offset-1 {
  181. margin-left: 8.33333% !important;
  182. Margin-left: 8.33333% !important;
  183. }
  184. table.body td.small-offset-2,
  185. table.body th.small-offset-2 {
  186. margin-left: 16.66667% !important;
  187. Margin-left: 16.66667% !important;
  188. }
  189. table.body td.small-offset-3,
  190. table.body th.small-offset-3 {
  191. margin-left: 25% !important;
  192. Margin-left: 25% !important;
  193. }
  194. table.body td.small-offset-4,
  195. table.body th.small-offset-4 {
  196. margin-left: 33.33333% !important;
  197. Margin-left: 33.33333% !important;
  198. }
  199. table.body td.small-offset-5,
  200. table.body th.small-offset-5 {
  201. margin-left: 41.66667% !important;
  202. Margin-left: 41.66667% !important;
  203. }
  204. table.body td.small-offset-6,
  205. table.body th.small-offset-6 {
  206. margin-left: 50% !important;
  207. Margin-left: 50% !important;
  208. }
  209. table.body td.small-offset-7,
  210. table.body th.small-offset-7 {
  211. margin-left: 58.33333% !important;
  212. Margin-left: 58.33333% !important;
  213. }
  214. table.body td.small-offset-8,
  215. table.body th.small-offset-8 {
  216. margin-left: 66.66667% !important;
  217. Margin-left: 66.66667% !important;
  218. }
  219. table.body td.small-offset-9,
  220. table.body th.small-offset-9 {
  221. margin-left: 75% !important;
  222. Margin-left: 75% !important;
  223. }
  224. table.body td.small-offset-10,
  225. table.body th.small-offset-10 {
  226. margin-left: 83.33333% !important;
  227. Margin-left: 83.33333% !important;
  228. }
  229. table.body td.small-offset-11,
  230. table.body th.small-offset-11 {
  231. margin-left: 91.66667% !important;
  232. Margin-left: 91.66667% !important;
  233. }
  234. table.body table.columns td.expander,
  235. table.body table.columns th.expander {
  236. display: none !important;
  237. }
  238. table.body .right-text-pad,
  239. table.body .text-pad-right {
  240. padding-left: 10px !important;
  241. }
  242. table.body .left-text-pad,
  243. table.body .text-pad-left {
  244. padding-right: 10px !important;
  245. }
  246. table.menu {
  247. width: 100% !important;
  248. }
  249. table.menu td,
  250. table.menu th {
  251. width: auto !important;
  252. display: inline-block !important;
  253. }
  254. table.menu.vertical td,
  255. table.menu.vertical th,
  256. table.menu.small-vertical td,
  257. table.menu.small-vertical th {
  258. display: block !important;
  259. }
  260. table.menu[align="center"] {
  261. width: auto !important;
  262. }
  263. table.button.small-expand,
  264. table.button.small-expanded {
  265. width: 100% !important;
  266. }
  267. table.button.small-expand table,
  268. table.button.small-expanded table {
  269. width: 100%;
  270. }
  271. table.button.small-expand table a,
  272. table.button.small-expanded table a {
  273. text-align: center !important;
  274. width: 100% !important;
  275. padding-left: 0 !important;
  276. padding-right: 0 !important;
  277. }
  278. table.button.small-expand center,
  279. table.button.small-expanded center {
  280. min-width: 0;
  281. }
  282. }</style>
  283. </head>
  284. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#F6F6F6" style="-moz-box-sizing: border-box; -ms-text-size-adjust: 100%; -webkit-box-sizing: border-box; -webkit-text-size-adjust: 100%; Margin: 0; background: #f6f6f6 !important; box-sizing: border-box; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 1.3; margin: 0; min-height: 100%; min-width: 100%; padding: 0; text-align: left; width: 100% !important;">
  285. <!-- <span class="preheader"></span> -->
  286. <table class="body" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" style="Margin: 0; background: #f6f6f6 !important; border-collapse: collapse; border-spacing: 0; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; height: 100%; line-height: 1.3; margin: 0; min-height: 100%; padding: 0; text-align: left; vertical-align: top; width: 100%;">
  287. <tr style="padding: 0; text-align: left; vertical-align: top;">
  288. <td class="body-cell" align="center" valign="top" bgcolor="#F6F6F6" style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; background: #f6f6f6 !important; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; hyphens: auto; line-height: 1.3; margin: 0; padding: 0; padding-bottom: 20px; text-align: left; vertical-align: top; word-wrap: break-word;">
  289. <center data-parsed="" style="min-width: 580px; width: 100%;">
  290. <table align="center" class="wrapper header float-center" style="Margin: 0 auto; background: #fefefe; border-bottom: solid 1px #cfcfcf; border-collapse: collapse; border-spacing: 0; float: none; margin: 0 auto; padding: 0; text-align: center; vertical-align: top; width: 100%;"><tr style="padding: 0; text-align: left; vertical-align: top;"><td class="wrapper-inner" style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; hyphens: auto; line-height: 1.3; margin: 0; padding: 20px; text-align: left; vertical-align: top; word-wrap: break-word;">
  291. <table align="center" class="container" style="Margin: 0 auto; background: transparent; border-collapse: collapse; border-spacing: 0; margin: 0 auto; padding: 0; text-align: inherit; vertical-align: top; width: 580px;"><tbody><tr style="padding: 0; text-align: left; vertical-align: top;"><td style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; hyphens: auto; line-height: 1.3; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
  292. <table class="row collapse" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;"><tbody><tr style="padding: 0; text-align: left; vertical-align: top;">
  293. <th class="small-12 large-12 columns first last" style="Margin: 0 auto; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 1.3; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 588px;"><table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;"><tr style="padding: 0; text-align: left; vertical-align: top;"><th style="Margin: 0; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left;">
  294. <h1 class="sl-logotype" style="Margin: 0; Margin-bottom: 0; color: #333333; font-family: Baskerville, 'Baskerville Old Face', Georgia, serif; font-size: 26px; font-weight: normal; line-height: 1.3; margin: 0; margin-bottom: 0; padding: 0; text-align: left; word-wrap: normal;">
  295. <span>S</span><span class="sl-logotype-small" style="font-size: 80%;">HARE</span><span>L</span><span class="sl-logotype-small" style="font-size: 80%;">A</span><span>T</span><span class="sl-logotype-small" style="font-size: 80%;">E</span><span>X</span>
  296. </h1>
  297. </th>
  298. <th class="expander" style="Margin: 0; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 1.3; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;"></th></tr></table></th>
  299. </tr></tbody></table>
  300. </td></tr></tbody></table>
  301. </td></tr></table>
  302. <table class="spacer float-center" style="Margin: 0 auto; border-collapse: collapse; border-spacing: 0; float: none; margin: 0 auto; padding: 0; text-align: center; vertical-align: top; width: 100%;"><tbody><tr style="padding: 0; text-align: left; vertical-align: top;"><td height="20px" style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; hyphens: auto; line-height: 20px; margin: 0; mso-line-height-rule: exactly; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">&#xA0;</td></tr></tbody></table>
  303. <table align="center" class="container main float-center" style="Margin: 0 auto; Margin-top: 10px; background: #fefefe; border-collapse: collapse; border-spacing: 0; float: none; margin: 0 auto; margin-top: 10px; padding: 0; text-align: center; vertical-align: top; width: 580px;"><tbody><tr style="padding: 0; text-align: left; vertical-align: top;"><td style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; hyphens: auto; line-height: 1.3; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
  304. <table class="spacer" style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;"><tbody><tr style="padding: 0; text-align: left; vertical-align: top;"><td height="20px" style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; hyphens: auto; line-height: 20px; margin: 0; mso-line-height-rule: exactly; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">&#xA0;</td></tr></tbody></table>
  305. <%= body %>
  306. <table class="wrapper secondary" align="center" style="background: #f6f6f6; border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;"><tr style="padding: 0; text-align: left; vertical-align: top;"><td class="wrapper-inner" style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; hyphens: auto; line-height: 1.3; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
  307. <table class="spacer" style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;"><tbody><tr style="padding: 0; text-align: left; vertical-align: top;"><td height="10px" style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-weight: normal; hyphens: auto; line-height: 10px; margin: 0; mso-line-height-rule: exactly; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">&#xA0;</td></tr></tbody></table>
  308. <p style="Margin: 0; Margin-bottom: 10px; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 1.3; margin: 0; margin-bottom: 10px; padding: 0; text-align: left;"><small style="color: #7a7a7a; font-size: 80%;">
  309. #{ settings.appName} &bull; <a href="#{ settings.siteUrl }" style="Margin: 0; color: #a93529; font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left; text-decoration: none;">#{ settings.siteUrl }</a>
  310. </small></p>
  311. </td></tr></table>
  312. </td></tr></tbody></table>
  313. </center>
  314. </td>
  315. </tr>
  316. </table>
  317. <!-- prevent Gmail on iOS font size manipulation -->
  318. <div style="display:none; white-space:nowrap; font:15px courier; line-height:0;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
  319. </body>
  320. </html>
  321. """