The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Easy Web Making

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.
Easy Web Making Posted: Jan 2, 2006 10:14 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Easy Web Making
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

So, I’ve been working on distilling an HTML maker library for beginners. Like the popup builder in the new Try Ruby. And, as I’m using it, I think something like this could be a serious contender to erb.

Here’s a scrappy initial stab at the library: webpage.rb. (Requires Builder and RedCloth.) And here’s what RedHanded’s template would roughly look like: webpage-test.rb.

Even though this is a layer on top of Builder, it’s supposed to understand common use of HTML and shortcut here and there.

  • No head or body tags. Once you start using divs or headings or paragraphs, you’re in bodyland.
  • The div method takes ids and classes in CSS notation. (div('.sidebarBox') { p 'Built upon <4>>Hobix' })
  • Designed to generate XHTML 1.0 Strict. Adds the doctype, xml instruction, etc.
  • RedCloth can be used in the headers, paragraphs, spans.

Any other ideas for making this thing easier? Stuff like changing method names to be friendlier. Adding other shortcuts. Some built-in CSS layouts perhaps?

Read: Easy Web Making

Topic: Using Hashes to Memoize Previous Topic   Next Topic Topic: Koichi's Brief Ruby Certification

Sponsored Links



Google
  Web Artima.com   

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