Layout Syntax Proposal
See original GitHub issueHi There,
Love your templating system! Glad to see someone still innovating in this space too.
Was wondering if you might consider a slightly different layout syntax. Right now we have this:
@import org.example.WelcomePage
@param WelcomePage welcomePage
@template.layout.page(
page = welcomePage,
content = @`
<p>Welcome, ${welcomePage.getUserName()}.</p>
`,
footer = @`
<p>Thanks for visiting, come again soon!</p>
`
)
which makes a ton of sense. But it’s a little ugly having to indent the markup like that. What about an alternative syntax that captures the same idea:
@import org.example.WelcomePage
@param WelcomePage welcomePage
@layout template.layout.page(page=welcomePage)
@layout:content
<p>Welcome, ${welcomePage.getUserName()}.</p>
@layout:footer
<p>Thanks for visiting, come again soon!</p>
I’m not settled on this particular syntax, it’s just an example, but the idea is to linearize the content/markup so it’s easier to parse visually and you don’t have small little back-tics and commas interspersed throughout.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Layout | Apple Developer Documentation
A type that defines the geometry of a collection of views.
Read more >tc39/proposal-structs: JavaScript Structs: Fixed Layout Objects
This proposal is intended to be minimal. Structs can be designed with or without novel syntax. For brevity of presentation, examples are given...
Read more >How to Write a Proposal and Get What You Want (Free ...
How to write a proposal: step-by-step · Introduction: A brief overview of the problem, solution, costs, and benefits. · Issue: The main definition ......
Read more >How to Write a Research Proposal: Structure, Examples ...
A research proposal is commonly written by scholars seeking grant funding for a research project when enrolling for a research-based ...
Read more >Container Query Proposal & Explainer - OddBird CSS Sandbox
This proposal builds on David Baron's @container approach, which works by applying size & layout containment to the queried elements. Any element with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s awesome to hear Andreas. If you have time at some point I would love to chat.
I have a new project bubbling along that is going to bring htmx to the JVM (I am a java developer who has spent a decade in rails) and I like jte the most of all the template systems I have seen. Would love to chat about the project, understand where you are going with it and maybe even contribute if I can be of help.
You can find me on the htmx discord and DM me, or email me at carson at bigsky dot software. Thank you! You can close this issue out if you like!
Thank you! I’ve sent you a message on discord 😃