Skip to content

Instantly share code, notes, and snippets.

@vybs
Created December 9, 2011 00:30
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save vybs/1449461 to your computer and use it in GitHub Desktop.
Save vybs/1449461 to your computer and use it in GitHub Desktop.
simple skills list dust template
{#profile_skill}
<div class="section" id="profile-skills" style="display:block">
<div class="header">
<h2>{@pre:i18n text="Skills"}</h2>
</div>
{?skills} {! we still want to display the Skills heading, even if the number of skills is zero !}
<div class="content">
<ol class="skills" id="skills-list">
{#skills}
<li class="competency show-bean">
<span class="miniprofile-container jellybean">{.name}</span>
</li>
{/skills}
</ol>
</div>
{/skills}
</div>
{/profile_skill}
"profile_skill": {
"skills": [{
"name": "JavaScript"
}, {
"name": "Ruby"
}, {
"name": "Java"
}],
"i18n_skills": "Skills" // when rendered with current locale en_US
}
@alohaTu
Copy link

alohaTu commented Nov 1, 2013

Hi Veena,
I have some cases that want to compile dust template on server, too. I decide use Nodejs as js engine on server.
On the above your comment you mentioned that you will have blog post about processing template on server
Would you mind give me a link of that post, I've had a searching and still dont see any articles that relate compiling dust template on server.
And you had mentioned about your open source, so how is about it?? Do you mind give me some ideas about compiling template on Node js

@vybs
Copy link
Author

vybs commented Dec 8, 2013

@alohaTu, Never made it publish the post, now I look back, compiling dust on the server is easy ( using node.js or Rhino or even V8 engine if you use a c++ stack). it is basically 4 lines of code to compile template in node.js Are you still wondering how.?

check out the paypal's open sources node module for dust rendering
https://github.com/paypal/adaro

@vybs
Copy link
Author

vybs commented Dec 8, 2013

@sivikt oops for been so late! But the answer is simple, any data to the dust template has to be in JSON including what you ask for .....params as context path, js libs versions, html headers and meta info. But why would you need html headers to display on the dust template? ....

@alohaTu
Copy link

alohaTu commented Dec 12, 2013

@vybs : ok thank you, I will check this link, I think I will use node to compile Dust, and when you publish that post, please let me know that link, I alway keep follow any articles that relate about Dust :D

@ccit-spence
Copy link

@vybs How has the progress been for UI composition with DustJS? Still evaluating things on our end. The main thing I am trying to solve is UI composition in a microservices environment. Currently everything is based on Java/Spring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment