[{"data":1,"prerenderedAt":3775},["ShallowReactive",2],{"navigation_docs":3,"-kits-templates-and-views":205,"-kits-templates-and-views-surround":3770},[4,31,67,111,132,163,189],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-play",{"title":26,"path":27,"stem":28,"icon":29},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F4.agent-skill","i-lucide-sparkles",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"Authoring","i-lucide-pen-line","\u002Fauthoring","2.authoring",[37,42,47,52,57,62],{"title":38,"path":39,"stem":40,"icon":41},"Comark syntax","\u002Fauthoring\u002Fcomark-syntax","2.authoring\u002F1.comark-syntax","i-lucide-file-code",{"title":43,"path":44,"stem":45,"icon":46},"Frontmatter","\u002Fauthoring\u002Ffrontmatter","2.authoring\u002F2.frontmatter","i-lucide-heading",{"title":48,"path":49,"stem":50,"icon":51},"Components","\u002Fauthoring\u002Fcomponents","2.authoring\u002F3.components","i-lucide-blocks",{"title":53,"path":54,"stem":55,"icon":56},"Merge tags and data","\u002Fauthoring\u002Fmerge-tags-and-data","2.authoring\u002F4.merge-tags-and-data","i-lucide-braces",{"title":58,"path":59,"stem":60,"icon":61},"Actions and spans","\u002Fauthoring\u002Factions-and-spans","2.authoring\u002F5.actions-and-spans","i-lucide-mouse-pointer-click",{"title":63,"path":64,"stem":65,"icon":66},"Compile errors","\u002Fauthoring\u002Fcompile-errors","2.authoring\u002F6.compile-errors","i-lucide-circle-alert",{"title":68,"icon":69,"path":70,"stem":71,"children":72,"page":30},"Kits","i-lucide-palette","\u002Fkits","3.kits",[73,78,83,87,91,96,101,106],{"title":74,"path":75,"stem":76,"icon":77},"What is a kit","\u002Fkits\u002Fwhat-is-a-kit","3.kits\u002F1.what-is-a-kit","i-lucide-package",{"title":79,"path":80,"stem":81,"icon":82},"kit.yaml","\u002Fkits\u002Fkit-yaml","3.kits\u002F2.kit-yaml","i-lucide-file-cog",{"title":84,"path":85,"stem":86,"icon":51},"Component schemas","\u002Fkits\u002Fcomponent-schemas","3.kits\u002F3.component-schemas",{"title":88,"path":89,"stem":90,"icon":56},"Templates and views","\u002Fkits\u002Ftemplates-and-views","3.kits\u002F4.templates-and-views",{"title":92,"path":93,"stem":94,"icon":95},"Template checking","\u002Fkits\u002Ftemplate-checking","3.kits\u002F5.template-checking","i-lucide-shield-check",{"title":97,"path":98,"stem":99,"icon":100},"Go types and funcs","\u002Fkits\u002Fgo-types-and-funcs","3.kits\u002F6.go-types-and-funcs","i-lucide-code",{"title":102,"path":103,"stem":104,"icon":105},"Email-safe HTML","\u002Fkits\u002Femail-safe-html","3.kits\u002F7.email-safe-html","i-lucide-mail-check",{"title":107,"path":108,"stem":109,"icon":110},"Plain text","\u002Fkits\u002Fplain-text","3.kits\u002F8.plain-text","i-lucide-file-text",{"title":112,"icon":113,"path":114,"stem":115,"children":116,"page":30},"Sending","i-lucide-send","\u002Fsending","4.sending",[117,122,127],{"title":118,"path":119,"stem":120,"icon":121},"Profiles and config","\u002Fsending\u002Fprofiles-and-config","4.sending\u002F1.profiles-and-config","i-lucide-settings",{"title":123,"path":124,"stem":125,"icon":126},"Message and MIME","\u002Fsending\u002Fmessage-and-mime","4.sending\u002F2.message-and-mime","i-lucide-mail",{"title":128,"path":129,"stem":130,"icon":131},"SMTP","\u002Fsending\u002Fsmtp","4.sending\u002F3.smtp","i-lucide-server",{"title":133,"icon":134,"path":135,"stem":136,"children":137,"page":30},"Tooling","i-lucide-wrench","\u002Ftooling","5.tooling",[138,143,148,153,158],{"title":139,"path":140,"stem":141,"icon":142},"The lttr CLI","\u002Ftooling\u002Fcli","5.tooling\u002F1.cli","i-lucide-terminal",{"title":144,"path":145,"stem":146,"icon":147},"Studio","\u002Ftooling\u002Fstudio","5.tooling\u002F2.studio","i-lucide-eye",{"title":149,"path":150,"stem":151,"icon":152},"Editor setup","\u002Ftooling\u002Feditor-setup","5.tooling\u002F3.editor-setup","i-lucide-plug",{"title":154,"path":155,"stem":156,"icon":157},"Screenshots","\u002Ftooling\u002Fscreenshots","5.tooling\u002F4.screenshots","i-lucide-camera",{"title":159,"path":160,"stem":161,"icon":162},"Goldens and testing","\u002Ftooling\u002Fgoldens-and-testing","5.tooling\u002F5.goldens-and-testing","i-lucide-flask-conical",{"title":164,"icon":165,"path":166,"stem":167,"children":168,"page":30},"Guides","i-lucide-book-open","\u002Fguides","6.guides",[169,174,179,184],{"title":170,"path":171,"stem":172,"icon":173},"Build your own kit","\u002Fguides\u002Fbuild-your-own-kit","6.guides\u002F1.build-your-own-kit","i-lucide-hammer",{"title":175,"path":176,"stem":177,"icon":178},"The Quiet kit","\u002Fguides\u002Fthe-quiet-kit","6.guides\u002F2.the-quiet-kit","i-lucide-mail-open",{"title":180,"path":181,"stem":182,"icon":183},"Migrating from v0.1","\u002Fguides\u002Fmigrating-from-v0-1","6.guides\u002F3.migrating-from-v0-1","i-lucide-arrow-right-left",{"title":185,"path":186,"stem":187,"icon":188},"Releasing","\u002Fguides\u002Freleasing","6.guides\u002F4.releasing","i-lucide-tag",{"title":190,"icon":191,"path":192,"stem":193,"children":194,"page":30},"Reference","i-lucide-library","\u002Freference","7.reference",[195,200],{"title":196,"path":197,"stem":198,"icon":199},"API reference","\u002Freference\u002Fapi-reference","7.reference\u002F1.api-reference","i-lucide-list-tree",{"title":201,"path":202,"stem":203,"icon":204},"Gallery","\u002Freference\u002Fgallery","7.reference\u002F2.gallery","i-lucide-images",{"id":206,"title":88,"body":207,"description":3763,"extension":3764,"links":3765,"meta":3766,"navigation":3767,"path":89,"seo":3768,"stem":90,"__hash__":3769},"docs\u002F3.kits\u002F4.templates-and-views.md",{"type":208,"value":209,"toc":3746},"minimark",[210,223,228,231,280,299,409,413,418,729,772,804,808,819,945,987,1068,1118,1320,1355,1402,1713,1717,1736,1845,1871,1962,2020,2029,2058,2067,2071,2102,2404,2411,2629,2723,2740,2745,2767,2771,2777,2781,2909,2922,2926,3202,3206,3355,3373,3377,3387,3393,3402,3423,3427,3440,3718,3727,3731,3743],[211,212,213,214,218,219,222],"p",{},"A kit's templates are ordinary Go templates: ",[215,216,217],"code",{},"html\u002Ftemplate"," for HTML and ",[215,220,221],{},"text\u002Ftemplate"," for text. Each one executes with a fixed, typed view, and lttr type-checks every template against its view when the kit loads. This page is the reference for both: what each template sees, and the functions the core supplies.",[224,225,227],"h2",{"id":226},"know-which-template-runs-when","Know which template runs when",[211,229,230],{},"For every message, the renderer:",[232,233,234,250,265],"ol",{},[235,236,237,238,241,242,245,246,249],"li",{},"executes each top-level component's ",[215,239,240],{},"html.tmpl"," with its ",[215,243,244],{},"kit.View",", in document order, and joins the output (a nested component's template runs when its parent calls ",[215,247,248],{},"render",");",[235,251,252,253,256,257,260,261,264],{},"executes ",[215,254,255],{},"layout.html"," with a ",[215,258,259],{},"kit.LayoutView"," whose ",[215,262,263],{},"Body"," is that output;",[235,266,267,268,271,272,275,276,279],{},"does the same for text: each ",[215,269,270],{},"text.tmpl",", then ",[215,273,274],{},"layout.txt"," (see ",[277,278,107],"a",{"href":108},").",[211,281,282,283,286,287,290,291,294,295,298],{},"Inside a component, ",[215,284,285],{},"{{content .Content}}"," renders the component's Markdown through the defines of ",[215,288,289],{},"blocks.html"," (or the text blocks). ",[215,292,293],{},"styles.css"," is executed once per renderer, over the tokens and vars, and reaches the layout as ",[215,296,297],{},".Styles",".",[300,301,302,318],"table",{},[303,304,305],"thead",{},[306,307,308,312,315],"tr",{},[309,310,311],"th",{},"Template",[309,313,314],{},"Kind",[309,316,317],{},"Dot",[319,320,321,336,351,364,390],"tbody",{},[306,322,323,328,332],{},[324,325,326],"td",{},[215,327,255],{},[324,329,330],{},[215,331,217],{},[324,333,334],{},[215,335,259],{},[306,337,338,342,346],{},[324,339,340],{},[215,341,274],{},[324,343,344],{},[215,345,221],{},[324,347,348],{},[215,349,350],{},"kit.TextLayoutView",[306,352,353,357,361],{},[324,354,355],{},[215,356,293],{},[324,358,359],{},[215,360,221],{},[324,362,363],{},"nil",[306,365,366,374,377],{},[324,367,368,370,371],{},[215,369,289],{},", ",[215,372,373],{},"blocks.txt",[324,375,376],{},"defines",[324,378,379,382,383,386,387],{},[215,380,381],{},"kit.BlockView","; the ",[215,384,385],{},"action"," define gets a ",[215,388,389],{},"kit.ActionView",[306,391,392,399,405],{},[324,393,394,370,397],{},[215,395,396],{},"components\u002F\u003Cname>\u002Fhtml.tmpl",[215,398,270],{},[324,400,401,370,403],{},[215,402,217],{},[215,404,221],{},[324,406,407],{},[215,408,244],{},[224,410,412],{"id":411},"write-the-layout","Write the layout",[211,414,415,417],{},[215,416,255],{}," is the whole document around the components. Plain's opens with the document head, then writes the head CSS:",[419,420,426],"pre",{"className":421,"code":422,"filename":423,"language":424,"meta":425,"style":425},"language-html shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark","\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n\u003Chead>\n\u003Cmeta charset=\"utf-8\">\n\u003Cmeta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n\u003Cmeta name=\"x-apple-disable-message-reformatting\">\n\u003Cmeta name=\"format-detection\" content=\"telephone=no,date=no,address=no,email=no,url=no\">\n\u003Cmeta name=\"color-scheme\" content=\"light dark\">\n\u003Cmeta name=\"supported-color-schemes\" content=\"light dark\">\n\u003Ctitle>{{.Subject}}\u003C\u002Ftitle>\n{{msoIf}}\u003Cnoscript>\u003Cxml>\u003Co:OfficeDocumentSettings>\u003Co:AllowPNG\u002F>\u003Co:PixelsPerInch>96\u003C\u002Fo:PixelsPerInch>\u003C\u002Fo:OfficeDocumentSettings>\u003C\u002Fxml>\u003C\u002Fnoscript>{{msoEnd}}\n\u003Cstyle>{{.Styles}}\u003C\u002Fstyle>\n\u003C\u002Fhead>\n","plain\u002Flayout.html#L1-L13","html","",[215,427,428,448,492,502,520,545,561,584,607,629,644,697,719],{"__ignoreMap":425},[429,430,433,437,441,445],"span",{"class":431,"line":432},"line",1,[429,434,436],{"class":435},"sihDN","\u003C!",[429,438,440],{"class":439},"s71pN","DOCTYPE",[429,442,444],{"class":443},"sQJpg"," html",[429,446,447],{"class":435},">\n",[429,449,451,454,456,459,462,466,469,471,474,477,479,482,485,487,490],{"class":431,"line":450},2,[429,452,453],{"class":435},"\u003C",[429,455,424],{"class":439},[429,457,458],{"class":443}," lang",[429,460,461],{"class":435},"=",[429,463,465],{"class":464},"sRBGO","\"en\"",[429,467,468],{"class":443}," xmlns",[429,470,461],{"class":435},[429,472,473],{"class":464},"\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\"",[429,475,476],{"class":443}," xmlns:v",[429,478,461],{"class":435},[429,480,481],{"class":464},"\"urn:schemas-microsoft-com:vml\"",[429,483,484],{"class":443}," xmlns:o",[429,486,461],{"class":435},[429,488,489],{"class":464},"\"urn:schemas-microsoft-com:office:office\"",[429,491,447],{"class":435},[429,493,495,497,500],{"class":431,"line":494},3,[429,496,453],{"class":435},[429,498,499],{"class":439},"head",[429,501,447],{"class":435},[429,503,505,507,510,513,515,518],{"class":431,"line":504},4,[429,506,453],{"class":435},[429,508,509],{"class":439},"meta",[429,511,512],{"class":443}," charset",[429,514,461],{"class":435},[429,516,517],{"class":464},"\"utf-8\"",[429,519,447],{"class":435},[429,521,523,525,527,530,532,535,538,540,543],{"class":431,"line":522},5,[429,524,453],{"class":435},[429,526,509],{"class":439},[429,528,529],{"class":443}," name",[429,531,461],{"class":435},[429,533,534],{"class":464},"\"viewport\"",[429,536,537],{"class":443}," content",[429,539,461],{"class":435},[429,541,542],{"class":464},"\"width=device-width,initial-scale=1\"",[429,544,447],{"class":435},[429,546,548,550,552,554,556,559],{"class":431,"line":547},6,[429,549,453],{"class":435},[429,551,509],{"class":439},[429,553,529],{"class":443},[429,555,461],{"class":435},[429,557,558],{"class":464},"\"x-apple-disable-message-reformatting\"",[429,560,447],{"class":435},[429,562,564,566,568,570,572,575,577,579,582],{"class":431,"line":563},7,[429,565,453],{"class":435},[429,567,509],{"class":439},[429,569,529],{"class":443},[429,571,461],{"class":435},[429,573,574],{"class":464},"\"format-detection\"",[429,576,537],{"class":443},[429,578,461],{"class":435},[429,580,581],{"class":464},"\"telephone=no,date=no,address=no,email=no,url=no\"",[429,583,447],{"class":435},[429,585,587,589,591,593,595,598,600,602,605],{"class":431,"line":586},8,[429,588,453],{"class":435},[429,590,509],{"class":439},[429,592,529],{"class":443},[429,594,461],{"class":435},[429,596,597],{"class":464},"\"color-scheme\"",[429,599,537],{"class":443},[429,601,461],{"class":435},[429,603,604],{"class":464},"\"light dark\"",[429,606,447],{"class":435},[429,608,610,612,614,616,618,621,623,625,627],{"class":431,"line":609},9,[429,611,453],{"class":435},[429,613,509],{"class":439},[429,615,529],{"class":443},[429,617,461],{"class":435},[429,619,620],{"class":464},"\"supported-color-schemes\"",[429,622,537],{"class":443},[429,624,461],{"class":435},[429,626,604],{"class":464},[429,628,447],{"class":435},[429,630,632,634,637,640,642],{"class":431,"line":631},10,[429,633,453],{"class":435},[429,635,636],{"class":439},"title",[429,638,639],{"class":435},">{{.Subject}}\u003C\u002F",[429,641,636],{"class":439},[429,643,447],{"class":435},[429,645,647,650,653,656,660,662,665,667,670,673,676,679,681,684,686,688,690,692,694],{"class":431,"line":646},11,[429,648,649],{"class":435},"{{msoIf}}\u003C",[429,651,652],{"class":439},"noscript",[429,654,655],{"class":435},">\u003C",[429,657,659],{"class":658},"s-oVe","xml",[429,661,655],{"class":435},[429,663,664],{"class":658},"o:OfficeDocumentSettings",[429,666,655],{"class":435},[429,668,669],{"class":658},"o:AllowPNG",[429,671,672],{"class":435},"\u002F>\u003C",[429,674,675],{"class":658},"o:PixelsPerInch",[429,677,678],{"class":435},">96\u003C\u002F",[429,680,675],{"class":658},[429,682,683],{"class":435},">\u003C\u002F",[429,685,664],{"class":658},[429,687,683],{"class":435},[429,689,659],{"class":658},[429,691,683],{"class":435},[429,693,652],{"class":439},[429,695,696],{"class":435},">{{msoEnd}}\n",[429,698,700,702,705,708,712,715,717],{"class":431,"line":699},12,[429,701,453],{"class":435},[429,703,704],{"class":439},"style",[429,706,707],{"class":435},">{{.",[429,709,711],{"class":710},"sTl1q","Styles",[429,713,714],{"class":435},"}}\u003C\u002F",[429,716,704],{"class":439},[429,718,447],{"class":435},[429,720,722,725,727],{"class":431,"line":721},13,[429,723,724],{"class":435},"\u003C\u002F",[429,726,499],{"class":439},[429,728,447],{"class":435},[211,730,731,733,734,737,738,741,742,744,745,747,748,751,752,754,755,758,759,762,763,765,766,768,769,771],{},[215,732,259],{}," has ",[215,735,736],{},"Subject"," and ",[215,739,740],{},"Preheader"," (strings), ",[215,743,711],{}," (the executed ",[215,746,293],{},", as ",[215,749,750],{},"template.CSS","), ",[215,753,263],{}," (the components' HTML, as ",[215,756,757],{},"template.HTML",") and ",[215,760,761],{},"Doc",". ",[215,764,350],{}," is the same without ",[215,767,711],{},", with ",[215,770,263],{}," as a string.",[211,773,774,775,778,779,782,783,786,787,790,791,737,794,797,798,801,802,298],{},"Plain writes its head by hand. A kit can call the core ",[215,776,777],{},"document"," function instead: it writes the doctype, ",[215,780,781],{},"\u003Chtml>"," and the head metas through the Outlook settings block, with the ",[215,784,785],{},"color-scheme"," metas when the kit sets ",[215,788,789],{},"dark: true",", and the layout writes the ",[215,792,793],{},"\u003Ctitle>",[215,795,796],{},"\u003Cstyle>"," after it. ",[215,799,800],{},"preheader"," writes the hidden preheader. See ",[277,803,102],{"href":103},[224,805,807],{"id":806},"read-the-component-view","Read the component view",[211,809,810,811,737,813,815,816,818],{},"A component's ",[215,812,240],{},[215,814,270],{}," execute with a ",[215,817,244],{},":",[300,820,821,834],{},[303,822,823],{},[306,824,825,828,831],{},[309,826,827],{},"Field",[309,829,830],{},"Type",[309,832,833],{},"Holds",[319,835,836,851,866,883,900,915,930],{},[306,837,838,843,848],{},[324,839,840],{},[215,841,842],{},".Name",[324,844,845],{},[215,846,847],{},"string",[324,849,850],{},"The component's name",[306,852,853,858,863],{},[324,854,855],{},[215,856,857],{},".Attrs",[324,859,860],{},[215,861,862],{},"kit.Attrs",[324,864,865],{},"Every attribute the schema declares, by name: its value, else its default, else the zero value of its type",[306,867,868,873,878],{},[324,869,870],{},[215,871,872],{},".Bind",[324,874,875],{},[215,876,877],{},"kit.Bind",[324,879,880,881],{},"Every binding the schema declares, by name, with its registered Go type. An optional binding not given is ",[215,882,363],{},[306,884,885,890,895],{},[324,886,887],{},[215,888,889],{},".Content",[324,891,892],{},[215,893,894],{},"kit.Content",[324,896,897,898],{},"The compiled Markdown. Render it with ",[215,899,285],{},[306,901,902,907,912],{},[324,903,904],{},[215,905,906],{},".Children",[324,908,909],{},[215,910,911],{},"[]kit.ChildView",[324,913,914],{},"The nested components, in order",[306,916,917,922,927],{},[324,918,919],{},[215,920,921],{},".Section",[324,923,924],{},[215,925,926],{},"kit.Section",[324,928,929],{},"The resolved spacing and position",[306,931,932,937,942],{},[324,933,934],{},[215,935,936],{},".Doc",[324,938,939],{},[215,940,941],{},"kit.Doc",[324,943,944],{},"The document-wide values",[211,946,947,737,949,951,952,955,956,959,960,963,964,967,968,970,971,973,974,976,977,979,980,275,982,986],{},[215,948,857],{},[215,950,872],{}," are maps, but the checker types each key from the schema: ",[215,953,954],{},".Attrs.href"," in the button template is a ",[215,957,958],{},"template.URL",", and ",[215,961,962],{},".Bind.invoice"," in the invoice template is an ",[215,965,966],{},"Invoice"," whose fields are checked. An ",[215,969,424],{}," attribute is the one whose type depends on the template: ",[215,972,757],{}," in ",[215,975,240],{},", and its plain-text alternative, a ",[215,978,847],{},", in ",[215,981,270],{},[277,983,985],{"href":984},"\u002Fkits\u002Fcomponent-schemas#pass-trusted-html","Pass trusted HTML","). Plain's section is one table row around its content:",[419,988,991],{"className":421,"code":989,"filename":990,"language":424,"meta":425,"style":425},"\u003Ctr>\u003Ctd class=\"pl-px pl-text\" align=\"left\" style=\"padding:{{px .Section.Top}} {{token \"size.side\"}}px {{px .Section.Bottom}};{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.text\"}}px;line-height:{{token \"size.line\"}}px;{{style \"color\" \"color.text\"}}\">{{content .Content}}\u003C\u002Ftd>\u003C\u002Ftr>\n","plain\u002Fcomponents\u002Fsection\u002Fhtml.tmpl",[215,992,993],{"__ignoreMap":425},[429,994,995,997,999,1001,1003,1006,1008,1011,1014,1016,1019,1022,1024,1027,1030,1033,1036,1039,1042,1045,1048,1051,1054,1057,1060,1062,1064,1066],{"class":431,"line":432},[429,996,453],{"class":435},[429,998,306],{"class":439},[429,1000,655],{"class":435},[429,1002,324],{"class":439},[429,1004,1005],{"class":443}," class",[429,1007,461],{"class":435},[429,1009,1010],{"class":464},"\"pl-px pl-text\"",[429,1012,1013],{"class":658}," align",[429,1015,461],{"class":435},[429,1017,1018],{"class":464},"\"left\"",[429,1020,1021],{"class":443}," style",[429,1023,461],{"class":435},[429,1025,1026],{"class":464},"\"padding:{{px .Section.Top}} {{token \"",[429,1028,1029],{"class":443},"size.side",[429,1031,1032],{"class":658},"\"}}px",[429,1034,1035],{"class":443}," {{px",[429,1037,1038],{"class":443}," .Section.Bottom}};{{style",[429,1040,1041],{"class":658}," \"font-family\"",[429,1043,1044],{"class":658}," \"font.sans\"}}font-size:{{token",[429,1046,1047],{"class":658}," \"size.text\"}}px;line-height:{{token",[429,1049,1050],{"class":658}," \"size.line\"}}px;{{style",[429,1052,1053],{"class":658}," \"color\"",[429,1055,1056],{"class":658}," \"color.text\"}}\"",[429,1058,1059],{"class":435},">{{content .Content}}\u003C\u002F",[429,1061,324],{"class":439},[429,1063,683],{"class":435},[429,1065,306],{"class":439},[429,1067,447],{"class":435},[211,1069,1070,1071,733,1077,370,1080,370,1083,370,1086,370,1089,370,1092,737,1095,1097,1098,737,1100,1102,1103,370,1106,1109,1110,1113,1114,1117],{},"A ",[1072,1073,1074],"strong",{},[215,1075,1076],{},"kit.ChildView",[215,1078,1079],{},"Name",[215,1081,1082],{},"Attrs",[215,1084,1085],{},"Bind",[215,1087,1088],{},"Content",[215,1090,1091],{},"Children",[215,1093,1094],{},"Section",[215,1096,761],{},". Its ",[215,1099,1082],{},[215,1101,1085],{}," (",[215,1104,1105],{},"kit.ChildAttrs",[215,1107,1108],{},"kit.ChildBind",") are typed by the child's schema, the one ",[215,1111,1112],{},"children.component"," names. Plain's ",[215,1115,1116],{},"columns"," reads its children inline, ranging over them and sizing each cell by their count:",[419,1119,1122],{"className":421,"code":1120,"filename":1121,"language":424,"meta":425,"style":425},"{{- $n := len .Children -}}\n\u003Ctr>\u003Ctd class=\"pl-px\" align=\"left\" style=\"padding:{{px .Section.Top}} {{token \"size.side\"}}px {{px .Section.Bottom}};\">\n\u003Ctable role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\u003Ctr>\n{{- range $i, $c := .Children}}\n{{- $pad := \"0 12px 0 0\"}}{{if eq $n 3}}{{$pad = \"0 11px 0 0\"}}{{end}}\n{{- if and (eq $n 2) (eq $i 1)}}{{$pad = \"0 0 0 12px\"}}{{end}}\n{{- if and (eq $n 3) (eq $i 1)}}{{$pad = \"0 6px 0 5px\"}}{{end}}\n{{- if and (eq $n 3) (eq $i 2)}}{{$pad = \"0 0 0 11px\"}}{{end -}}\n\u003Ctd class=\"pl-col{{if $i}} pl-col-n{{end}}\" width=\"{{if eq $n 3}}33%{{else}}50%{{end}}\" align=\"left\" valign=\"top\" style=\"padding:{{$pad}};\">{{content $c.Content}}\u003C\u002Ftd>\n{{- end}}\u003C\u002Ftr>\u003C\u002Ftable>\n\u003C\u002Ftd>\u003C\u002Ftr>\n","plain\u002Fcomponents\u002Fcolumns\u002Fhtml.tmpl",[215,1123,1124,1129,1172,1222,1227,1232,1237,1242,1247,1295,1308],{"__ignoreMap":425},[429,1125,1126],{"class":431,"line":432},[429,1127,1128],{"class":435},"{{- $n := len .Children -}}\n",[429,1130,1131,1133,1135,1137,1139,1141,1143,1146,1148,1150,1152,1154,1156,1158,1160,1162,1164,1167,1170],{"class":431,"line":450},[429,1132,453],{"class":435},[429,1134,306],{"class":439},[429,1136,655],{"class":435},[429,1138,324],{"class":439},[429,1140,1005],{"class":443},[429,1142,461],{"class":435},[429,1144,1145],{"class":464},"\"pl-px\"",[429,1147,1013],{"class":658},[429,1149,461],{"class":435},[429,1151,1018],{"class":464},[429,1153,1021],{"class":443},[429,1155,461],{"class":435},[429,1157,1026],{"class":464},[429,1159,1029],{"class":443},[429,1161,1032],{"class":658},[429,1163,1035],{"class":443},[429,1165,1166],{"class":443}," .Section.Bottom}};",[429,1168,1169],{"class":658},"\"",[429,1171,447],{"class":435},[429,1173,1174,1176,1178,1181,1183,1186,1189,1191,1194,1197,1199,1202,1205,1207,1209,1212,1214,1216,1218,1220],{"class":431,"line":494},[429,1175,453],{"class":435},[429,1177,300],{"class":439},[429,1179,1180],{"class":443}," role",[429,1182,461],{"class":435},[429,1184,1185],{"class":464},"\"presentation\"",[429,1187,1188],{"class":443}," width",[429,1190,461],{"class":435},[429,1192,1193],{"class":464},"\"100%\"",[429,1195,1196],{"class":443}," cellpadding",[429,1198,461],{"class":435},[429,1200,1201],{"class":464},"\"0\"",[429,1203,1204],{"class":443}," cellspacing",[429,1206,461],{"class":435},[429,1208,1201],{"class":464},[429,1210,1211],{"class":658}," border",[429,1213,461],{"class":435},[429,1215,1201],{"class":464},[429,1217,655],{"class":435},[429,1219,306],{"class":439},[429,1221,447],{"class":435},[429,1223,1224],{"class":431,"line":504},[429,1225,1226],{"class":435},"{{- range $i, $c := .Children}}\n",[429,1228,1229],{"class":431,"line":522},[429,1230,1231],{"class":435},"{{- $pad := \"0 12px 0 0\"}}{{if eq $n 3}}{{$pad = \"0 11px 0 0\"}}{{end}}\n",[429,1233,1234],{"class":431,"line":547},[429,1235,1236],{"class":435},"{{- if and (eq $n 2) (eq $i 1)}}{{$pad = \"0 0 0 12px\"}}{{end}}\n",[429,1238,1239],{"class":431,"line":563},[429,1240,1241],{"class":435},"{{- if and (eq $n 3) (eq $i 1)}}{{$pad = \"0 6px 0 5px\"}}{{end}}\n",[429,1243,1244],{"class":431,"line":586},[429,1245,1246],{"class":435},"{{- if and (eq $n 3) (eq $i 2)}}{{$pad = \"0 0 0 11px\"}}{{end -}}\n",[429,1248,1249,1251,1253,1255,1257,1260,1262,1264,1267,1269,1271,1273,1276,1278,1281,1283,1285,1288,1291,1293],{"class":431,"line":609},[429,1250,453],{"class":435},[429,1252,324],{"class":439},[429,1254,1005],{"class":443},[429,1256,461],{"class":435},[429,1258,1259],{"class":464},"\"pl-col{{if $i}} pl-col-n{{end}}\"",[429,1261,1188],{"class":443},[429,1263,461],{"class":435},[429,1265,1266],{"class":464},"\"{{if eq $n 3}}33%{{else}}50%{{end}}\"",[429,1268,1013],{"class":658},[429,1270,461],{"class":435},[429,1272,1018],{"class":464},[429,1274,1275],{"class":443}," valign",[429,1277,461],{"class":435},[429,1279,1280],{"class":464},"\"top\"",[429,1282,1021],{"class":443},[429,1284,461],{"class":435},[429,1286,1287],{"class":464},"\"padding:{{$pad}};\"",[429,1289,1290],{"class":435},">{{content $c.Content}}\u003C\u002F",[429,1292,324],{"class":439},[429,1294,447],{"class":435},[429,1296,1297,1300,1302,1304,1306],{"class":431,"line":631},[429,1298,1299],{"class":435},"{{- end}}\u003C\u002F",[429,1301,306],{"class":439},[429,1303,683],{"class":435},[429,1305,300],{"class":439},[429,1307,447],{"class":435},[429,1309,1310,1312,1314,1316,1318],{"class":431,"line":646},[429,1311,724],{"class":435},[429,1313,324],{"class":439},[429,1315,683],{"class":435},[429,1317,306],{"class":439},[429,1319,447],{"class":435},[211,1321,1322,1326,1327,737,1330,1333,1334,1337,1338,737,1341,959,1344,737,1347,1350,1351,1354],{},[1072,1323,1324],{},[215,1325,926],{}," holds ",[215,1328,1329],{},"Top",[215,1331,1332],{},"Bottom"," (the resolved padding in px), ",[215,1335,1336],{},"Index"," (0-based among its siblings), ",[215,1339,1340],{},"First",[215,1342,1343],{},"Last",[215,1345,1346],{},"Prev",[215,1348,1349],{},"Next"," (the neighbouring components' names, ",[215,1352,1353],{},"\"\""," at the ends).",[211,1356,1357,1326,1361,370,1363,370,1365,1102,1368,1370,1371,751,1374,1102,1377,370,1380,1382,1383,758,1386,1389,1390,1394,1395,370,1398,1401],{},[1072,1358,1359],{},[215,1360,941],{},[215,1362,736],{},[215,1364,740],{},[215,1366,1367],{},"Profile",[215,1369,1079],{}," and the formatted ",[215,1372,1373],{},"From",[215,1375,1376],{},"Recipient",[215,1378,1379],{},"Address",[215,1381,1079],{}," and a checked ",[215,1384,1385],{},"UnsubscribeURL",[215,1387,1388],{},"Front"," (the kit's ",[277,1391,1393],{"href":1392},"\u002Fkits\u002Fkit-yaml#declare-frontmatter-keys","frontmatter keys","). Plain's footer uses ",[215,1396,1397],{},"inline",[215,1399,1400],{},"var"," and the recipient's unsubscribe link:",[419,1403,1406],{"className":421,"code":1404,"filename":1405,"language":424,"meta":425,"style":425},"\u003Ctr>\u003Ctd class=\"pl-px\" align=\"left\" style=\"padding:{{px .Section.Top}} {{token \"size.side\"}}px {{px .Section.Bottom}};\">\n\u003Ctable role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\u003Ctr>\u003Ctd class=\"pl-muted pl-rule\" style=\"padding:24px 0 0;{{style \"border-top\" (printf \"1px solid %s\" (token \"color.border\"))}}{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.small\"}}px;line-height:{{token \"size.small_line\"}}px;{{style \"color\" \"color.muted\"}}\">\n{{- if .Attrs.note}}\u003Cp class=\"pl-muted\" style=\"margin:0 0 12px;{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.small\"}}px;line-height:{{token \"size.small_line\"}}px;{{style \"color\" \"color.muted\"}}\">{{inline .Attrs.note}}\u003C\u002Fp>{{end -}}\n\u003Cp class=\"pl-muted\" style=\"margin:0;{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.small\"}}px;line-height:{{token \"size.small_line\"}}px;{{style \"color\" \"color.muted\"}}\">{{var \"company\"}} &middot; {{var \"address\"}}\n{{- with .Doc.Recipient.UnsubscribeURL}} &middot;&nbsp;\u003Ca href=\"{{.}}\" style=\"{{style \"color\" \"color.accent\"}}text-decoration:underline;\">Unsubscribe\u003C\u002Fa>{{end -}}\n\u003C\u002Fp>\n\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftable>\n\u003C\u002Ftd>\u003C\u002Ftr>\n","plain\u002Fcomponents\u002Ffooter\u002Fhtml.tmpl",[215,1407,1408,1448,1548,1592,1635,1677,1685,1701],{"__ignoreMap":425},[429,1409,1410,1412,1414,1416,1418,1420,1422,1424,1426,1428,1430,1432,1434,1436,1438,1440,1442,1444,1446],{"class":431,"line":432},[429,1411,453],{"class":435},[429,1413,306],{"class":439},[429,1415,655],{"class":435},[429,1417,324],{"class":439},[429,1419,1005],{"class":443},[429,1421,461],{"class":435},[429,1423,1145],{"class":464},[429,1425,1013],{"class":658},[429,1427,461],{"class":435},[429,1429,1018],{"class":464},[429,1431,1021],{"class":443},[429,1433,461],{"class":435},[429,1435,1026],{"class":464},[429,1437,1029],{"class":443},[429,1439,1032],{"class":658},[429,1441,1035],{"class":443},[429,1443,1166],{"class":443},[429,1445,1169],{"class":658},[429,1447,447],{"class":435},[429,1449,1450,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470,1472,1474,1476,1478,1480,1482,1484,1486,1488,1490,1492,1494,1496,1499,1501,1503,1506,1509,1511,1514,1517,1520,1523,1525,1528,1531,1533,1535,1538,1541,1543,1546],{"class":431,"line":450},[429,1451,453],{"class":435},[429,1453,300],{"class":439},[429,1455,1180],{"class":443},[429,1457,461],{"class":435},[429,1459,1185],{"class":464},[429,1461,1188],{"class":443},[429,1463,461],{"class":435},[429,1465,1193],{"class":464},[429,1467,1196],{"class":443},[429,1469,461],{"class":435},[429,1471,1201],{"class":464},[429,1473,1204],{"class":443},[429,1475,461],{"class":435},[429,1477,1201],{"class":464},[429,1479,1211],{"class":658},[429,1481,461],{"class":435},[429,1483,1201],{"class":464},[429,1485,655],{"class":435},[429,1487,306],{"class":439},[429,1489,655],{"class":435},[429,1491,324],{"class":439},[429,1493,1005],{"class":443},[429,1495,461],{"class":435},[429,1497,1498],{"class":464},"\"pl-muted pl-rule\"",[429,1500,1021],{"class":443},[429,1502,461],{"class":435},[429,1504,1505],{"class":464},"\"padding:24px 0 0;{{style \"",[429,1507,1508],{"class":443},"border-top",[429,1510,1169],{"class":658},[429,1512,1513],{"class":443}," (printf",[429,1515,1516],{"class":658}," \"1px",[429,1518,1519],{"class":443}," solid",[429,1521,1522],{"class":443}," %s",[429,1524,1169],{"class":658},[429,1526,1527],{"class":443}," (token",[429,1529,1530],{"class":658}," \"color.border\"))}}{{style",[429,1532,1041],{"class":658},[429,1534,1044],{"class":658},[429,1536,1537],{"class":658}," \"size.small\"}}px;line-height:{{token",[429,1539,1540],{"class":658}," \"size.small_line\"}}px;{{style",[429,1542,1053],{"class":658},[429,1544,1545],{"class":658}," \"color.muted\"}}\"",[429,1547,447],{"class":435},[429,1549,1550,1553,1555,1557,1559,1562,1564,1566,1569,1572,1574,1576,1578,1580,1582,1584,1587,1589],{"class":431,"line":494},[429,1551,1552],{"class":435},"{{- if .Attrs.note}}\u003C",[429,1554,211],{"class":439},[429,1556,1005],{"class":443},[429,1558,461],{"class":435},[429,1560,1561],{"class":464},"\"pl-muted\"",[429,1563,1021],{"class":443},[429,1565,461],{"class":435},[429,1567,1568],{"class":464},"\"margin:0 0 12px;{{style \"",[429,1570,1571],{"class":443},"font-family",[429,1573,1169],{"class":658},[429,1575,1044],{"class":658},[429,1577,1537],{"class":658},[429,1579,1540],{"class":658},[429,1581,1053],{"class":658},[429,1583,1545],{"class":658},[429,1585,1586],{"class":435},">{{inline .Attrs.note}}\u003C\u002F",[429,1588,211],{"class":439},[429,1590,1591],{"class":435},">{{end -}}\n",[429,1593,1594,1596,1598,1600,1602,1604,1606,1608,1611,1613,1615,1617,1619,1621,1623,1625,1628,1632],{"class":431,"line":504},[429,1595,453],{"class":435},[429,1597,211],{"class":439},[429,1599,1005],{"class":443},[429,1601,461],{"class":435},[429,1603,1561],{"class":464},[429,1605,1021],{"class":443},[429,1607,461],{"class":435},[429,1609,1610],{"class":464},"\"margin:0;{{style \"",[429,1612,1571],{"class":443},[429,1614,1169],{"class":658},[429,1616,1044],{"class":658},[429,1618,1537],{"class":658},[429,1620,1540],{"class":658},[429,1622,1053],{"class":658},[429,1624,1545],{"class":658},[429,1626,1627],{"class":435},">{{var \"company\"}} ",[429,1629,1631],{"class":1630},"sFaxo","&middot;",[429,1633,1634],{"class":435}," {{var \"address\"}}\n",[429,1636,1637,1640,1643,1645,1647,1650,1652,1655,1657,1659,1662,1665,1667,1670,1673,1675],{"class":431,"line":522},[429,1638,1639],{"class":435},"{{- with .Doc.Recipient.UnsubscribeURL}} ",[429,1641,1642],{"class":1630},"&middot;&nbsp;",[429,1644,453],{"class":435},[429,1646,277],{"class":439},[429,1648,1649],{"class":443}," href",[429,1651,461],{"class":435},[429,1653,1654],{"class":464},"\"{{.}}\"",[429,1656,1021],{"class":443},[429,1658,461],{"class":435},[429,1660,1661],{"class":464},"\"{{style \"",[429,1663,1664],{"class":443},"color",[429,1666,1169],{"class":658},[429,1668,1669],{"class":658}," \"color.accent\"}}text-decoration:underline;\"",[429,1671,1672],{"class":435},">Unsubscribe\u003C\u002F",[429,1674,277],{"class":439},[429,1676,1591],{"class":435},[429,1678,1679,1681,1683],{"class":431,"line":547},[429,1680,724],{"class":435},[429,1682,211],{"class":439},[429,1684,447],{"class":435},[429,1686,1687,1689,1691,1693,1695,1697,1699],{"class":431,"line":563},[429,1688,724],{"class":435},[429,1690,324],{"class":439},[429,1692,683],{"class":435},[429,1694,306],{"class":439},[429,1696,683],{"class":435},[429,1698,300],{"class":439},[429,1700,447],{"class":435},[429,1702,1703,1705,1707,1709,1711],{"class":431,"line":586},[429,1704,724],{"class":435},[429,1706,324],{"class":439},[429,1708,683],{"class":435},[429,1710,306],{"class":439},[429,1712,447],{"class":435},[224,1714,1716],{"id":1715},"render-nested-components","Render nested components",[211,1718,1719,1720,1722,1723,1726,1727,1729,1730,1732,1733,1735],{},"Instead of reading a child's fields inline, a parent can hand the child to the core ",[215,1721,248],{}," function, which executes the child's ",[1072,1724,1725],{},"own"," ",[215,1728,240],{}," (or ",[215,1731,270],{},", in a text template) with a ",[215,1734,244],{}," of the child, and returns its output. Plain and Quiet nest one level and read their children inline; this example adds three components to a copy of Plain:",[419,1737,1740],{"className":421,"code":1738,"filename":1739,"language":424,"meta":425,"style":425},"\u003Ctr>\u003Ctd class=\"pl-px\" align=\"left\" style=\"padding:{{px .Section.Top}} {{token \"size.side\"}}px {{px .Section.Bottom}};\">\n\u003Ctable role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n{{- range .Children}}{{render .}}{{end -}}\n\u003C\u002Ftable>\n\u003C\u002Ftd>\u003C\u002Ftr>\n","components\u002Fsteps\u002Fhtml.tmpl",[215,1741,1742,1782,1820,1825,1833],{"__ignoreMap":425},[429,1743,1744,1746,1748,1750,1752,1754,1756,1758,1760,1762,1764,1766,1768,1770,1772,1774,1776,1778,1780],{"class":431,"line":432},[429,1745,453],{"class":435},[429,1747,306],{"class":439},[429,1749,655],{"class":435},[429,1751,324],{"class":439},[429,1753,1005],{"class":443},[429,1755,461],{"class":435},[429,1757,1145],{"class":464},[429,1759,1013],{"class":658},[429,1761,461],{"class":435},[429,1763,1018],{"class":464},[429,1765,1021],{"class":443},[429,1767,461],{"class":435},[429,1769,1026],{"class":464},[429,1771,1029],{"class":443},[429,1773,1032],{"class":658},[429,1775,1035],{"class":443},[429,1777,1166],{"class":443},[429,1779,1169],{"class":658},[429,1781,447],{"class":435},[429,1783,1784,1786,1788,1790,1792,1794,1796,1798,1800,1802,1804,1806,1808,1810,1812,1814,1816,1818],{"class":431,"line":450},[429,1785,453],{"class":435},[429,1787,300],{"class":439},[429,1789,1180],{"class":443},[429,1791,461],{"class":435},[429,1793,1185],{"class":464},[429,1795,1188],{"class":443},[429,1797,461],{"class":435},[429,1799,1193],{"class":464},[429,1801,1196],{"class":443},[429,1803,461],{"class":435},[429,1805,1201],{"class":464},[429,1807,1204],{"class":443},[429,1809,461],{"class":435},[429,1811,1201],{"class":464},[429,1813,1211],{"class":658},[429,1815,461],{"class":435},[429,1817,1201],{"class":464},[429,1819,447],{"class":435},[429,1821,1822],{"class":431,"line":494},[429,1823,1824],{"class":435},"{{- range .Children}}{{render .}}{{end -}}\n",[429,1826,1827,1829,1831],{"class":431,"line":504},[429,1828,724],{"class":435},[429,1830,300],{"class":439},[429,1832,447],{"class":435},[429,1834,1835,1837,1839,1841,1843],{"class":431,"line":522},[429,1836,724],{"class":435},[429,1838,324],{"class":439},[429,1840,683],{"class":435},[429,1842,306],{"class":439},[429,1844,447],{"class":435},[211,1846,1847,1848,1851,1852,1855,1856,1859,1860,1863,1864,1867,1868,1870],{},"Here ",[215,1849,1850],{},"steps"," takes ",[215,1853,1854],{},":::step"," children, and ",[215,1857,1858],{},"step"," takes at most one ",[215,1861,1862],{},"::::tip"," of its own (",[215,1865,1866],{},"children: { component: tip, max: 1 }","). The step's template sees its tip as ",[215,1869,906],{}," and renders it the same way:",[419,1872,1875],{"className":421,"code":1873,"filename":1874,"language":424,"meta":425,"style":425},"\u003Ctr>\u003Ctd class=\"pl-text\" style=\"padding:0 0 {{token \"size.block\"}}px;{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.text\"}}px;line-height:{{token \"size.line\"}}px;{{style \"color\" \"color.text\"}}\">\n\u003Cp style=\"margin:0 0 4px;font-weight:600;\">{{.Attrs.title}}\u003C\u002Fp>\n{{content .Content}}\n{{- range .Children}}{{render .}}{{end -}}\n\u003C\u002Ftd>\u003C\u002Ftr>\n","components\u002Fstep\u002Fhtml.tmpl",[215,1876,1877,1921,1941,1946,1950],{"__ignoreMap":425},[429,1878,1879,1881,1883,1885,1887,1889,1891,1894,1896,1898,1901,1904,1907,1909,1911,1913,1915,1917,1919],{"class":431,"line":432},[429,1880,453],{"class":435},[429,1882,306],{"class":439},[429,1884,655],{"class":435},[429,1886,324],{"class":439},[429,1888,1005],{"class":443},[429,1890,461],{"class":435},[429,1892,1893],{"class":464},"\"pl-text\"",[429,1895,1021],{"class":443},[429,1897,461],{"class":435},[429,1899,1900],{"class":464},"\"padding:0 0 {{token \"",[429,1902,1903],{"class":443},"size.block",[429,1905,1906],{"class":658},"\"}}px;{{style",[429,1908,1041],{"class":658},[429,1910,1044],{"class":658},[429,1912,1047],{"class":658},[429,1914,1050],{"class":658},[429,1916,1053],{"class":658},[429,1918,1056],{"class":658},[429,1920,447],{"class":435},[429,1922,1923,1925,1927,1929,1931,1934,1937,1939],{"class":431,"line":450},[429,1924,453],{"class":435},[429,1926,211],{"class":439},[429,1928,1021],{"class":443},[429,1930,461],{"class":435},[429,1932,1933],{"class":464},"\"margin:0 0 4px;font-weight:600;\"",[429,1935,1936],{"class":435},">{{.Attrs.title}}\u003C\u002F",[429,1938,211],{"class":439},[429,1940,447],{"class":435},[429,1942,1943],{"class":431,"line":494},[429,1944,1945],{"class":435},"{{content .Content}}\n",[429,1947,1948],{"class":431,"line":504},[429,1949,1824],{"class":435},[429,1951,1952,1954,1956,1958,1960],{"class":431,"line":522},[429,1953,724],{"class":435},[429,1955,324],{"class":439},[429,1957,683],{"class":435},[429,1959,306],{"class":439},[429,1961,447],{"class":435},[1963,1964,1965,1978,1990,2006,2014],"ul",{},[235,1966,1967,1970,1971,1974,1975,1977],{},[1072,1968,1969],{},"Any depth."," A child may declare ",[215,1972,1973],{},"children"," too, and ",[215,1976,248],{}," works at every level, up to the parser's 32.",[235,1979,1980,1983,1984,1986,1987,1989],{},[1072,1981,1982],{},"One view per template."," A component's templates always run with a ",[215,1985,244],{},", whether it is top-level or nested, so each is checked once, against its own schema. Inside a child's template, ",[215,1988,906],{}," are its own children.",[235,1991,1992,1995,1996,370,1998,2000,2001,2003,2004,298],{},[1072,1993,1994],{},"Text."," In ",[215,1997,270],{},[215,1999,248],{}," returns the child's text form with trailing newlines trimmed, or ",[215,2002,1353],{}," when the child has no ",[215,2005,270],{},[235,2007,2008,1726,2011,2013],{},[1072,2009,2010],{},"Spacing.",[215,2012,921],{}," is resolved among each set of siblings with the child's own schema.",[235,2015,2016,2019],{},[1072,2017,2018],{},"Errors"," from a child's template are reported at the child: its Markdown position and name, then its kit file. An error from deeper down keeps the deepest position.",[211,2021,2022,2023,2025,2026,298],{},"Reading a child's fields inline and calling ",[215,2024,248],{}," mix freely: ",[215,2027,2028],{},"{{range .Children}}\u003Ch2>{{.Attrs.title}}\u003C\u002Fh2>{{render .}}{{end}}",[211,2030,2031,2037,2038,737,2041,2044,2045,2048,2049,2051,2052,2054,2055,818],{},[1072,2032,2033,2034,2036],{},"Grandchildren are reached through ",[215,2035,248],{},", not inline."," In any template, ",[215,2039,2040],{},"ChildAttrs",[215,2042,2043],{},"ChildBind"," are typed by that component's direct children. So a grandparent that reads its grandchildren's fields inline, ",[215,2046,2047],{},"{{range .Children}}{{range .Children}}{{.Attrs.title}}{{end}}{{end}}",", is checked against the child's schema: a key only the grandchild has is a load error, and a key the child has passes the check and can fail when it renders. With ",[215,2050,636],{}," on ",[215,2053,1858],{}," but not on ",[215,2056,2057],{},"tip",[419,2059,2065],{"className":2060,"code":2062,"filename":2063,"language":2064,"meta":425},[2061],"language-text","$ lttr kit check .\u002Femailkit\nemailkit\u002Fsamples\u002Fsteps.md:8:1: steps: emailkit\u002Fcomponents\u002Fsteps\u002Fhtml.tmpl:3:49: map has no entry for key \"title\"\nlttr kit check: .\u002Femailkit: 1 problem\n","Terminal","text",[215,2066,2062],{"__ignoreMap":425},[224,2068,2070],{"id":2069},"render-markdown-blocks","Render Markdown blocks",[211,2072,2073,2075,2076,2078,2079,370,2082,370,2085,370,2088,370,2091,370,2093,737,2095,2097,2098,2101],{},[215,2074,289],{}," defines one template per block kind. ",[215,2077,285],{}," executes each top-level block through the define named by its kind and joins the output verbatim. Every kit defines ",[215,2080,2081],{},"paragraph",[215,2083,2084],{},"heading",[215,2086,2087],{},"list",[215,2089,2090],{},"actions",[215,2092,385],{},[215,2094,300],{},[215,2096,1397],{},", plus ",[215,2099,2100],{},"image"," when a component allows images. Plain's action row and action:",[419,2103,2106],{"className":421,"code":2104,"filename":2105,"language":424,"meta":425,"style":425},"{{define \"actions\"}}\u003Ctable role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\u003Ctr>\n{{- range .Actions}}\u003Ctd valign=\"middle\" style=\"padding:0 16px {{token \"size.block\"}}px 0;\">{{template \"action\" .}}\u003C\u002Ftd>{{end -}}\n\u003C\u002Ftr>\u003C\u002Ftable>{{end}}\n\n{{define \"action\"}}\n{{- if .Primary}}\u003Ctable role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\u003Ctr>\u003Ctd class=\"pl-btn\" bgcolor=\"{{token \"color.button\"}}\" style=\"{{style \"background-color\" \"color.button\"}}mso-padding-alt:10px 20px;\">\u003Ca class=\"pl-btn-a\" href=\"{{.Href}}\" style=\"display:inline-block;padding:10px 20px;{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.text\"}}px;line-height:20px;font-weight:600;{{style \"color\" \"color.on_button\"}}text-decoration:none;\">{{.Label}}\u003C\u002Fa>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftable>\n{{- else}}\u003Ca class=\"pl-link\" href=\"{{.Href}}\" style=\"{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.text\"}}px;line-height:20px;font-weight:600;{{style \"color\" \"color.accent\"}}text-decoration:none;\">{{.Label}}{{if .Arrow}}&nbsp;&rarr;{{end}}\u003C\u002Fa>\n{{- end}}\n{{- end}}\n","plain\u002Fblocks.html#L33-L41",[215,2107,2108,2145,2182,2195,2201,2206,2343,2395,2400],{"__ignoreMap":425},[429,2109,2110,2113,2115,2117,2119,2121,2123,2125,2127,2129,2131,2133,2135,2137,2139,2141,2143],{"class":431,"line":432},[429,2111,2112],{"class":435},"{{define \"actions\"}}\u003C",[429,2114,300],{"class":439},[429,2116,1180],{"class":443},[429,2118,461],{"class":435},[429,2120,1185],{"class":464},[429,2122,1196],{"class":443},[429,2124,461],{"class":435},[429,2126,1201],{"class":464},[429,2128,1204],{"class":443},[429,2130,461],{"class":435},[429,2132,1201],{"class":464},[429,2134,1211],{"class":658},[429,2136,461],{"class":435},[429,2138,1201],{"class":464},[429,2140,655],{"class":435},[429,2142,306],{"class":439},[429,2144,447],{"class":435},[429,2146,2147,2150,2152,2154,2156,2159,2161,2163,2166,2168,2170,2173,2175,2178,2180],{"class":431,"line":450},[429,2148,2149],{"class":435},"{{- range .Actions}}\u003C",[429,2151,324],{"class":439},[429,2153,1275],{"class":443},[429,2155,461],{"class":435},[429,2157,2158],{"class":464},"\"middle\"",[429,2160,1021],{"class":443},[429,2162,461],{"class":435},[429,2164,2165],{"class":464},"\"padding:0 16px {{token \"",[429,2167,1903],{"class":443},[429,2169,1032],{"class":658},[429,2171,2172],{"class":443}," 0;",[429,2174,1169],{"class":658},[429,2176,2177],{"class":435},">{{template \"action\" .}}\u003C\u002F",[429,2179,324],{"class":439},[429,2181,1591],{"class":435},[429,2183,2184,2186,2188,2190,2192],{"class":431,"line":494},[429,2185,724],{"class":435},[429,2187,306],{"class":439},[429,2189,683],{"class":435},[429,2191,300],{"class":439},[429,2193,2194],{"class":435},">{{end}}\n",[429,2196,2197],{"class":431,"line":504},[429,2198,2200],{"emptyLinePlaceholder":2199},true,"\n",[429,2202,2203],{"class":431,"line":522},[429,2204,2205],{"class":435},"{{define \"action\"}}\n",[429,2207,2208,2211,2213,2215,2217,2219,2221,2223,2225,2227,2229,2231,2233,2235,2237,2239,2241,2243,2245,2247,2249,2252,2255,2257,2260,2263,2266,2268,2270,2272,2275,2277,2280,2283,2285,2287,2289,2291,2293,2296,2298,2300,2303,2305,2307,2310,2312,2314,2316,2319,2321,2324,2327,2329,2331,2333,2335,2337,2339,2341],{"class":431,"line":547},[429,2209,2210],{"class":435},"{{- if .Primary}}\u003C",[429,2212,300],{"class":439},[429,2214,1180],{"class":443},[429,2216,461],{"class":435},[429,2218,1185],{"class":464},[429,2220,1196],{"class":443},[429,2222,461],{"class":435},[429,2224,1201],{"class":464},[429,2226,1204],{"class":443},[429,2228,461],{"class":435},[429,2230,1201],{"class":464},[429,2232,1211],{"class":658},[429,2234,461],{"class":435},[429,2236,1201],{"class":464},[429,2238,655],{"class":435},[429,2240,306],{"class":439},[429,2242,655],{"class":435},[429,2244,324],{"class":439},[429,2246,1005],{"class":443},[429,2248,461],{"class":435},[429,2250,2251],{"class":464},"\"pl-btn\"",[429,2253,2254],{"class":658}," bgcolor",[429,2256,461],{"class":435},[429,2258,2259],{"class":464},"\"{{token \"",[429,2261,2262],{"class":443},"color.button",[429,2264,2265],{"class":658},"\"}}\"",[429,2267,1021],{"class":443},[429,2269,461],{"class":435},[429,2271,1661],{"class":464},[429,2273,2274],{"class":443},"background-color",[429,2276,1169],{"class":658},[429,2278,2279],{"class":658}," \"color.button\"}}mso-padding-alt:10px",[429,2281,2282],{"class":443}," 20px;",[429,2284,1169],{"class":658},[429,2286,655],{"class":435},[429,2288,277],{"class":439},[429,2290,1005],{"class":443},[429,2292,461],{"class":435},[429,2294,2295],{"class":464},"\"pl-btn-a\"",[429,2297,1649],{"class":443},[429,2299,461],{"class":435},[429,2301,2302],{"class":464},"\"{{.Href}}\"",[429,2304,1021],{"class":443},[429,2306,461],{"class":435},[429,2308,2309],{"class":464},"\"display:inline-block;padding:10px 20px;{{style \"",[429,2311,1571],{"class":443},[429,2313,1169],{"class":658},[429,2315,1044],{"class":658},[429,2317,2318],{"class":658}," \"size.text\"}}px;line-height:20px;font-weight:600;{{style",[429,2320,1053],{"class":658},[429,2322,2323],{"class":658}," \"color.on_button\"}}text-decoration:none;\"",[429,2325,2326],{"class":435},">{{.Label}}\u003C\u002F",[429,2328,277],{"class":439},[429,2330,683],{"class":435},[429,2332,324],{"class":439},[429,2334,683],{"class":435},[429,2336,306],{"class":439},[429,2338,683],{"class":435},[429,2340,300],{"class":439},[429,2342,447],{"class":435},[429,2344,2345,2348,2350,2352,2354,2357,2359,2361,2363,2365,2367,2369,2371,2373,2375,2377,2379,2382,2385,2388,2391,2393],{"class":431,"line":563},[429,2346,2347],{"class":435},"{{- else}}\u003C",[429,2349,277],{"class":439},[429,2351,1005],{"class":443},[429,2353,461],{"class":435},[429,2355,2356],{"class":464},"\"pl-link\"",[429,2358,1649],{"class":443},[429,2360,461],{"class":435},[429,2362,2302],{"class":464},[429,2364,1021],{"class":443},[429,2366,461],{"class":435},[429,2368,1661],{"class":464},[429,2370,1571],{"class":443},[429,2372,1169],{"class":658},[429,2374,1044],{"class":658},[429,2376,2318],{"class":658},[429,2378,1053],{"class":658},[429,2380,2381],{"class":658}," \"color.accent\"}}text-decoration:none;\"",[429,2383,2384],{"class":435},">{{.Label}}{{if .Arrow}}",[429,2386,2387],{"class":1630},"&nbsp;&rarr;",[429,2389,2390],{"class":435},"{{end}}\u003C\u002F",[429,2392,277],{"class":439},[429,2394,447],{"class":435},[429,2396,2397],{"class":431,"line":586},[429,2398,2399],{"class":435},"{{- end}}\n",[429,2401,2402],{"class":431,"line":609},[429,2403,2399],{"class":435},[211,2405,2406,2407,818],{},"Each define executes with a ",[1072,2408,2409],{},[215,2410,381],{},[300,2412,2413,2421],{},[303,2414,2415],{},[306,2416,2417,2419],{},[309,2418,827],{},[309,2420,833],{},[319,2422,2423,2450,2469,2484,2494,2507,2517,2542,2556,2569,2581,2613],{},[306,2424,2425,2429],{},[324,2426,2427],{},[215,2428,314],{},[324,2430,2431,370,2433,370,2435,370,2437,370,2439,370,2441,2443,2444,2446,2447,2449],{},[215,2432,2081],{},[215,2434,2084],{},[215,2436,2087],{},[215,2438,2090],{},[215,2440,300],{},[215,2442,2100],{},", or ",[215,2445,1397],{}," for the ",[215,2448,1397],{}," define",[306,2451,2452,2457],{},[324,2453,2454],{},[215,2455,2456],{},"Variant",[324,2458,2459,2460,2463,2464,370,2466,2468],{},"The variant passed to ",[215,2461,2462],{},"content"," or ",[215,2465,1397],{},[215,2467,1353],{}," for none",[306,2470,2471,2481],{},[324,2472,2473,370,2475,370,2477,370,2479],{},[215,2474,1336],{},[215,2476,1340],{},[215,2478,1343],{},[215,2480,1346],{},[324,2482,2483],{},"The block's position among the content's top-level blocks, and the previous block's kind",[306,2485,2486,2491],{},[324,2487,2488],{},[215,2489,2490],{},"Level",[324,2492,2493],{},"A heading's level, 1 to 6",[306,2495,2496,2504],{},[324,2497,2498,370,2501],{},[215,2499,2500],{},"Ordered",[215,2502,2503],{},"Number",[324,2505,2506],{},"An ordered list; a list item's 1-based number",[306,2508,2509,2514],{},[324,2510,2511],{},[215,2512,2513],{},"HTML",[324,2515,2516],{},"The rendered inline HTML of a paragraph, heading, list item or inline value",[306,2518,2519,2527],{},[324,2520,2521,370,2524],{},[215,2522,2523],{},"Text",[215,2525,2526],{},"Lines",[324,2528,2529,2530,2532,2533,1102,2536,2538,2539,2541],{},"The plain text, soft breaks as spaces (",[215,2531,2523],{},") or kept as ",[215,2534,2535],{},"\"\\n\"",[215,2537,2526],{},"). For a table, ",[215,2540,2523],{}," is the core text layout",[306,2543,2544,2549],{},[324,2545,2546],{},[215,2547,2548],{},"Inline",[324,2550,2551,2552,2555],{},"The inline nodes (",[215,2553,2554],{},"[]kit.InlineView","), for kits that render inlines themselves",[306,2557,2558,2563],{},[324,2559,2560],{},[215,2561,2562],{},"Items",[324,2564,2565,2566],{},"A list's items, each a ",[215,2567,2568],{},"BlockView",[306,2570,2571,2576],{},[324,2572,2573],{},[215,2574,2575],{},"Actions",[324,2577,2578,2579],{},"An action row's items, each a ",[215,2580,389],{},[306,2582,2583,2594],{},[324,2584,2585,370,2588,370,2591],{},[215,2586,2587],{},"Header",[215,2589,2590],{},"Rows",[215,2592,2593],{},"Align",[324,2595,2596,2597,2600,2601,370,2603,370,2606,370,2609,2612],{},"A table's header cells, body rows (",[215,2598,2599],{},"kit.CellView",") and column alignments (",[215,2602,1353],{},[215,2604,2605],{},"left",[215,2607,2608],{},"center",[215,2610,2611],{},"right",")",[306,2614,2615,2626],{},[324,2616,2617,370,2620,370,2623],{},[215,2618,2619],{},"Src",[215,2621,2622],{},"Alt",[215,2624,2625],{},"Title",[324,2627,2628],{},"An image's checked source, alt text and title",[1963,2630,2631,2662,2680],{},[235,2632,2633,2637,2638,370,2641,2644,2645,2648,2649,2652,2653,758,2656,2648,2659,2661],{},[1072,2634,2635],{},[215,2636,389],{},": ",[215,2639,2640],{},"Label",[215,2642,2643],{},"Href"," (checked), ",[215,2646,2647],{},"Primary"," (a ",[215,2650,2651],{},":button",", not a ",[215,2654,2655],{},":link",[215,2657,2658],{},"Arrow",[215,2660,2655],{}," that asks for a trailing arrow).",[235,2663,2664,2637,2668,370,2670,370,2672,370,2674,737,2676,2679],{},[1072,2665,2666],{},[215,2667,2599],{},[215,2669,2513],{},[215,2671,2523],{},[215,2673,2526],{},[215,2675,2548],{},[215,2677,2678],{},"Strong"," (the whole cell is bold).",[235,2681,2682,2637,2687,1102,2689,370,2691,370,2693,370,2695,370,2698,370,2701,370,2704,2463,2706,751,2709,370,2711,370,2713,370,2715,370,2718,737,2721,298],{},[1072,2683,2684],{},[215,2685,2686],{},"kit.InlineView",[215,2688,314],{},[215,2690,2064],{},[215,2692,215],{},[215,2694,1072],{},[215,2696,2697],{},"em",[215,2699,2700],{},"strike",[215,2702,2703],{},"link",[215,2705,429],{},[215,2707,2708],{},"break",[215,2710,2523],{},[215,2712,2643],{},[215,2714,2625],{},[215,2716,2717],{},"Classes",[215,2719,2720],{},"Hard",[215,2722,1091],{},[211,2724,2725,2727,2728,737,2730,2733,2734,2737,2738,298],{},[215,2726,2513],{}," already carries the kit's ",[215,2729,1397],{},[215,2731,2732],{},"spans"," styles, so most kits print ",[215,2735,2736],{},"{{.HTML}}"," and never touch ",[215,2739,2548],{},[2741,2742,2744],"h3",{"id":2743},"pass-a-variant","Pass a variant",[211,2746,2747,737,2749,2751,2752,2755,2756,2759,2760,2762,2763,2766],{},[215,2748,2462],{},[215,2750,1397],{}," take one optional variant string: ",[215,2753,2754],{},"{{content .Content \"compact\"}}",". It is copied into ",[215,2757,2758],{},"BlockView.Variant"," of every block and list item, so one ",[215,2761,289],{}," can render the same Markdown two ways (",[215,2764,2765],{},"{{if eq .Variant \"compact\"}}…","). A second variant is a render error.",[224,2768,2770],{"id":2769},"use-the-core-functions","Use the core functions",[211,2772,2773,2774,298],{},"The core supplies these functions to every kit template. Their signatures are exact: the checker types every call against them when the kit loads. The names cannot be reused by ",[215,2775,2776],{},"kit.Funcs",[2741,2778,2780],{"id":2779},"in-every-template","In every template",[300,2782,2783,2796],{},[303,2784,2785],{},[306,2786,2787,2790,2793],{},[309,2788,2789],{},"Function",[309,2791,2792],{},"Signature",[309,2794,2795],{},"What it does",[319,2797,2798,2813,2828,2846,2870,2888],{},[306,2799,2800,2805,2810],{},[324,2801,2802],{},[215,2803,2804],{},"token",[324,2806,2807],{},[215,2808,2809],{},"token(name string) string",[324,2811,2812],{},"A token's value: the value, or a colour's light value",[306,2814,2815,2820,2825],{},[324,2816,2817],{},[215,2818,2819],{},"dark",[324,2821,2822],{},[215,2823,2824],{},"dark(name string) string",[324,2826,2827],{},"A colour token's dark value",[306,2829,2830,2834,2839],{},[324,2831,2832],{},[215,2833,1400],{},[324,2835,2836],{},[215,2837,2838],{},"var(name string) string",[324,2840,2841,2842,2845],{},"A kit var: the renderer's ",[215,2843,2844],{},"Config.Vars"," value, else the kit default",[306,2847,2848,2853,2858],{},[324,2849,2850],{},[215,2851,2852],{},"px",[324,2854,2855],{},[215,2856,2857],{},"px(n int) string",[324,2859,2860,2863,2864,2443,2867,2869],{},[215,2861,2862],{},"n"," as ",[215,2865,2866],{},"\"Npx\"",[215,2868,1201],{}," for zero",[306,2871,2872,2877,2882],{},[324,2873,2874],{},[215,2875,2876],{},"upper",[324,2878,2879],{},[215,2880,2881],{},"upper(s string) string",[324,2883,2884,2887],{},[215,2885,2886],{},"s"," in capitals",[306,2889,2890,2895,2900],{},[324,2891,2892],{},[215,2893,2894],{},"fail",[324,2896,2897],{},[215,2898,2899],{},"fail(msg string) (string, error)",[324,2901,2902,2903,2906,2907],{},"Always an error with ",[215,2904,2905],{},"msg",", for rules a schema cannot express. Not in ",[215,2908,293],{},[211,2910,2911,2914,2915,2917,2918,2921],{},[215,2912,2913],{},"index"," is the ",[215,2916,221],{}," builtin with one change at render time: a missing map key is an error (",[215,2919,2920],{},"index of missing key \"gold\"",") instead of an empty value.",[2741,2923,2925],{"id":2924},"in-html-templates","In HTML templates",[300,2927,2928,2938],{},[303,2929,2930],{},[306,2931,2932,2934,2936],{},[309,2933,2789],{},[309,2935,2792],{},[309,2937,2795],{},[319,2939,2940,2957,2979,2999,3052,3067,3086,3101,3122,3143,3168,3185],{},[306,2941,2942,2946,2951],{},[324,2943,2944],{},[215,2945,2462],{},[324,2947,2948],{},[215,2949,2950],{},"content(c kit.Content, variant ...string) (template.HTML, error)",[324,2952,2953,2954,2956],{},"Renders content through the ",[215,2955,289],{}," defines",[306,2958,2959,2963,2968],{},[324,2960,2961],{},[215,2962,248],{},[324,2964,2965],{},[215,2966,2967],{},"render(v kit.ChildView) (template.HTML, error)",[324,2969,2970,2971,256,2973,2975,2976],{},"Executes a nested component's own ",[215,2972,240],{},[215,2974,244],{}," of it. See ",[277,2977,1716],{"href":2978},"#render-nested-components",[306,2980,2981,2985,2990],{},[324,2982,2983],{},[215,2984,1397],{},[324,2986,2987],{},[215,2988,2989],{},"inline(v kit.Inline, variant ...string) (template.HTML, error)",[324,2991,2992,2993,2995,2996,2998],{},"Renders an ",[215,2994,1397],{}," attribute or frontmatter value through the ",[215,2997,1397],{}," define. A nil value renders nothing",[306,3000,3001,3005,3010],{},[324,3002,3003],{},[215,3004,704],{},[324,3006,3007],{},[215,3008,3009],{},"style(kv ...string) (template.CSS, error)",[324,3011,3012,3013,3016,3017,3020,3021,370,3024,370,3027,370,3030,370,3032,370,3035,370,3037,3040,3041,3044,3045,2463,3048,3051],{},"Builds ",[215,3014,3015],{},"prop:value;"," pairs. A value that names a token becomes the token's value. Empty values are left out. An odd count, a property outside ",[215,3018,3019],{},"[a-z-]+",", or a value with ",[215,3022,3023],{},";",[215,3025,3026],{},"{",[215,3028,3029],{},"}",[215,3031,453],{},[215,3033,3034],{},">",[215,3036,1169],{},[215,3038,3039],{},"\\",", an unpaired ",[215,3042,3043],{},"'",", a comment, ",[215,3046,3047],{},"url(",[215,3049,3050],{},"expression("," is an error",[306,3053,3054,3059,3064],{},[324,3055,3056],{},[215,3057,3058],{},"url",[324,3060,3061],{},[215,3062,3063],{},"url(s string) (template.URL, error)",[324,3065,3066],{},"Checks a URL built in the template: https, http, mailto or tel, no whitespace. Relative URLs only in previews",[306,3068,3069,3074,3079],{},[324,3070,3071],{},[215,3072,3073],{},"msoOpen",[324,3075,3076],{},[215,3077,3078],{},"msoOpen(width int) template.HTML",[324,3080,3081,3082,3085],{},"Opens an Outlook-only centred table ",[215,3083,3084],{},"width"," px wide",[306,3087,3088,3093,3098],{},[324,3089,3090],{},[215,3091,3092],{},"msoClose",[324,3094,3095],{},[215,3096,3097],{},"msoClose() template.HTML",[324,3099,3100],{},"Closes it",[306,3102,3103,3111,3119],{},[324,3104,3105,370,3108],{},[215,3106,3107],{},"msoIf",[215,3109,3110],{},"msoEnd",[324,3112,3113,370,3116],{},[215,3114,3115],{},"msoIf() template.HTML",[215,3117,3118],{},"msoEnd() template.HTML",[324,3120,3121],{},"Wrap markup only Outlook renders",[306,3123,3124,3132,3140],{},[324,3125,3126,370,3129],{},[215,3127,3128],{},"notMsoOpen",[215,3130,3131],{},"notMsoClose",[324,3133,3134,370,3137],{},[215,3135,3136],{},"notMsoOpen() template.HTML",[215,3138,3139],{},"notMsoClose() template.HTML",[324,3141,3142],{},"Wrap markup every client but Outlook renders",[306,3144,3145,3150,3155],{},[324,3146,3147],{},[215,3148,3149],{},"button",[324,3151,3152],{},[215,3153,3154],{},"button(href template.URL, label, fill, text string, width, height int) template.HTML",[324,3156,3157,3158,737,3161,3163,3164,3167],{},"A bulletproof pill button: VML for Outlook, a link for everyone else. ",[215,3159,3160],{},"fill",[215,3162,2064],{}," must be a ",[215,3165,3166],{},"#hex"," colour or a keyword",[306,3169,3170,3174,3179],{},[324,3171,3172],{},[215,3173,800],{},[324,3175,3176],{},[215,3177,3178],{},"preheader(s string) template.HTML",[324,3180,3181,3182],{},"The hidden preheader ",[215,3183,3184],{},"\u003Cdiv>",[306,3186,3187,3191,3196],{},[324,3188,3189],{},[215,3190,777],{},[324,3192,3193],{},[215,3194,3195],{},"document() template.HTML",[324,3197,3198,3199,3201],{},"The doctype, ",[215,3200,781],{}," and the head metas, through the Outlook settings block",[2741,3203,3205],{"id":3204},"in-text-templates","In text templates",[300,3207,3208,3218],{},[303,3209,3210],{},[306,3211,3212,3214,3216],{},[309,3213,2789],{},[309,3215,2792],{},[309,3217,2795],{},[319,3219,3220,3234,3253,3267,3282,3297,3312,3326],{},[306,3221,3222,3226,3231],{},[324,3223,3224],{},[215,3225,2462],{},[324,3227,3228],{},[215,3229,3230],{},"content(c kit.Content, variant ...string) (string, error)",[324,3232,3233],{},"Renders content through the text block defines",[306,3235,3236,3240,3245],{},[324,3237,3238],{},[215,3239,248],{},[324,3241,3242],{},[215,3243,3244],{},"render(v kit.ChildView) (string, error)",[324,3246,2970,3247,3249,3250,3252],{},[215,3248,270],{},", trailing newlines trimmed; ",[215,3251,1353],{}," when it has none",[306,3254,3255,3259,3264],{},[324,3256,3257],{},[215,3258,1397],{},[324,3260,3261],{},[215,3262,3263],{},"inline(v kit.Inline, variant ...string) (string, error)",[324,3265,3266],{},"Renders an inline value as text",[306,3268,3269,3274,3279],{},[324,3270,3271],{},[215,3272,3273],{},"wrap",[324,3275,3276],{},[215,3277,3278],{},"wrap(s string) string",[324,3280,3281],{},"Wraps at 70 characters",[306,3283,3284,3289,3294],{},[324,3285,3286],{},[215,3287,3288],{},"leaders",[324,3290,3291],{},[215,3292,3293],{},"leaders(rows ...kit.Leader) string",[324,3295,3296],{},"Dot-leader rows, values in one column",[306,3298,3299,3304,3309],{},[324,3300,3301],{},[215,3302,3303],{},"leader",[324,3305,3306],{},[215,3307,3308],{},"leader(label, value string, sub ...string) kit.Leader",[324,3310,3311],{},"One dot-leader row, with at most one sub-value",[306,3313,3314,3318,3323],{},[324,3315,3316],{},[215,3317,1116],{},[324,3319,3320],{},[215,3321,3322],{},"columns(header []string, rows [][]string, right []bool) string",[324,3324,3325],{},"Padded columns",[306,3327,3328,3339,3350],{},[324,3329,3330,370,3333,370,3336],{},[215,3331,3332],{},"cells",[215,3334,3335],{},"rows",[215,3337,3338],{},"bools",[324,3340,3341,370,3344,370,3347],{},[215,3342,3343],{},"cells(v ...string) []string",[215,3345,3346],{},"rows(r ...[]string) [][]string",[215,3348,3349],{},"bools(b ...bool) []bool",[324,3351,3352,3353],{},"Build the arguments of ",[215,3354,1116],{},[211,3356,3357,3359,3360,3362,3363,370,3365,370,3367,370,3369,737,3371,298],{},[277,3358,107],{"href":108}," shows the text functions at work. ",[215,3361,293],{}," gets ",[215,3364,2804],{},[215,3366,2819],{},[215,3368,1400],{},[215,3370,2852],{},[215,3372,2876],{},[2741,3374,3376],{"id":3375},"know-how-errors-surface","Know how errors surface",[211,3378,3379,3380,3382,3383,3386],{},"A function error, a missing map key or a nil pointer while rendering is a render error carrying two positions: the component in the Markdown template, then the kit file. ",[215,3381,2894],{}," reports its message alone. One line from each of three ",[215,3384,3385],{},"lttr kit check .\u002Femailkit"," runs:",[419,3388,3391],{"className":3389,"code":3390,"filename":2063,"language":2064,"meta":425},[2061],"emailkit\u002Fsamples\u002Fwelcome.md:8:1: section: emailkit\u002Fcomponents\u002Fsection\u002Fhtml.tmpl:1:128: error calling style: style: odd number of arguments (1)\nemailkit\u002Fsamples\u002Fwelcome.md:16:1: button: emailkit\u002Fcomponents\u002Fbutton\u002Fhtml.tmpl:2:267: error calling url: url \"javascript:alert(1)\": scheme \"javascript\" not allowed\nemailkit\u002Fsamples\u002Fwelcome.md:19:1: image: width must be at least 1\n",[215,3392,3390],{"__ignoreMap":425},[211,3394,3395,3396,3399,3400,818],{},"The first two come from a copy of Plain broken on purpose. The third comes from a sample with ",[215,3397,3398],{},"width=\"0\"",", which Plain's own image template refuses with ",[215,3401,2894],{},[419,3403,3406],{"className":421,"code":3404,"filename":3405,"language":424,"meta":425,"style":425},"{{- \u002F* Outlook sizes images from the width attribute, so it is capped at the\ncontent width (size.content). *\u002F -}}\n{{- $w := .Attrs.width}}{{if lt $w 1}}{{fail \"width must be at least 1\"}}{{end}}{{if gt $w 496}}{{$w = 496}}{{end -}}\n","plain\u002Fcomponents\u002Fimage\u002Fhtml.tmpl#L1-L3",[215,3407,3408,3413,3418],{"__ignoreMap":425},[429,3409,3410],{"class":431,"line":432},[429,3411,3412],{"class":435},"{{- \u002F* Outlook sizes images from the width attribute, so it is capped at the\n",[429,3414,3415],{"class":431,"line":450},[429,3416,3417],{"class":435},"content width (size.content). *\u002F -}}\n",[429,3419,3420],{"class":431,"line":494},[429,3421,3422],{"class":435},"{{- $w := .Attrs.width}}{{if lt $w 1}}{{fail \"width must be at least 1\"}}{{end}}{{if gt $w 496}}{{$w = 496}}{{end -}}\n",[224,3424,3426],{"id":3425},"write-the-head-css","Write the head CSS",[211,3428,3429,3431,3432,3434,3435,2863,3437,3439],{},[215,3430,293],{}," is a ",[215,3433,221],{}," over the tokens and vars, written into the layout's ",[215,3436,796],{},[215,3438,297],{},". It holds what inline styles cannot: resets, the phone breakpoint and the dark palette. Plain's phone rules use size tokens:",[419,3441,3446],{"className":3442,"code":3443,"filename":3444,"language":3445,"meta":425,"style":425},"language-css shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark","@media only screen and (max-width:599px){\n.pl-outer{padding:0!important}\n.pl-surface{border:0!important}\n.pl-px{padding-left:{{token \"size.side_mobile\"}}px!important;padding-right:{{token \"size.side_mobile\"}}px!important}\n.pl-h1{font-size:{{token \"size.h1_mobile\"}}px!important;line-height:{{token \"size.h1_mobile_line\"}}px!important}\n.pl-col{display:block!important;width:100%!important;padding:0!important}\n.pl-col-n{padding-top:8px!important}\n.pl-btn-t{width:100%!important}\n.pl-btn-a{display:block!important;text-align:center!important}\n}\n","plain\u002Fstyles.css#L7-L16","css",[215,3447,3448,3478,3499,3517,3564,3608,3649,3669,3686,3714],{"__ignoreMap":425},[429,3449,3450,3454,3457,3460,3463,3465,3468,3470,3473,3475],{"class":431,"line":432},[429,3451,3453],{"class":3452},"s1Q0q","@media",[429,3455,3456],{"class":3452}," only",[429,3458,3459],{"class":710}," screen",[429,3461,3462],{"class":3452}," and",[429,3464,1102],{"class":435},[429,3466,3467],{"class":710},"max-width",[429,3469,818],{"class":435},[429,3471,3472],{"class":710},"599",[429,3474,2852],{"class":3452},[429,3476,3477],{"class":435},"){\n",[429,3479,3480,3483,3485,3488,3490,3493,3496],{"class":431,"line":450},[429,3481,3482],{"class":443},".pl-outer",[429,3484,3026],{"class":435},[429,3486,3487],{"class":710},"padding",[429,3489,818],{"class":435},[429,3491,3492],{"class":710},"0",[429,3494,3495],{"class":3452},"!important",[429,3497,3498],{"class":435},"}\n",[429,3500,3501,3504,3506,3509,3511,3513,3515],{"class":431,"line":494},[429,3502,3503],{"class":443},".pl-surface",[429,3505,3026],{"class":435},[429,3507,3508],{"class":710},"border",[429,3510,818],{"class":435},[429,3512,3492],{"class":710},[429,3514,3495],{"class":3452},[429,3516,3498],{"class":435},[429,3518,3519,3522,3524,3527,3530,3533,3536,3539,3542,3544,3547,3550,3552,3555,3558,3561],{"class":431,"line":504},[429,3520,3521],{"class":443},".pl-px",[429,3523,3026],{"class":435},[429,3525,3526],{"class":710},"padding-left",[429,3528,3529],{"class":435},":{{token ",[429,3531,3532],{"class":464},"\"size.side_mobile\"",[429,3534,3535],{"class":435},"}}px!important;",[429,3537,3538],{"class":439},"padding-right",[429,3540,3541],{"class":435},":{{",[429,3543,2804],{"class":710},[429,3545,3546],{"class":435}," \"",[429,3548,3549],{"class":710},"size",[429,3551,298],{"class":435},[429,3553,3554],{"class":710},"side",[429,3556,3557],{"class":435},"_",[429,3559,3560],{"class":710},"mobile",[429,3562,3563],{"class":435},"\"}}px!important}\n",[429,3565,3566,3569,3571,3574,3576,3579,3581,3584,3586,3588,3590,3592,3594,3597,3600,3602,3604,3606],{"class":431,"line":522},[429,3567,3568],{"class":443},".pl-h1",[429,3570,3026],{"class":435},[429,3572,3573],{"class":710},"font-size",[429,3575,3529],{"class":435},[429,3577,3578],{"class":464},"\"size.h1_mobile\"",[429,3580,3535],{"class":435},[429,3582,3583],{"class":439},"line-height",[429,3585,3541],{"class":435},[429,3587,2804],{"class":710},[429,3589,3546],{"class":435},[429,3591,3549],{"class":710},[429,3593,298],{"class":435},[429,3595,3596],{"class":710},"h",[429,3598,3599],{"class":435},"1_",[429,3601,3560],{"class":710},[429,3603,3557],{"class":435},[429,3605,431],{"class":710},[429,3607,3563],{"class":435},[429,3609,3610,3613,3615,3618,3620,3623,3625,3627,3629,3631,3634,3637,3639,3641,3643,3645,3647],{"class":431,"line":547},[429,3611,3612],{"class":443},".pl-col",[429,3614,3026],{"class":435},[429,3616,3617],{"class":710},"display",[429,3619,818],{"class":435},[429,3621,3622],{"class":710},"block",[429,3624,3495],{"class":3452},[429,3626,3023],{"class":435},[429,3628,3084],{"class":710},[429,3630,818],{"class":435},[429,3632,3633],{"class":710},"100",[429,3635,3636],{"class":3452},"%!important",[429,3638,3023],{"class":435},[429,3640,3487],{"class":710},[429,3642,818],{"class":435},[429,3644,3492],{"class":710},[429,3646,3495],{"class":3452},[429,3648,3498],{"class":435},[429,3650,3651,3654,3656,3659,3661,3664,3667],{"class":431,"line":563},[429,3652,3653],{"class":443},".pl-col-n",[429,3655,3026],{"class":435},[429,3657,3658],{"class":710},"padding-top",[429,3660,818],{"class":435},[429,3662,3663],{"class":710},"8",[429,3665,3666],{"class":3452},"px!important",[429,3668,3498],{"class":435},[429,3670,3671,3674,3676,3678,3680,3682,3684],{"class":431,"line":586},[429,3672,3673],{"class":443},".pl-btn-t",[429,3675,3026],{"class":435},[429,3677,3084],{"class":710},[429,3679,818],{"class":435},[429,3681,3633],{"class":710},[429,3683,3636],{"class":3452},[429,3685,3498],{"class":435},[429,3687,3688,3691,3693,3695,3697,3699,3701,3703,3706,3708,3710,3712],{"class":431,"line":609},[429,3689,3690],{"class":443},".pl-btn-a",[429,3692,3026],{"class":435},[429,3694,3617],{"class":710},[429,3696,818],{"class":435},[429,3698,3622],{"class":710},[429,3700,3495],{"class":3452},[429,3702,3023],{"class":435},[429,3704,3705],{"class":710},"text-align",[429,3707,818],{"class":435},[429,3709,2608],{"class":710},[429,3711,3495],{"class":3452},[429,3713,3498],{"class":435},[429,3715,3716],{"class":431,"line":631},[429,3717,3498],{"class":435},[211,3719,3720,3721,3723,3724,279],{},"Because it is executed as text and its output is trusted as CSS, token and var values may not contain characters that could end the ",[215,3722,796],{}," element or a rule (see ",[277,3725,79],{"href":3726},"\u002Fkits\u002Fkit-yaml#keep-token-values-css-safe",[224,3728,3730],{"id":3729},"next-steps","Next steps",[1963,3732,3733,3738],{},[235,3734,3735,3737],{},[277,3736,92],{"href":93},": what the checker catches, and what it cannot.",[235,3739,3740,3742],{},[277,3741,102],{"href":103},": the Outlook helpers and the lint.",[704,3744,3745],{},"html pre.shiki code .sihDN, html code.shiki .sihDN{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#E1E4E8}html pre.shiki code .s71pN, html code.shiki .s71pN{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#85E89D}html pre.shiki code .sQJpg, html code.shiki .sQJpg{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#B392F0}html pre.shiki code .sRBGO, html code.shiki .sRBGO{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#9ECBFF}html pre.shiki code .s-oVe, html code.shiki .s-oVe{--shiki-light:#6E011A;--shiki-light-font-style:italic;--shiki-default:#6E011A;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sTl1q, html code.shiki .sTl1q{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sFaxo, html code.shiki .sFaxo{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#79B8FF}html pre.shiki code .s1Q0q, html code.shiki .s1Q0q{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#F97583}",{"title":425,"searchDepth":450,"depth":450,"links":3747},[3748,3749,3750,3751,3752,3755,3761,3762],{"id":226,"depth":450,"text":227},{"id":411,"depth":450,"text":412},{"id":806,"depth":450,"text":807},{"id":1715,"depth":450,"text":1716},{"id":2069,"depth":450,"text":2070,"children":3753},[3754],{"id":2743,"depth":494,"text":2744},{"id":2769,"depth":450,"text":2770,"children":3756},[3757,3758,3759,3760],{"id":2779,"depth":494,"text":2780},{"id":2924,"depth":494,"text":2925},{"id":3204,"depth":494,"text":3205},{"id":3375,"depth":494,"text":3376},{"id":3425,"depth":450,"text":3426},{"id":3729,"depth":450,"text":3730},"The kit's templates, the typed view each one executes with, and every core template function, with its signature.","md",null,{},{"icon":56},{"title":88,"description":3763},"_LIaYpvS1tTRnJScJJ_x0htWE_2GmdwqMiE28XRXQhk",[3771,3773],{"title":84,"path":85,"stem":86,"description":3772,"icon":51,"children":-1},"component.yaml, key by key — attributes, bindings, content rules, children, ordering, limits and spacing — and the compile errors each rule produces.",{"title":92,"path":93,"stem":94,"description":3774,"icon":95,"children":-1},"What kit.Load checks in every kit template before anything renders, the errors it reports, and the mistakes that only surface at render time.",1790467460845]