Changeset 149

Show
Ignore:
Timestamp:
08/18/2006 11:02:29 (2 years ago)
Author:
why
Message:
  • examples/tepee.rb: bit of a style sheet. otherwise, links are smashed.
  • examples/blog.rb: markaby trickin.
Location:
trunk/examples
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/blog.rb

    r146 r149  
    242242      p post.body 
    243243      p do 
    244         a "Edit", :href => R(Edit, post) 
    245         text " | " 
    246         a "View", :href => R(View, post) 
     244        [a("Edit", :href => R(Edit, post)), a("View", :href => R(View, post))].join " | " 
    247245      end 
    248246    end 
    249247 
    250248    def _form(post, opts) 
    251       p do 
    252         text "You are logged in as #{@user.username} | " 
    253         a 'Logout', :href => R(Logout) 
    254       end 
     249      p { "You are logged in as #{@user.username} | #{a 'Logout', :href => R(Logout)}" } 
    255250      form({:method => 'post'}.merge(opts)) do 
    256251        label 'Title', :for => 'post_title'; br 
  • trunk/examples/tepee.rb

    r146 r149  
    7272        title 'test' 
    7373      end 
     74      style <<-END, :type => 'text/css' 
     75        body { 
     76          font-family: verdana, arial, sans-serif; 
     77        } 
     78        h1, h2, h3, h4, h5 { 
     79          font-weight: normal; 
     80        } 
     81        p.actions a { 
     82          margin-right: 6px; 
     83        } 
     84      END 
    7485      body do 
    7586        p do 
     
    90101    h1 @page.title 
    91102    div { _markup @version.body } 
    92     p do  
     103    p.actions do  
    93104      a 'edit',    :href => R(Edit, @version.title, @version.version) 
    94105      a 'back',    :href => R(Show, @version.title, @version.version-1) unless @version.version == 1