Hi,
I know, there are templating systems like Mustache, but I always loved Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a standalone package, so it can be used outside of Seaside? Best regards, Martin. |
Depends on what you mean with ‘outside of Seaside’ but maybe this is what you would be looking for:
WAHtmlCanvas builder render: [ :html | html anchor url: 'htttp://www.seaside.st'; with: 'Seaside Homepage' ] See WABuilderCanvasTest for some examples. Hope this helps? Johan > On 25 Feb 2016, at 18:21, MartinW <[hidden email]> wrote: > > Hi, > > I know, there are templating systems like Mustache, but I always loved > Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a > standalone package, so it can be used outside of Seaside? > > Best regards, > Martin. > > > > -- > View this message in context: http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
In reply to this post by MartinW
Hi Martin,
> On 25 Feb 2016, at 18:21, MartinW <[hidden email]> wrote: > > Hi, > > I know, there are templating systems like Mustache, but I always loved > Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a > standalone package, so it can be used outside of Seaside? Yes you can: WAHtmlCanvas builder render: [ :html | html heading: 'Test'; paragraph: 'foo bar' ]. Or just instantiate any component and let it render. Sven > Best regards, > Martin. > > > > -- > View this message in context: http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
In reply to this post by Johan Brichau-2
Hi johan
What would be good is to have it in a separate package because I wanted to output HTML and loading seaside for that was heavy. Stef Le 25/2/16 19:33, Johan Brichau a écrit : > Depends on what you mean with ‘outside of Seaside’ but maybe this is what you would be looking for: > > WAHtmlCanvas builder render: [ :html | > html anchor > url: 'htttp://www.seaside.st'; > with: 'Seaside Homepage' ] > > See WABuilderCanvasTest for some examples. > > Hope this helps? > Johan > >> On 25 Feb 2016, at 18:21, MartinW <[hidden email]> wrote: >> >> Hi, >> >> I know, there are templating systems like Mustache, but I always loved >> Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a >> standalone package, so it can be used outside of Seaside? >> >> Best regards, >> Martin. >> >> >> >> -- >> View this message in context: http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825.html >> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. >> > > |
In reply to this post by MartinW
MartinW <[hidden email]> writes:
> I know, there are templating systems like Mustache, but I always loved > Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a > standalone package, so it can be used outside of Seaside? Pillar has this which is less powerful thank Seaside but good enough for us: canvas tag name: 'a'; parameterAt: 'id' put: anId; with: '' -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill |
And Zn has a very simple one too (since recently):
generateHelp "Generate an HTML page with links to all pages I support" ^ ZnHtmlOutputStream streamContents: [ :html | html page: (self class name, ' Help') do: [ html tag: #h3 with: 'Available Pages'. html tag: #ul do: [ prefixMap keys sorted do: [ :each | html tag: #li do: [ html tag: #a attributes: { #href. each } with: each ] ] ] ] ] But Seaside's is better, though much larger. > On 26 Feb 2016, at 06:38, Damien Cassou <[hidden email]> wrote: > > MartinW <[hidden email]> writes: > >> I know, there are templating systems like Mustache, but I always loved >> Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a >> standalone package, so it can be used outside of Seaside? > > Pillar has this which is less powerful thank Seaside but good enough for > us: > > canvas tag > name: 'a'; > parameterAt: 'id' put: anId; > with: '' > > -- > Damien Cassou > http://damiencassou.seasidehosting.st > > "Success is the ability to go from one failure to another without > losing enthusiasm." --Winston Churchill > |
In reply to this post by stepharo
Yes, this is exactly what I was looking for :) |
In reply to this post by Sven Van Caekenberghe-2
Cool. This should come in handy at many occasions. I will use it right away. Thank you. |
In reply to this post by stepharo
Well… It’s in a separate package called ‘Seaside-Canvas’.
You should only need Seaside-Core as a prerequisite, as you can derive from the metacello config. I did not try, but let me know if you do. Johan > On 25 Feb 2016, at 23:07, stepharo <[hidden email]> wrote: > > Hi johan > > What would be good is to have it in a separate package because I wanted to output HTML and loading seaside > for that was heavy. > > Stef > > > Le 25/2/16 19:33, Johan Brichau a écrit : >> Depends on what you mean with ‘outside of Seaside’ but maybe this is what you would be looking for: >> >> WAHtmlCanvas builder render: [ :html | >> html anchor >> url: 'htttp://www.seaside.st'; >> with: 'Seaside Homepage' ] >> >> See WABuilderCanvasTest for some examples. >> >> Hope this helps? >> Johan >> >>> On 25 Feb 2016, at 18:21, MartinW <[hidden email]> wrote: >>> >>> Hi, >>> >>> I know, there are templating systems like Mustache, but I always loved >>> Seaside's Canvas/Brush metaphor for creating HTML. Is it available as a >>> standalone package, so it can be used outside of Seaside? >>> >>> Best regards, >>> Martin. >>> >>> >>> >>> -- >>> View this message in context: http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-available-outside-of-Seaside-tp4880825.html >>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. >>> >> >> > > |
In reply to this post by Sven Van Caekenberghe-2
On Fri, Feb 26, 2016 at 07:34:00AM +0100, Sven Van Caekenberghe wrote:
> And Zn has a very simple one too (since recently): And I published WaterMint a few months ago. http://www.samadhiweb.com/blog/2015.09.26.watermint.html.html http://www.smalltalkhub.com/#!/~PierceNg/WaterMint-HTML | html | html := WMHtmlCanvas new. html html with: [ html head with: [ html title: 'WaterMint' ]. html body with: [ html h1: 'WATERMINT'. html div id: 'foo'; class: 'foo'; with: [ html p: 'Foo!' ]. html div id: 'bar'; with: [ html p: 'Bar!' ]. html h1: 'BAZ!' ]]. html render. Pierce |
Free forum by Nabble | Edit this page |