|
| 1 | +{{! |
| 2 | + The HTML part of the mail carrying a login code. |
| 3 | +
|
| 4 | + Table layout and inline styles throughout, because a mail client is not a browser: the classic |
| 5 | + Outlook still in use across the companies this extension serves lays out with Word's engine, |
| 6 | + which has no flex, no grid, and no stylesheet to read. Nor does it honour max-width, so the width |
| 7 | + the card is held to is given to it again in a table only that engine sees. Colours are given as |
| 8 | + bgcolor beside the style carrying them, for the webmail clients that drop the shorthand. The |
| 9 | + rounded corners it will not do either way. |
| 10 | +
|
| 11 | + Colours, spacing and type sizes are Codex's, spelled out rather than referred to: a mail carries |
| 12 | + no stylesheet, so there is nothing for a custom property to resolve against and no compiler to |
| 13 | + resolve a LESS variable. Each is named in a comment beside its value. The line heights and the |
| 14 | + size of the code itself are set to suit a message read at arm's length, and are nobody's tokens. |
| 15 | +
|
| 16 | + Nothing is fetched from the network. There is no link, since a login mail that trains its reader |
| 17 | + to click one is a phishing template with a head start, and no image, since clients block remote |
| 18 | + ones by default and would show a broken box where a logo went. A code in groups reads as a phone |
| 19 | + number to a client that hunts for them, which would make a link of it unasked, so they are asked |
| 20 | + not to. |
| 21 | +
|
| 22 | + Every string arrives localised, in the wiki's own language, which is why the direction to read it |
| 23 | + in is given here too. The code keeps its own direction, being digits either way. Mustache escapes |
| 24 | + what it interpolates, so none of it can carry markup out of a wiki's site name. |
| 25 | +}} |
| 26 | +<!DOCTYPE html> |
| 27 | +<html dir="{{dir}}" lang="{{lang}}"> |
| 28 | +<head> |
| 29 | +<meta charset="UTF-8"> |
| 30 | +<meta name="format-detection" content="telephone=no"> |
| 31 | +<title>{{siteName}}</title> |
| 32 | +</head> |
| 33 | +{{! background-color-neutral }} |
| 34 | +<body style="margin:0;padding:0;background-color:#eaecf0;"> |
| 35 | +<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#eaecf0" style="border-collapse:collapse;background-color:#eaecf0;"> |
| 36 | + <tr> |
| 37 | + {{! spacing-150, spacing-75 }} |
| 38 | + <td align="center" style="padding:24px 12px;"> |
| 39 | + <!--[if mso]><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="480" align="center"><tr><td><![endif]--> |
| 40 | + {{! background-color-base, border-color-subtle, border-radius-base }} |
| 41 | + <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ffffff" style="border-collapse:collapse;max-width:480px;background-color:#ffffff;border:1px solid #c8ccd1;border-radius:2px;"> |
| 42 | + <tr> |
| 43 | + {{! font-size-x-large, font-weight-bold, color-base, spacing-150 }} |
| 44 | + <td align="center" style="padding:24px 24px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,Helvetica,Arial,sans-serif;font-size:20px;font-weight:700;line-height:28px;color:#202122;text-align:center;"> |
| 45 | + {{siteName}} |
| 46 | + </td> |
| 47 | + </tr> |
| 48 | + <tr> |
| 49 | + {{! font-size-medium, color-base, spacing-25 }} |
| 50 | + <td align="center" style="padding:4px 24px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,Helvetica,Arial,sans-serif;font-size:16px;line-height:26px;color:#202122;text-align:center;"> |
| 51 | + {{intro}} |
| 52 | + </td> |
| 53 | + </tr> |
| 54 | + <tr> |
| 55 | + {{! spacing-100, spacing-150 }} |
| 56 | + <td align="center" style="padding:16px 24px 0;"> |
| 57 | + {{! background-color-neutral-subtle, border-color-subtle }} |
| 58 | + <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#f8f9fa" style="border-collapse:collapse;background-color:#f8f9fa;border:1px solid #c8ccd1;"> |
| 59 | + <tr> |
| 60 | + {{! font-family-monospace, font-weight-bold, color-base, spacing-100 }} |
| 61 | + <td align="center" dir="ltr" style="padding:16px;font-family:Menlo,Consolas,'Liberation Mono','Fira Code','Courier New',monospace;font-size:30px;font-weight:700;letter-spacing:6px;color:#202122;text-align:center;"> |
| 62 | + {{code}} |
| 63 | + </td> |
| 64 | + </tr> |
| 65 | + </table> |
| 66 | + </td> |
| 67 | + </tr> |
| 68 | + <tr> |
| 69 | + {{! font-size-small, color-subtle, spacing-150 }} |
| 70 | + <td align="center" style="padding:14px 24px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,Helvetica,Arial,sans-serif;font-size:14px;line-height:22px;color:#54595d;text-align:center;"> |
| 71 | + {{validity}} |
| 72 | + </td> |
| 73 | + </tr> |
| 74 | + <tr> |
| 75 | + {{! font-size-x-small, color-subtle, spacing-100, spacing-150 }} |
| 76 | + <td align="center" style="padding:16px 24px 24px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,Helvetica,Arial,sans-serif;font-size:12px;line-height:19px;color:#54595d;text-align:center;"> |
| 77 | + {{disclaimer}} |
| 78 | + </td> |
| 79 | + </tr> |
| 80 | + </table> |
| 81 | + <!--[if mso]></td></tr></table><![endif]--> |
| 82 | + </td> |
| 83 | + </tr> |
| 84 | +</table> |
| 85 | +</body> |
| 86 | +</html> |
0 commit comments