Releases: Senforsce/tndr
Releases · Senforsce/tndr
v0.0.3
v0.0.2
With this release, Everything works the same as templ, except now files now should be of the extension .t1
Features
- New Element
O8
allows for inputting turtle syntax to be converted into a json-ld script associated with the component
Example
t1 HTMX () {
<article>
<h2>Isaac Newton</h2>
<p>figured out if the moon falls like everyday objects</p>
</article>
}
O8 About () {
@prefix wiki: http://dbpedia.org .
@prefix schema: http://schema.org .
wiki:Isaac_Newton a schema:Person
}
Will output a jsonld representation of the ttl
- Supports HDT Context extraction expressions, when used in conjunction with senforsce/router and senforsce/HDT, can read HDT values from the template file, and after validation binds the data to the context to be retrieved in the generated code
Example
// note that /- ... -/ is syntactic sugar for c.get("...")
t1 HTMX (c *router.Context) {
<form action=/- path:WhereFormsAreHandled -/>
<input type="text" placeholder=/- i18n:EnterName -/ />
<button>{ c.get("i18n:SaveText") }</button>
<button>/- i18n:SaveText -/</button>
</form>
Senforsce TndrFish and Tndr-Vscode should, if not now, soon provide syntax highlighting and documentation/definition on hover
Full Changelog: https://github.com/Senforsce/t1/commits/v0.0.2