diff examples/basic/common/macros.kid @ 3:e86dcec16d55

Added basic example.
author cmlenz
date Sat, 03 Jun 2006 12:28:53 +0000
parents
children
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/examples/basic/common/macros.kid
@@ -0,0 +1,13 @@
+<div xmlns:py="http://purl.org/kid/ns#"
+     py:extends="'default_header.kid'" py:strip="">
+  <div py:def="macro1">reference me, please</div>
+  <div py:def="macro2(name, classname='expanded')" class="${classname}">
+   Hello ${name.title()}
+  </div>
+  <span py:match="item.tag == '{http://www.w3.org/1999/xhtml}greeting'" class="greeting">
+    Hello ${item.get('name')}
+  </span>
+  <span py:match="item.tag == '{http://www.w3.org/1999/xhtml}span' and item.get('class') == 'greeting'" style="text-decoration: underline">
+    ${item.findtext('')}
+  </span>
+</div>
Copyright (C) 2012-2017 Edgewall Software