Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?
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-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <wm@fastmail.fm> 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-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <wm@fastmail.fm> 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-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
stepharo 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
Yes, this is exactly what I was looking for :) -- View this message in context: http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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 <stepharo@free.fr> 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 <wm@fastmail.fm> 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-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Martin,
On 25 Feb 2016, at 18:21, MartinW <wm@fastmail.fm> 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-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
MartinW <wm@fastmail.fm> 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 <damien.cassou@inria.fr> wrote:
MartinW <wm@fastmail.fm> 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
Sven Van Caekenberghe-2 wrote
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.
Cool. This should come in handy at many occasions. I will use it right away. Thank you. -- View this message in context: http://forum.world.st/Is-Seaside-s-Canvas-Brush-metaphor-for-creating-HTML-a... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
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
participants (6)
-
Damien Cassou -
Johan Brichau -
MartinW -
Pierce Ng -
stepharo -
Sven Van Caekenberghe