-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diet template does not support :javascript filter, yet? #9
Comments
Jade shows just using a script tag directly: html
head
title Example
script
if (foo) {
bar();
} else {
baz();
} |
I have not needed it up to now, but I will add the nested "script" syntax for this and the the :javascript one afterwards. For now, the script needs to be in a separate file served with e.g. serveStaticFiles("./public/") and script(type="text/javascript", src="script.js") is needed in the template. |
OK, thanks :) I'll wait for this feature. Sometimes I may need to access D code page attributes in the javascript code, and inline script would make this possible. For filters, :markdown, :coffeescript (as implemented in Scalate's jade) and even customized ones are useful too. Maybe you can create a extension point here for people to plug in their own filter implementations :) |
…able to specify inline JavaScript and CSS. Also added the shortcuts ':css' and ':javascript' for style(type="text/css") et al. Fixes issue #9.
script, style, :css and :javascript work now :). :css and :javascript are not real filters yet, but just simple shortcuts. I put real filter support as a TODO item (the markdown parser would be very useful to have as a filter). |
I can't find a way to write
<script>
javascript code in diet template, they all seem to be escaped somehow.Scalate (Jade with Scala) supports
<script>
javascript code by a:javascript
filter, as shown in this pagehttp://scalate.fusesource.org/documentation/jade.html
Will that be supported soon? or else how can I write javascript code in the templates?
The text was updated successfully, but these errors were encountered: