From ec443c3683e5e48d9e39dab0a02c71609582684a Mon Sep 17 00:00:00 2001 From: Harald Wolff-Thobaben Date: Sun, 23 Jul 2023 10:46:12 +0200 Subject: [PATCH] Update README.md --- ln.templates/README.md | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ln.templates/README.md diff --git a/ln.templates/README.md b/ln.templates/README.md new file mode 100644 index 0000000..b6b1cf9 --- /dev/null +++ b/ln.templates/README.md @@ -0,0 +1,69 @@ +# ln.templates + +Templating engine primarly used for html. + +### Features: + +##### Iterations +Render the children 5 times, with the variable xy set to the 5 values 0, 3, 6, 4, 1 : + + ... + + +##### Conditionals +Render tag only if attribute v-if evaluates to a non false value. + + ... + +##### Inclusions +Replace this tag with the rendered content of othertemplate.html: + + ... + +##### Slots +Use named slots to send content to included template: + + +
+
+ + +Define Slots to be replaced with content from "caller": + + +
Some stuff...
+ + I am the default content, that will be rendered, + if there is no slot named "slotname" + + I am the default slot + I am also the default slot + +By not providing any v-slot elements v-include will use the element itself to be the default slot. + + + + This tag will be surrounded by the frame! + Because there is no slot defined within it. + + +##### Javascript + +Define / run JavaScript logic within the script: + + + let v = 1 + 2; + + +Add style classes conditionally via expression: + +
+ +Set attributes values from expressions: + +
+ +Include content by expressions within text elements: + +
This is my favourite color: {{ myFavouriteColor }}. +