Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-26 Thread Pierce Ng
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



Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-26 Thread Johan Brichau
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  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  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.
>>> 
>> 
>> 
> 
> 




Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-26 Thread MartinW
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-available-outside-of-Seaside-tp4880825p4880963.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-26 Thread MartinW
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-available-outside-of-Seaside-tp4880825p4880962.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-25 Thread Sven Van Caekenberghe
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  wrote:
> 
> MartinW  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
> 




Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-25 Thread Damien Cassou
MartinW  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



Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-25 Thread stepharo

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  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.









Re: [Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-25 Thread Johan Brichau
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  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.
> 




[Pharo-users] Is Seaside's Canvas/Brush metaphor for creating HTML available outside of Seaside?

2016-02-25 Thread MartinW
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.