The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Son of WebPage

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Son of WebPage Posted: Jan 4, 2006 12:13 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Son of WebPage
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

Okay, once again, the idea here is to make HTML easily expressible for beginnies during a tutorial. If we can show that Ruby can be used to assemble a blog template pretty nicely, then someone might go, “Okay, I’m doing this!”

Here’s the latest webpage.rb. And here’s RedHanded sort-of-translated to webpage-test.rb.

Peek:

  div.entry do
    h2.entryTitle 'Son of WebPage'
    div.entrySection %{by "why(Visit why's homepage)":http://whytheluckystiff.net/}
    div.entryContent '_Okay_, once again, the idea here is ...'
  end

Main changes:

  • Give elements a class (or classes) by attaching a method: div.button.red translates to
    .
  • Give elements an ID by adding a bang to that method: div.page! translates to
    .
  • Got rid of link_to, using normal a.
  • Divs can now take a string containing Textile.

I wasn’t gonna do the bang but it looks cool. The method attachment trick is done in CssProxy.

Read: Son of WebPage

Topic: Who says RSS is a standard? Previous Topic   Next Topic Topic: 2005

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use