SlideShare une entreprise Scribd logo
1  sur  17
& JavaScript Templating http://jade-lang.com/ @WeAreFractal
Wat? Web Template Engine - Pull in content and combine with layout & structure template to produce native web output i.e.: pull content out of a DB, process along with template to produce pure HTML output Grails gsp: <ul> <g:each in="${items}" var="item">  	<li>${item}</li>  </g:each>  </ul> ------------------------------------------------------------------------------------------------------ <ul>  <li>Grails</li>  <li>Groovy</li> </ul>
Why? Obvious one – support dynamic content  Provides if-then-else logic, iteration Separation of Concern - separate presentation from content  Modularized – break out header, footer, etc
JS - Client or Server? JS has client-side templating most notably jquery and underscore With the advent of node you get support for (more traditional?) server-side templating We chose to go with client-side, to support our efforts using Spine.js, and since we are just using websockets Interesting argument from hij1nx of nodejitsuhttp://blog.nodejitsu.com/micro-templates-are-dead
Comparison
ERB <div id="profile">  <div class="left column">  	<div id="date"> 		<%= print_date%>	 	</div>  	<div id="address"> 		<%= current_user.address%> 	</div> </div>  <div class="right column">  	<div id="email"> 		<%= current_user.email%> 	</div>  	<div id="bio"> 		<%= current_user.bio %> 	</div> </div>  </div>
{{mustache}} in Ruby   <div class="row">       {{#projects}}         <a href="{{url}}" class="block">           <h2> {{name}} </h2>           <p> {{description}} </p>         </a>       {{/projects}}     </div>
JQuery Template {{if data.length}}  <ul>  {{each data}}   <li> 	<a href="#/category/${$value._id}">    		${$value.name} 	</a> </li> {{/each}} </ul>
HAML #profile  .left.column 	#date= print_date 	#address= current_user.address.right.column 	#email= current_user.email 	#bio= current_user.bio
!!! 5  html(lang="en")  head  	title= pageTitle 	script(type='text/javascript')  	if (foo) { bar() }  body  	h1 Jade - node template engine  	#container  	- if (youAreUsingJade)  		p You are amazing  	- else  		p Get on it!
<!DOCTYPE html>  <html lang="en">  <head>  <title>Jade</title>  <script type="text/javascript">  	if (foo) { bar() }  </script>  </head>  <body>  <h1>Jade - node template engine</h1>  <div id="container">  	<p>You are amazing</p>  </div>  </body>  </html>
Jade:HTML::Coffeescript:Javascript Heavily influenced by HAML Made by https://github.com/visionmedia (core committer on express) Written in JavaScript for node Can be used client side
A tag is just a word:  html Hash for id’s:  div#mydiv Classes:  div.myclass Chain: div#foo.class1.class2 Div sugar: #foo .bar
Tag text:  p some text!  vars:  - varfoo = ‘bar’ iteration:  ,[object Object],p= obj[key]Chain: Comments: // comment >> <!-– comment --> //- comment >> will not output Block Comments: //  	#content
Stylus body { font: 12px Helvetica, Arial, sans-serif; } a.button {  	-webkit-border-radius: 5px;  	-moz-border-radius: 5px;  	border-radius: 5px;  } --------------------------------------------------- body  	font 12px Helvetica, Arial, sans-serif  a.button 	-webkit-border-radius 5px  	-moz-border-radius 5px  	border-radius 5px
Running Server Side: Cli: $ jade file.jade # compile jade template to file.html In node: varfn =jade.compile('string of jade', options); Client Side: Jade runtime client-side (jade.js) Compile to pure js functions : function anonymous(locals, attrs, escape, rethrow) { varbuf = []; with (locals || {}) { varinterp; buf.push('<p>Hello ' + escape((interp = name) == null ? '' : interp) + '</p>'); } return buf.join(""); }

Contenu connexe

Tendances

Tendances (20)

Intro to HTML and CSS
Intro to HTML and CSSIntro to HTML and CSS
Intro to HTML and CSS
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]
 
#1 of HTML and CSS3
#1 of HTML and CSS3 #1 of HTML and CSS3
#1 of HTML and CSS3
 
Te Vi Venir
Te Vi VenirTe Vi Venir
Te Vi Venir
 
Javascript
JavascriptJavascript
Javascript
 
Introduction to html class-1
Introduction to html class-1Introduction to html class-1
Introduction to html class-1
 
Yerma
YermaYerma
Yerma
 
Rakshat bhati
Rakshat bhatiRakshat bhati
Rakshat bhati
 
YL Intro html
YL Intro htmlYL Intro html
YL Intro html
 
HTML to FTP
HTML to FTPHTML to FTP
HTML to FTP
 
Ghghghghghg
GhghghghghgGhghghghghg
Ghghghghghg
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
Babitha3.css
Babitha3.cssBabitha3.css
Babitha3.css
 
Front-End Tooling
Front-End ToolingFront-End Tooling
Front-End Tooling
 
Using jQuery Templates
Using jQuery TemplatesUsing jQuery Templates
Using jQuery Templates
 
Semantics & the Mobile Web
Semantics & the Mobile WebSemantics & the Mobile Web
Semantics & the Mobile Web
 
Html
HtmlHtml
Html
 
Html tags
Html tagsHtml tags
Html tags
 
HTML X CSS
HTML X CSSHTML X CSS
HTML X CSS
 
XHTML/CSS Presentation
XHTML/CSS PresentationXHTML/CSS Presentation
XHTML/CSS Presentation
 

Similaire à Jade & Javascript templating

Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing GadgetsQuirk
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXHilary Mason
 
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7phuphax
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overviewreybango
 
Java Script
Java ScriptJava Script
Java Scriptsiddaram
 
Optimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesOptimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesSugree Phatanapherom
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Tatsuhiko Miyagawa
 
HTML5 with examples
HTML5 with examplesHTML5 with examples
HTML5 with examplesgopivthmk
 
HTML5 - One spec to rule them all
HTML5 - One spec to rule them allHTML5 - One spec to rule them all
HTML5 - One spec to rule them allStu King
 
What I brought back from Austin
What I brought back from AustinWhat I brought back from Austin
What I brought back from AustinLisa Adkins
 

Similaire à Jade & Javascript templating (20)

Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing Gadgets
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAX
 
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
Html5
Html5Html5
Html5
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overview
 
Java Script
Java ScriptJava Script
Java Script
 
Optimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesOptimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile Devices
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
Html ppt
Html pptHtml ppt
Html ppt
 
Html5
Html5Html5
Html5
 
HTML5 with examples
HTML5 with examplesHTML5 with examples
HTML5 with examples
 
HTML5 - One spec to rule them all
HTML5 - One spec to rule them allHTML5 - One spec to rule them all
HTML5 - One spec to rule them all
 
Html
HtmlHtml
Html
 
What I brought back from Austin
What I brought back from AustinWhat I brought back from Austin
What I brought back from Austin
 
Grails and Dojo
Grails and DojoGrails and Dojo
Grails and Dojo
 
Introducing YUI
Introducing YUIIntroducing YUI
Introducing YUI
 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSS
 
Lecture1 B Frames&Forms
Lecture1 B  Frames&FormsLecture1 B  Frames&Forms
Lecture1 B Frames&Forms
 

Plus de wearefractal

Plus de wearefractal (6)

Bdd spex
Bdd spexBdd spex
Bdd spex
 
Novajs
NovajsNovajs
Novajs
 
nodester Architecture overview & roadmap
nodester Architecture overview & roadmapnodester Architecture overview & roadmap
nodester Architecture overview & roadmap
 
Spine.js
Spine.jsSpine.js
Spine.js
 
ChanJS
ChanJSChanJS
ChanJS
 
Fusker - A NodeJS Security Framework
Fusker - A NodeJS Security FrameworkFusker - A NodeJS Security Framework
Fusker - A NodeJS Security Framework
 

Dernier

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 

Dernier (20)

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 

Jade & Javascript templating

  • 1. & JavaScript Templating http://jade-lang.com/ @WeAreFractal
  • 2. Wat? Web Template Engine - Pull in content and combine with layout & structure template to produce native web output i.e.: pull content out of a DB, process along with template to produce pure HTML output Grails gsp: <ul> <g:each in="${items}" var="item"> <li>${item}</li> </g:each> </ul> ------------------------------------------------------------------------------------------------------ <ul> <li>Grails</li> <li>Groovy</li> </ul>
  • 3. Why? Obvious one – support dynamic content Provides if-then-else logic, iteration Separation of Concern - separate presentation from content Modularized – break out header, footer, etc
  • 4. JS - Client or Server? JS has client-side templating most notably jquery and underscore With the advent of node you get support for (more traditional?) server-side templating We chose to go with client-side, to support our efforts using Spine.js, and since we are just using websockets Interesting argument from hij1nx of nodejitsuhttp://blog.nodejitsu.com/micro-templates-are-dead
  • 6. ERB <div id="profile"> <div class="left column"> <div id="date"> <%= print_date%> </div> <div id="address"> <%= current_user.address%> </div> </div> <div class="right column"> <div id="email"> <%= current_user.email%> </div> <div id="bio"> <%= current_user.bio %> </div> </div> </div>
  • 7. {{mustache}} in Ruby   <div class="row">       {{#projects}}         <a href="{{url}}" class="block">           <h2> {{name}} </h2>           <p> {{description}} </p>         </a>       {{/projects}}     </div>
  • 8. JQuery Template {{if data.length}}  <ul>  {{each data}}   <li> <a href="#/category/${$value._id}">  ${$value.name} </a> </li> {{/each}} </ul>
  • 9. HAML #profile .left.column #date= print_date #address= current_user.address.right.column #email= current_user.email #bio= current_user.bio
  • 10.
  • 11. !!! 5 html(lang="en") head title= pageTitle script(type='text/javascript') if (foo) { bar() } body h1 Jade - node template engine #container - if (youAreUsingJade) p You are amazing - else p Get on it!
  • 12. <!DOCTYPE html> <html lang="en"> <head> <title>Jade</title> <script type="text/javascript"> if (foo) { bar() } </script> </head> <body> <h1>Jade - node template engine</h1> <div id="container"> <p>You are amazing</p> </div> </body> </html>
  • 13. Jade:HTML::Coffeescript:Javascript Heavily influenced by HAML Made by https://github.com/visionmedia (core committer on express) Written in JavaScript for node Can be used client side
  • 14. A tag is just a word: html Hash for id’s: div#mydiv Classes: div.myclass Chain: div#foo.class1.class2 Div sugar: #foo .bar
  • 15.
  • 16. Stylus body { font: 12px Helvetica, Arial, sans-serif; } a.button { -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } --------------------------------------------------- body font 12px Helvetica, Arial, sans-serif a.button -webkit-border-radius 5px -moz-border-radius 5px border-radius 5px
  • 17. Running Server Side: Cli: $ jade file.jade # compile jade template to file.html In node: varfn =jade.compile('string of jade', options); Client Side: Jade runtime client-side (jade.js) Compile to pure js functions : function anonymous(locals, attrs, escape, rethrow) { varbuf = []; with (locals || {}) { varinterp; buf.push('<p>Hello ' + escape((interp = name) == null ? '' : interp) + '</p>'); } return buf.join(""); }